xmodmap is a tool for manipulating keymaps and pointer button mappings in the Xorg environment.
Questions tagged [xmodmap]
255 questions
13
votes
3 answers
Why do my xmodmap binds involving AltGr only work on some keys?
I want to remap my AltGR+Right_Windows but I can't figure out how. No matter what I try, pressing the right windows key emits the name keysym when right alt is pressed or not.
These are the contents of the xmodmap file I am testing right now. In my…

hugomg
- 5,747
- 4
- 39
- 54
12
votes
2 answers
How to map Caps Lock as the compose key using Xmodmap portably and idempotently?
I can't seem to find a way to use Caps Lock as the compose key properly. Some methods are not portable since they require that you detect the key number using something like xev on every host. Other methods result in a ~/.Xmodmap which cannot be…

l0b0
- 51,350
5
votes
1 answer
Convert UTF-8 character to xmodmap name
Is there a way of converting a UTF-8 character to its corresponding xmodmap name?
So if the input is ” the output would be rightdoublequotemark.

Tyilo
- 5,981
4
votes
1 answer
xmodmap KeyPress Event to ButtonPress event
I just got a logitech t400 mouse and everything is working well, except I want to remap the "top" part of the middle mouse to actual middle mouse function.
When I run xev, and capture the clicks, all the mouse buttons return a…

fenderog
- 143
4
votes
0 answers
Mode_switch + Shift not the same as Shift + Mode_Switch?
I've this in my ~/.Xmodmap:
keycode 47 = Mode_switch NoSymbol Mode_switch
keycode 25 = w W backslash bar
Shift+Mode_switch+W produces bar, which is what's intended.
However Mode_switch+Shift+W produces W.
Why is this?
As I was writing this…

abo-abo
- 151
3
votes
1 answer
trying to remap f9 to insert key
I have a small laptop which doesn't have a full keyboard and I would like to insert with Shift+Insert to insert from the X clipboard but I don't have an Insert key. So I figured I just look it up the keycode for F9 with xev(it was 75) and just remap…

susumoa
- 31
2
votes
1 answer
Swap super and ctrl keys in xmodmap
I'm trying to swap my ctrl and super keys.
I currently have successfully mapped the super keys to ctrl, now I need to map the ctrl keys to super, but I can't find a way to do so.
Current code:
! Map both super to ctrl
remove mod4 = Super_R
add…

limao777
- 21
2
votes
0 answers
Modify only one keyboard layer in .xmodmap
My default keyboard layout looks like this
$ xmodkeymap -pke
...
keycode 38 = a A a A ae AE ae AE a A ae AE
...
I want to modify the part of the layout where mode_switch is pressed, that is, columns 3 and 4 should be changed, but all the other…

Socowi
- 625
1
vote
0 answers
I want to make both Control keys as a Super key
I want to make both Control_L and Control_R as a Super key (Windows Key). Is this possible? I only made Control_R as a Super key but I could not make Control_L. Here is what I done.
xmodmap -e 'remove mod4 = Hyper_L'
xmodmap -e 'add…

milarepa
- 1,456
1
vote
0 answers
Continous scroll with xmodmap
I would like to emulate the function of a mouse-wheel with keys using xmodmap. For this reason I mapped Alt+Shift+J and Alt+Shift+K to mousewheel up and down like this:
xmodmap -e "keycode 44 = j J Down Pointer_Button5"
xmodmap -e "keycode 45 = k K…

GaugeSym
- 11
- 1
1
vote
1 answer
xmodmap not mapping Ctrl to Super except in Ubuntu's Keyboard Shortcuts
Post-mortem update: After wrestling with xmodmap for the better part of the morning, I found this answer perfectly solves the issue.
The reason, I believe, is that xmodmap is not as powerful as xkb, and xkb is closer to the keyboard hardware. After…

Michael Fulton
- 123
1
vote
1 answer
AltGr special character binding
Is there a way to bind AltGr-modifiers to other special characters? I use a UK Macintosh keyboard, but need Norwegian letters. I can access ø and æ with AltGr-o and AltGr-a, but there is no å: /ɔːˀ/. How can I bind this to e.g. AltGr-' ?
I use i3,…

vegarab
- 211
1
vote
0 answers
Key with modifiers to call certain behaviour in xmodmap
HW: Samsung N145 (10" netbook)
OS: Xubuntu 14.10
Problem: Backspace key is not functioning.
Want to make Backspace key behaviour be called by Ctrl+Del key combination.
I guess it should be possible to achieve with xmodmap, but cannot find which way…

Boghdan
- 11
- 1
1
vote
1 answer
Swap CapsLock and Control using xmodmap (man page solution does not work)
I have just upgraded from Fedora 14 with Gnome desktop to Fedora 20 with
Mate desktop. Under F14, I previously swapped CapsLock with Control_Left,
and Alt_Right with Control_Right. These I did by adding the following lines
to…

user4025526
- 101
0
votes
0 answers
Swap touchpad button 2+3; ignore touchpad button 2; make key work as button 2
My touchpad's middle button is sick: It activates at random times (Maybe it was the juice I spilled on it, who knows?).
I use the middle button all the time, but I have simply remapped button3 and disabled button2:
xmodmap -e "pointer = 1 0 2"
That…

Ole Tange
- 35,514