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

11
votes
3answers
545 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 ...
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 ...
8
votes
3answers
4k views

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 ...
7
votes
4answers
6k 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 ...
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 = ...
7
votes
1answer
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 ...
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 ...
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 ...
5
votes
2answers
2k 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.
5
votes
1answer
485 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 ...
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 ...
3
votes
1answer
338 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 ...
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 ...
3
votes
1answer
956 views

How to add a special key to .Xmodmap?

I have a SteelSeries 7g keyboard. You can see in the following picture that the "standard" windows key is replaced by the "Steelseries logo key". I'm using Awesome Window Manager. I would like to ...
3
votes
1answer
648 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 ...
3
votes
0answers
435 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. ...
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 ...
2
votes
3answers
379 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 ...
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 ...
2
votes
2answers
2k 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 ...
2
votes
1answer
264 views

How to rebind AltGr+a to \ with xmodmap?

My keyboard has one less key than my layout, so I have to improvise. I'd like to bind AltGr+A to backslash "\" instead of "æ", and AltGr+S to pipe "|" instead of "ß". How can I do so using xmodmap ...
2
votes
1answer
1k views

How to use Control as modifier with xmodmap?

So I'm trying to create a combination of keys to generate ISO keys for the Portuguese layout, the key in question is the < >, pressing it will normally generate the < character, < > + Shift ...
2
votes
1answer
814 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
1answer
964 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 ...
2
votes
1answer
469 views

I would like to edit the layout of my keyboard just a bit - what's the best way?

I'm using an Apple keyboard which has some annoyances compared to other keyboards. Namely, the Alt_L and Super_L keys are swapped, and the bar and less keys are swapped ("|" and "<"). I've written ...
2
votes
0answers
66 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
147 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 = ...
2
votes
0answers
95 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 ...
2
votes
0answers
217 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 ...
2
votes
1answer
824 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
0answers
311 views

How do I permanently map Shift-Right to PageUp on xubuntu?

I got myself a laptop and the keyboard is slightly goofed up because the right Shift key is in a place where I have typically had the PageUp key. So, I wanted to figure out how to remap the right ...
2
votes
0answers
324 views

xmodmap confusion betwen AltGR and Left Control

I'm having trouble making AltGr work on ubuntu so I can type 3rd level characters (@£§,{[],etc) it so happens that RCtrl+RAlt don't work either so I have no way of typing such characters. My RCtrl ...
2
votes
1answer
440 views

Remap Alt/Meta to L_Control (emacs-only solution acceptable)

I'm looking to use the left control key as an additional [Meta] in emacs. I'm running Ubuntu 10.04 LTS, and I assume something could be done using xmodmap. Previous attempts at this have caused me to ...
2
votes
0answers
575 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 ...
2
votes
1answer
177 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 ...
1
vote
2answers
259 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
207 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: ...
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.
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: ...
1
vote
1answer
935 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
0answers
14 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 ...
1
vote
0answers
14 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 ...
1
vote
1answer
47 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 ...
1
vote
0answers
29 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
464 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 ...
1
vote
0answers
146 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
337 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 ...
1
vote
0answers
171 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 ...
1
vote
0answers
80 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 ...
1
vote
0answers
273 views

Xmodmad does not run at startup/login

I put settings in a file called ~/.Xmodmap: xmodmap -e 'keycode 66=Return' xmodmap -e "clear Lock" The next time I logged in, I was prompted as to whether to load ~/.Xmodmap. I loaded it, and tick ...