Questions tagged [xmodmap]

xmodmap is a utility for X that is often used to remap keys and mouse buttons to whatever a user desires.

102 questions
53
votes
10 answers

How to map the Caps Lock key to Escape key in Arch Linux

My OS is Arch Linux amd64, Gnome ENV. I want to map the Caps Lock key to Esc (escape) in Arch Linux. I run the command: xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' It works well, but a moment later, the Caps Lock key works again. And I must…
pexeer
39
votes
7 answers

How to disable a keyboard key in Linux (Ubuntu)?

my keyboard is damaged, the keyboard key [é] is always pressed and it prevents me from working. On windows I found the software sharpkey to disable the [é] button but on Ubuntu I can't found no solution. On many forums they talks about Xmodmap…
Kort Ria
  • 501
31
votes
6 answers

Binding Super+C Super+V to Copy and Paste

For some time I've been interested in binding the Windows Key (Super_L) on my keyboard to Copy and Paste for no other reason but convenience and consistency between my desktop and my MacBook. I thought that I was close after reading about xmodmap…
solo
  • 523
15
votes
3 answers

Emulating mouse click with a keyboard

I want to make a button on a keyboard to act like a mouse click, preferably using xmodmap. How do I do it? Running Ubuntu 10.10.
Zona
  • 151
15
votes
5 answers

How to remap CAPS LOCK on Wayland?

Before Fedora switched to Wayland I used this .Xmodmap file to use my CapsLock Key to reach German Umlauts: keycode 66 = Mode_switch Multi_key keycode 20 = minus underscore ssharp keycode 34 = bracketleft braceleft udiaeresis Udiaeresis keycode 47 =…
frans
  • 1,169
13
votes
3 answers

In Linux, how can I map SHIFT_L/SHIFT_R when pressed without additional key?

Today I found this very nice article by Steven Losh in which he presents a couple of productivity boosting keyboard mappings. Among them is a dynamic mapping of the left and right shift keys. The Idea When Shift_L or Shift_R are pressed without an…
gilligan
  • 181
13
votes
5 answers

How do I swap Alt and Windows keys with xmodmap?

I have a Mac keyboard where the Alt/Win (i.e. Option/Command) keys are inverted compared to a regular PC keyboard, and I'd like to swap them. I haven't had any luck with xmodmap so far. The standard configuration is as follows: shift Shift_L…
13
votes
3 answers

How to swap control and function key on Lenovo external keyboard?

I use a Lenovo ThinkPad (X220i) and like all ThinkPad users, I swapped "control" and "function" in the BIOS. Now I bought an external USB keyboard by Lenovo with a similar keyboard layout as the internal one, but unfortunately, "control" and…
Martin
  • 191
12
votes
1 answer

Setting Hyper and Super modifiers for certain keys with setxkbmap or xmodmap

Problem: I want to modify/redefine my keyboard layout (pc105 se) so that when I press certain keys with mod3 (super) and mod4 (hyper), a different character is returned than usual. E.g. Keycode 61 produces 'minus' (-) when pressed normally and…
Xyz
  • 361
11
votes
2 answers

xmodmap: unable to open display ''

I have the following line in my .bashrc xmodmap -e "keycode 116 = slash" when I SSH to that machine, I get xmodmap: unable to open display '' and needless to say, I want it out of there. Can anyone let me know how to clean this…
11
votes
3 answers

Changing the Mod key in Awesome WM

I tried to change the mod key in awesome from the windows key to either Pause, Scroll Lock, and Escape. For all keys I tried to change the entry in the rc.lua configuration file; I tried to use xmodmap to clear locks and add mod4 = ... However it…
Archie
  • 121
11
votes
3 answers

Why won't my xmodmap command run on startup/login?

I want to run this command every time I log in (or every time I start up, if that doesn't work): xmodmap -e 'keysym Delete = Menu' -e 'keysym Menu = Delete' I've tried many things. I put the command in System > Preferences > Startup Applications. I…
Matthew
  • 15,036
11
votes
2 answers

xmodmap how to remap keys and disable the original ones?

I'm considering getting a 60% keyboard and want to try out working with that layout before buying the actual keyboard. I'm trying to map arrow keys to caps lock + ijkl and disable the real arrow keys. I've found out how to remap it, but when I try…
Tomas
  • 161
10
votes
3 answers

How to swap ctrl and caps lock using xmodmap

Or any other tool, but I prefer xmodmap. I tried this: remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L I also tried this: xmodmap -e "keycode…
Maruti
  • 143
10
votes
1 answer

What is the function of the modifier keys in xmodmap?

When I run xmodmap, I get something like this shift shift_l (0x32), shift_r (0x3e) lock control control_l (0x25), control_l (0x42), control_r (0x69) mod1 alt_l (0x40), alt_r (0x6c), meta_l (0xcd) mod2 num_lock…
1
2 3 4 5 6 7