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

5
votes
2answers
6k 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
555 views

Swapping special keys

I am on archlinux and trying to swap the left Alt key with the left Ctrl key for my convenience in emacs as well as bash command line editing. I use the following ~/.xmodmap: remove mod1 = Alt_L ...
7
votes
2answers
5k views

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 = ...
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.
2
votes
1answer
170 views

Swapping numbers and symbols in X11, but keeping alt+n

As a work-environment optimization, I'd like to switch the numbers and symbols at the top of the keyboard, so that when you press them you'd get the symbol by default and the digit when you hold down ...
6
votes
1answer
9k views

How can I make my Super keys (Windows Key) behave more like Ctrl/Alt/Shift in Linux

After using the Ctrl + "arrow keys" for 13 years to switch virtual desktops in X windows, I've been convinced recently to change to using the Super keys instead (the windows key and the context menu ...
1
vote
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 ...
1
vote
0answers
277 views

error on xmodmap modifier for Control_R

I'm trying to make the Insert key on my keyboard (i know from xev that it has keycode 118) work like a ctrl key ... since my stupid keyboard does not have a ctrl key on the right, just the left. I ...
1
vote
1answer
563 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 ...
2
votes
1answer
2k views

/etc/X11/Xmodmap doesn't work for Ubuntu?

After several days research, I found that in Ubuntu /etc/gdm/Xsession is executed instead of /etc/X11/Xsession. Though both run the scripts under /etc/X11/Xsession.d. I have defined /etc/X11/Xmodmap ...
3
votes
1answer
1k views

Xmodmap: Six characters to one key?

From OpenSUSE wiki: (As long as Mode_switch/ISO_Level3_Shift is assigned to the keycode of Alt Gr - if you assign Mode_switch and ISO_Level3_Shift to different keys, you can assign up to six ...
1
vote
1answer
1k views

xmodmap no longer works for XF86 keys?

I recently upgraded xorg-server to 1.7.7 on gentoo linux (along with a bunch of other upgrades...). It seems that xmodmap no longer accepts my .Xmodmap file. I get errors like /usr/bin/xmodmap: ...
9
votes
3answers
5k 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
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 ...
3
votes
1answer
636 views

Remapping characters in xmodmap

I am using a Swedish keyboard, and I want to be able to type braces easier. I planned to map AltGr + å to '}' and AltGr + ä to '{'. However, nothing really changes. I have some other stuff in ...
1
vote
1answer
927 views

Remap control key in gnome-terminal?

I just installed Ubuntu to get more familiar with it since I'll be using it in a new job shortly. I use Macs at home and in my current job, so I'd like to make it as Mac-like as possible. I've ...
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 ...
0
votes
2answers
615 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 ...
4
votes
2answers
5k views

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 ...