Questions tagged [xmodmap]

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

Filter by
Sorted by
Tagged with
51 votes
9 answers
78k 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 ...
11 votes
4 answers
19k views

How to remap CAPS LOCK on Wayland?

Before Fedora switched to Wayland I used this .Xmodmap file to use my CapsLock Key to reach German Umlauts: keycode 66 = Mode_switch Multi_key keycode 20 = minus underscore ssharp keycode 34 = ...
0 votes
1 answer
577 views

Swapping keys with xmodmap doesn't work in all applications

I would like to swap my control and command keys, and have done so using the following xmodmap config: remove mod4 = Super_L add control = Super_L remove control = Control_L add mod4 = Control_L This ...
37 votes
7 answers
72k 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 ...
30 votes
6 answers
34k 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 ...
0 votes
1 answer
453 views

xmodmap holding a key vs pressing

I want xmodmap to make the Caps Lock key act as if I were pressing the Escape key if I only press and release it, but to act as an i3 mod key if I hold it and press another key. This would allow me to ...
0 votes
1 answer
471 views

Change keymap using .xinitrc

I have made a .xinitrc file in my home directory. Want to run the file xinit.rc form directory ${HOME}/bin/inge. Is the following the way to do things? File: .xinitrc #!/bin/bash source ${HOME}/bin/...
0 votes
0 answers
132 views

Mapping Specialized Computer Keys

I own an Acer Nitro computer, which comes with a "NitroSense" button which displays ACPI information on Windows once pressed. However, on Linux, pressing it doesn't do anything, and there is ...
13 votes
3 answers
8k views

How to swap control and function key on Lenovo external keyboard?

I use a Lenovo ThinkPad (X220i) and like all ThinkPad users, I swapped "control" and "function" in the BIOS. Now I bought an external USB keyboard by Lenovo with a similar keyboard layout as the ...
15 votes
3 answers
11k 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.
0 votes
1 answer
353 views

Setting key persistant to a modifier with xmodmap , not loading unless I source .xinitrc

So I'm just trying to assign Control_R , to a different function such as mod3 with xmodmap , for that I have added the following line on .xinitrc [[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap ...
1 vote
1 answer
907 views

How to use xmodmap to use Alt Key as a Shift Key?

I want to use my left alt key as a shift key, but my attempts at remapping have failed. Using the following .Xmodmap file(I have taken the Hex Codes from my keysymdef.h to eliminate this possible ...
1 vote
1 answer
381 views

Remap already bound keys with xmodmap

I recently bought a 17" LG Gram and I want to remap some of the keys to be more like my 80% keyboard. Using a tiling window manager (qtile), it's nice to have a Super key on both the left and ...
0 votes
1 answer
234 views

How to map the escape sequence of Gnu-screen to an arbitary key remapped with xmodmap?

so i remapped some keys using xmodmap, specifically i remapped one key to the ±-sign. I want to have this key as my escape for GNU screen. I tried adding the following lines in my .screenrc: escape ± ...
5 votes
2 answers
4k views

xmodmap - remap Caps_Lock to Escape and Shift+Caps_Lock to Caps_Lock

I'm experiencing a strange behavior with xmodmap. I want to remap Caps_Lock so it acts as Escape and Shift+Caps_Lock so it acts as Caps_Lock. In my ~/.Xmodmap i tried every possible combination of the ...
2 votes
1 answer
425 views

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

Because CapsLock has the keycode 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 Shift+...
10 votes
3 answers
18k 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 = ...
13 votes
5 answers
28k 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 ...
0 votes
1 answer
123 views

Make left-shift only capitalize certain keys, right-shift the rest

I use Arch Linux and xmodmap for customizing keys. I'm in the process of learning Touch Typing. Now for my typing behavior, I exclusively use left-shift for capitalization. I would like to integrate ...
1 vote
2 answers
341 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 "...
12 votes
1 answer
8k 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 ...
0 votes
0 answers
20 views

Is it possible to map °7 to { on Linux system wide?

On a German keyboard, typing { is pretty cumbersome. So in VIM, I mapped the key sequence "°7" to "{" by having this line in my vimrc: imap ⁷ { This turned out to be super useful. Is there a way to ...
0 votes
1 answer
130 views

Xmodmap fails add clearing modifiers

I try to make my escape key behave as an alt modifier (and later add back the escape functionality with xcape), however I can't get xmodmap to make my escape key have this alt function. After ...
0 votes
3 answers
732 views

fedora 25 map winkey into control

This is the result of xmodmap -pm: control Control_L (0x25), Control_L (0x42), Control_R (0x69), Control_L (0x85), Control_R (0x86) mod4 Super_L (0xce), Hyper_L (0xcf) I have this ....
7 votes
4 answers
4k 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 ...
1 vote
0 answers
63 views

xkb: Keymapping reverts backs with a Java App

I am using a xkbcomp keyboard config for a second keyboard, but I am pretty sure it is reverting back to the default setup with java application. IE: Minecraft. Whenever I try to use the gamepad "the ...
1 vote
1 answer
1k views

How to make Alt+Shift act like AltGr with xmodmap?

I just swapped from Windows and I was used to using Alt+Shift to type special characters such as |@#~½¬from the number row, but it only works with Alt Gr on Ubuntu. It's not in the settings either so ...
2 votes
0 answers
476 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 ...
1 vote
0 answers
126 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). ...
0 votes
1 answer
680 views

Xmodmap error on setting new mod key

I try to use the cap lock key as mod key. I have this .Xmodmap: clear lock clear mod2 keycode 66 = Hyper_L add mod2 = Hyper_L and this xmodmap -pm: shift Shift_L (0x32), Shift_R (0x3e) ...
11 votes
2 answers
8k views

xmodmap how to remap keys and disable the original ones?

I'm considering getting a 60% keyboard and want to try out working with that layout before buying the actual keyboard. I'm trying to map arrow keys to caps lock + ijkl and disable the real arrow keys....
2 votes
1 answer
2k 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 ...
11 votes
3 answers
12k 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
1 answer
516 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
1 answer
347 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 “...
13 votes
3 answers
3k 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
1 answer
1k views

Non-toggling caps lock with xkmodmap or xkb?

Is there a way to configure the caps lock button so it's not toggling? That is, so that it only applies the caps lock state while held down, and when released everything reverts to normal. The ...
3 votes
1 answer
3k views

Cannot remap keys with xmodmap in Fedora 26

I want to remap the caps lock key with the shift lock key in order to be able to write special characters instead of numbers when the shift lock key is activated. Unfortunately, I cannot get this to ...
0 votes
1 answer
511 views

Keybinding on Lubuntu

I would like to bind few keys to the characters "\" "{" "}" on my 32 bits Lubuntu Netbook. I was able to do it using Xmodmap : xmodmap -e "keycode 135 = backslash slash" xmodmap -e "keycode 48 = ...
2 votes
2 answers
2k 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 ...
0 votes
1 answer
983 views

Disable ESC key

the ESC key on my computer is bad and causes the computer to misbehave. i tried disabling by using xmodmap -e 'keycode 9=' But resulted in errors xmodmap: commandline:1: bad keycode input ...
0 votes
0 answers
710 views

Caps+Shift+hjkl as arrow keys

I currently map caps to CTRL-L using the following .Xmodmap: clear lock clear control keycode 66 = Control_L add control = Control_L Control_R I'd like to additionally map Caps+Shift+HJKL to be ...
2 votes
1 answer
674 views

Rebind windows key of microsoft sculpt ergo mouse

I'm trying to rebind the windows key of the microsoft sculpt ergo mouse under linux to backward navigatiom. Some rebinding works using xmodmap -e "keycode 134 = Backslash" but rebinding to ...
3 votes
2 answers
6k 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 (...
8 votes
1 answer
5k 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), ...
3 votes
1 answer
1k 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 ...
1 vote
2 answers
2k 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: http://earthviaradio.wordpress.com/2012/02/06/swapping-the-left-alt-and-ctrl-...
1 vote
1 answer
279 views

How can I map "Shift + (A number)" to "(Another number)" using xmodmap?

I want to map my keys so that pressing Shift + 1 produces a 6, Shift + 2produces a 7, etc. to make it possible to type all numbers using only my left hand. When I try xmodmap -e "keycode 10 Shift_L = ...
2 votes
2 answers
6k 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
0 answers
719 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 = ...