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

learn more… | top users | synonyms

1
vote
2answers
3k views

Multi-button mouse on X11: How can I configure several buttons to act as the middle button?

I know how to make another button act as the middle button but how can I map several mouse buttons to the middle button? xmodmap complains if I repeat button numbers in the pointer option.
0
votes
0answers
9 views

xmodmap: Map numpad to one set of keycodes, Shift-numpad to some other set of keycodes, detected by Blender

I am able to map my numpad with, for example, an ~./Xmodmap file like this: keycode 87 = XF86Launch1 keycode 88 = XF86Launch2 keycode 89 = XF86Launch3 keycode 83 = XF86Launch4 keycode 84 = ...
2
votes
0answers
17 views

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), ...
0
votes
0answers
32 views

Keyboard event: 'k' behaves as dead key

I have a really strange problem. My letter 'k' behaves like a dead key (like an accent) in the terminal (KDE Konsole, xterm). It behaves normal when using vim or graphical programs like firefox. In ...
1
vote
0answers
14 views

Remap Escape = Caps_Lock, Caps_Lock = Ctrl_L and Ctrl_L = Caps_Lock

I would like to swap keys using xmodmap as in the title. I would like the useless capslock to be bind to the escape key, the escape function to be bind to the bottom left control to and the ctrl to be ...
0
votes
1answer
25 views

How do I map Alt+Space in Linux with xmodmap?

I am trying to map Alt+Space to Escape in Puppy Linux. Specifically, this is for vim, but I could not get it to work there. So, I thought I better try to do it globally, but I have no idea what is the ...
0
votes
0answers
20 views

Remap Super_L+hjkl to direction keys

On Linux Mint, I want to use Super_L+hjkl to move like in vim. I tried various thinks with xmodmap without success. I tried to do this : xmodmap -e "keycode 43 = h H h H Left Left Left Left" But ...
8
votes
2answers
2k views

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 ...
1
vote
0answers
32 views

Shift Key won't work with F1,F2 etc. keys in gnome2. What could be the reason?

I have a vnc session with gnome2 desktop. The following are couple of examples where multiple key press working as expected and the last two examples have unexpected results (with F1 & F2). ...
9
votes
3answers
6k views

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 ...
1
vote
0answers
36 views

Map key + mouse click/movement to something on Linux

When I was using OS X, I was able to remap left click + ctrl to right click and cursor movement + shift to scroll in the direction the cursor would be travelling. Is this possible on Linux? Arch ...
10
votes
4answers
8k views

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 ...
1
vote
0answers
22 views

Trying to set Alt Gr+Keycode 50 to backslash

I've just started running Linux Mint, However I'm using a slightly different keyboard hardware wise. It had a multitude of issues in the start, such as Shift being mapped wrongly, atastrophe/asterisk ...
3
votes
3answers
600 views

Disable numlock, preserving mouse button key bindings

I'm having trouble to disable the Numlock key (make the key do nothing, so that the numpad numbers always work) while at the same time mapping extra mouse buttons (at the side of my mouse) to ...
0
votes
1answer
247 views

tmux and xf86 keys (the 'Fn' key, xf86WakeUp)

I'm interested in hijacking the Fn key on my laptop and using it as the mod key for tmux, but after a bunch of tinkering with xmodmap and tmux.config, I'm not much further along in getting this to ...
0
votes
0answers
40 views

xmodmap setting reverted once every few minute for usb keyboard

I have an xmodmap setting that convert CapsLock to control on my laptop, when I am using a usb keyboard, the CapsLock key changes back to its default meaning every once in a few minutes so I need to ...
0
votes
2answers
174 views

order of KEYSYM in Xmodmap config file

I try to make some changes in my keyboard configuration with xmodmap. However, when I look at the output of xmodmap -pke I see that some keycodes are binded to 12 KEYSYM, for example, with my ...
2
votes
1answer
880 views

Remapping keys using xkb

My return key is physically dead. I'm running xubuntu. I am able to remap the AltGr to return using xmodmap. However when I reload xmodmap, either via shell or automatically during boot, it will hang ...
2
votes
0answers
142 views

How to map space to control and unmap win from Hyper_L using xkb/setxkbmap

I am trying to make my space act as control by default (and as space when tapped by using xcape) and to make capslock act as the only hyper modifier. I have a working configuration for this in ...
2
votes
2answers
359 views

How to keep per-keyboard layout settings?

I am using xmodmap (and sometimes xkbcomp instead) to adjust my keyboard layout (e.g. mapping Caps Lock to the Mod3 modifier). When I plug a USB keyboard into my laptop or insert a YubiKey (which ...
1
vote
1answer
78 views

xmodmap: `Shift+CapsLock` -> `Delete` returns error bell

Because CapsLock has the keycod 66 on my English_US keyboard layout, the command xmodmap -e "clear Lock" -e "keycode 66 shift = Delete BackSpace" turns CapsLock into the Delete key and ...
2
votes
1answer
200 views

Remapped keys (with xmodmap) in Linux host stopped working in VirtualBox Windows guest

I've used the following xmodmap script for years to swap my Left Ctrl and Caps Lock keys in Linux: remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = ...
3
votes
1answer
421 views

How to make Control-j works as Return without Control bit set(!) using xkb [and|or] xmodmap

It looks like extremely convenient for me to use Control-j instead of Return in xterm and vim, and I want to use this sequence for all X apps. It can be easily done using xkb by remapping ...
1
vote
1answer
2k views

Xmodmap fails to remap modifier keys

When I try to move keys, so that I have CapsLock on escape, Control on CapsLock and Escape on left control, I get the following error: % xmodmap ~/.Xmodmap X Error of failed request: BadValue ...
2
votes
0answers
2k views

How to remap brightness & volume keys on Asus AspireOne / Ubuntu Lucid?

I want to remap the following keys on my Asus AspireOne running Ubuntu Lucid: Brightness down (Fn-Left) -> Home Brightness up (Fn-Right) -> End Volume up (Fn-Up) -> Page up ...
1
vote
0answers
97 views

Prevent Screenshot in gnome using xmodmap

I want to prevent screenshots from being taken in GNOME using keyboard shortcuts. I need to do this by running a script in such a manner that it can be reverted later. I tried to do this using ...
4
votes
1answer
1k views

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 ...
5
votes
1answer
534 views

Xmodmap configuration

On my Debian Linux machine Ctrl+Alt+F1 is bound to a virtual terminal. I can see the corresponding entry by running xmodmap -pke keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 Per this ...
1
vote
1answer
649 views

Disable Escape key in linux?

Im working with a kiosk software, and it can easly be exited with the escape key. Theres no way to disable this behaviour, why I would want to simply disable the escape key completely. I tried with ...
3
votes
2answers
4k views

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 ...
1
vote
1answer
119 views

Linux remap capslock to iso <>| key

Heres my .Xmodmap: remove Lock = Caps_Lock keycode 66 = less greater less greater bar brokenbar bar brokenbar The greater an less signs are working but the pipe still does not want to. What am I ...
0
votes
1answer
24 views

How to add additional control key?

I am using xkb to add an additional control key as follows: key <HENK> { [ Control_R ] }; However, it does not work. I even tried xmodmap without success: xmodmap -e ...
0
votes
1answer
549 views

Bind bash script to keypress

How do I map a keypress on a keyboard to a bash script? For example, when I press the "Esc" key, the script is run. OS: XFCE Spin Fedora 19 ---- EDIT ---- I need to set this via the console. This ...
1
vote
0answers
34 views

Can I map capslock to lshift + rshift?

I want to toggle capslock when I hit both shift keys at once. Is this possible? I'm currently using xubuntu and xmodmap if it matters at all.
1
vote
1answer
614 views

Create new mod key with Xmodmap to remap keys?

I'm trying to remap my parenthesis and bracket keys to a more comfortable position on my keyboard. Would it be possible to create a NEW modifier key (such as Control or Shift) in Xmodmap and then ...
2
votes
1answer
465 views

How do I get a valid xmodmap while using xcape

I'll admit at the start that X's key-mapping is a bit of a black-art for me which mainly involves copy and pasting examples from places like SO and SU and seeing if it works. However in this case I ...
2
votes
0answers
118 views

Can I get urxvt to recognize xmodmap configuration?

i switch from an apple-style keyboard at home to a microsoft-style keyboard at work. the primary difference in these keyboards is that the super key and the alt key are transposed. i've used xmodmap ...
1
vote
0answers
171 views

Switching left alt and left win

I have a Thinkpad X230 (german layout, [edit]running linux[/edit]) and I want to switch the left win- and the left alt-key somehow with the right alt-key (AltGr) not being touched. However, I haven't ...
1
vote
1answer
280 views

How to make my Alt_R function as another Control on Linux

I want to use my right Alt as another Control key to use with Emacs. I tried following (with modifications) this tutorial: ...
3
votes
0answers
461 views

xmodmap has no effect

First post. Here it goes: I have Ubuntu 10.10, maverick. A few days ago I was trying to convert my 'command' key on my apple computer to a 'ctrl' key, and after searching online I ran into xmodmap. ...
0
votes
1answer
234 views

Undo remap using xmodmap

In an attempt to remap the right alt key to my left alt key I had run the following: xmodmap -e 'keysym Alt_L=Alt_R' Now I cannot revert it back to it's original state. How can I undo this blunder?
5
votes
2answers
3k views

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.
1
vote
0answers
214 views

Is there a way to make `xmodmap ~/.Xmodmap` run faster?

On Fedora 19, when I run xmodmap ~/.Xmodmap it locks my display for about 15-20 seconds. The command completes successfully, but I am unsure of why it takes so long. I'm assuming there is an X ...
6
votes
2answers
7k views

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 ...
2
votes
0answers
246 views

xev says Caps Lock remap worked but other apps don't see it

I'm trying to remap Caps Lock to Control. Before I modify anything, xev reports the following for a press/release of Caps Lock: KeyPress event, serial 73, synthetic NO, window 0x2600001, root ...
11
votes
3answers
615 views

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 ...
0
votes
2answers
686 views

How do I remap ctrl-j to ctrl-c on ubuntu?

I'm trying to remap a bunch of my keys and I'm running into trouble. I'm currently trying to use xmodmap but failing. Maybe there is a better way? Can someone explain how I can best remap Ctrl-j on ...
0
votes
2answers
195 views

.bash_profile wont run on login

I am trying to set up my computer so that the escape key performs the caps lock function and caps lock performs the escape key function. I have a small script to swap my escape and caps lock using ...
2
votes
1answer
992 views

How to swap Ctrl and Windows keys with xmodmap

I want to swap the right Win and Ctrl keys on my keyboard using xkeycaps. This the .xmodmap file that I'm loading when Ubuntu starts, generated with xkeycaps. It works fine for swapping the Esc and ...
2
votes
2answers
5k views

Linux, Ubuntu & Apple Aluminium keyboard: remap greater/less with tilde

I have an Apple Aluminium keyboard. To the left of 1 key I have the less/greater (< >) key, not grave/tilde (` ~). xmodmap does not work for me: layout switching (done with setxkbmap) resets my ...