Xmodmap is a tool found in the xll-xserver-utils-package and it enables keyboard maps and pointer button mappings to be configured according to the user's preference. It is often used to set up custom keys such as launcher or media buttons on a laptop.

learn more… | top users | synonyms

14
votes
3answers
8k views

How do I set Xmodmap on login?

As my keyboard layout doesn't suit me, I run xmodmap on login. The script is named .profile and it runs OK, but it breaks the Unity interface. I want to know where to put the xmodmap line so that it ...
15
votes
3answers
13k views

How do I switch the Command key and Control key on a MacBook Pro?

I have scoured the web, and I can't seem to get Xmodmap / anything to work properly. I want to swap BOTH my Command keys with my Control key - in essence, inverting what they do currently. How would ...
3
votes
3answers
918 views

Script at Startup

I'm using 10.10 and I need to run a script in order to get a windows-like international keyboard layout - basically, it changes how dead keys work. (Original script from this page ...
13
votes
1answer
11k views

How do I clear xmodmap settings?

Exactly what the title asks. How do I clear xmodmap settings? I have an IBM model M, and somehow xkeycaps got it into its head that my "End" key was not any key at all. xev reports keypresses when I ...
11
votes
4answers
6k views

Permanent xmodmap in Ubuntu 13.04

I cannot make xmodmap run on login in Ubuntu 13.04. I have searched around, including in askubuntu and all answers I found do not work. I have a file named .Xmodmap in my home folder which contains ...
7
votes
1answer
1k views

How to bind Ctrl+arrows to Home and End keys? xmodmap does not work

On Windows, I used to bind Ctrl+Left to Home and Ctrl + Right to End via ahk. Now I'm struggling to achieve this behavior in Ubuntu. I've tried editing /etc/inputrc: "\e[1;5C": end-of-line ...
7
votes
2answers
1k views

Map caps-lock key to middle mouse click

Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it. I ...
10
votes
2answers
902 views

Remap Caps Lock key to 'Run Command' (Alt+F2)

I'm trying to get rid of the Caps Lockkey and give it a better use. Since I constantly use the run command Alt+F2, I'd like to make Caps Lock trigger that action. I've found a couple of questions ...
5
votes
3answers
16k views

How to run commands at login on ubuntu 12.04?

I have the file ~/.xmodmap where i swap a few keys on my keyboard. This file was loaded properly on my previous Ubuntu desktop but since the upgrade to 12.04 it's no longer loaded when I login to my ...
3
votes
1answer
3k views

How to change decimal comma to decimal period in numpad?

How to change the decimal comma ',' to decimal period '.' in the numeric pad of the keyboard? I have used xmodmap but every time that I change my keyboard layout the changes (by xmodmap) are being ...
5
votes
2answers
389 views

How do you enable tap-to-click via command line, with `xmodmap`?

You can use this to reverse scroll direction (natural scroll): xmodmap -e "pointer = 1 2 3 5 4 7 6 8 9 10 11 12" You can also set it back again with xmodmap -e "pointer = 1 2 3 4 5 7 6 8 9 10 11 ...
1
vote
1answer
131 views

Swapping right shift and delete key using xmodmap

I'm unsure how to swap these 2, this is the thought process I had but am unsure how to get it working: remove sh = Shift_R remove dl = Delete keysym Delete = Shift_R keysym Shift_R = Delete add sh ...
1
vote
1answer
205 views

Restoring my original keyboard mapping without logging on

I used xmodmap to remap some keys. I followed directions to restart. Now, I can't log in. How can I restore my previous keyboard mapping?
23
votes
1answer
7k views

How do I turn off Caps Lock (the lock, not the key) by command line?

For some reason my laptop is stuck in Caps Lock. I have the Caps Lock key mapped by xmodmap to hyper_l, so I don't have a caps_lock key to turn it off. Is there a way I can turn it off by command ...
8
votes
1answer
6k views

Windows-like global shortcuts with the <Super> key in Xubuntu [closed]

I would to define Windows-like shortcuts using the Super ("Windows") key. I'm running Xubuntu 11.04 (Natty). Using Settings->Settings Manager->Windows Manager->Keyboard I assigned Super+D to "Show ...
6
votes
4answers
528 views

.xmodmap doesn't work for two layouts

before doing the upgrade to Ubuntu 13.10 I was using two layouts for the Keyboard - GR & DE. I was able to set both in one .xmodmap, means I was able to configure GR and DE. Now, when I create a ...
7
votes
1answer
2k views

remap right alt to behave as right ctrl

I'm trying to remap my right alt to behave like my right ctrl so I can use my right thumb to press the ctrl button. This is ubuntu 12.04. I've created the file .Xmodmap in my home folder with the ...
4
votes
2answers
2k views

Remapping keyboard shortcuts (copy, paste etc) to Alt key instead of Ctrl

Interestingly, it turns out this is almost impossible to do. Remapping Alt key to behave as another Ctrl key is not a solution because you lose the Alt key functionalities (some of which are ...
7
votes
3answers
2k views

Remapping Caps Lock to Control and Escape (not the usual way)

I know how to use xmodmap to remap the Caps lock key so it acts as a Control key, or as an Escape key. I would like to combine both features as follows: When I push, then release, the Caps lock key, ...
6
votes
1answer
899 views

making any key into a modifier key

When one presses and holds down certain keys like Control, Alt, Super, no release event is generated while with other keys multiple release & press events are generated simulating the key being ...
3
votes
1answer
172 views

Using setxkbmap for a simple remap (similar to xmodmap)

I've faced some issues after remapping keyboard with xmodmap: settings get reset randomly after 2-20 minutes after applying. Googled it but no help: something resets them, but all mentions apply to ...
1
vote
1answer
2k views

Can't remap Ctrl key with xmodmap

My laptop keyboard doesn't have a right Ctrl key. And I use a different layout than the native layout of my keyboard, so there are some keys that do nothing. So I'm trying to remap one of those keys ...
4
votes
0answers
71 views

How to remap pgup and pgdown to home and end Thinkpad X1 Carbon Ubuntu 13.10 Gnome-shell

I have used the xmodmap technique, I even made a file called .Xmodmap and put it in the start up commands in the gnome tweak tool, but there are still occasions where the buttons don't perform what I ...
3
votes
1answer
264 views

Change aphostrohe with AltGr + P using xmodmap

I'm struggling with changing one keybind with xmodmap. AltGr + P outputs þ, but I would like to change it to output '. xmodmap -pm outputs: xmodmap: up to 4 keys per modifier, (keycodes in ...
2
votes
1answer
119 views

Using Xmodmap, my shift lock now acts as both a shift lock and a compose key. I just want it to work as a compose key. What can I do?

I have two Xmodmap files. First one: keycode 8 = keycode 9 = Escape NoSymbol Escape keycode 10 = ampersand 1 ampersand 1 bar exclamdown bar keycode 11 = eacute 2 eacute 2 at oneeighth at ...
2
votes
0answers
72 views

Remap keyboard using xmodmap but when press to change keyboard layout all settings are reset to default

I tried to map key following this guide How do I remap certain keys?. It's work for me. but one problem that i found is when i change keyboard layout (alt+shift) all keys will be reset to default. ...
2
votes
2answers
738 views

Set Context Menu key to function as Right Control

Dell notebooks in Brazil and possibly other countries no longer ship with a right control key. This is bad for ergonomics, so I would like to set the context menu key to function as right control. ...
1
vote
0answers
188 views

Ubuntu 13.10 resets key map loaded with xmodmap when switching keyboard layout

I'm trying to switch left Ctrl key with CapsLock. I took theese lines from manual to xmodmap: remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = ...
1
vote
0answers
71 views

I want to use Xmodmap along with multiple layouts

I usually use 3 keyboard layouts: US, BG, DE. As I need the DE layout only for Umlaute, I found the solution with modifying the keys in ~/.Xmodmap. The command xmodmap ~/.Xmodmap changes my US layout ...
1
vote
1answer
639 views

Remapping keys on Apple keyboard

I'm using the German Apple keyboard for both MacOS X and Ubuntu 12.10. $ lsbusb ... Bus 002 Device 004: ID 05ac:0250 Apple, Inc. MP110Z/B I've successfully remapped the exchanged < and ^ ...
1
vote
1answer
266 views

.Xmodmap works only when automatic login disabled?

I configured .Xmodmap after the answer I got here: How to set right Alt to work as a Win(Super) key? It sets my R alt to Super key. It worked after log out and log in. When I restarted the PC, the ...
0
votes
1answer
26 views

remapping k to the right shift button

I have been looking on askubuntu for help, but couldn't find the help I needed, so now I just ask. My k key doesn't work, when pressed, and since its a older laptop, i just wish to remap the k key ...