Stack Exchange Network

Stack Exchange network consists of 171 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

1
vote
1answer
71 views

Problems with xmodmap

I'm using Ubuntu 17.04. My backspace key is not working, so i used xmodmap to use the key "Home" as BackSpace. The problem is: after i use xmodmap, the key "Home" works as backspace only in FireFox. ...
24
votes
6answers
11k 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, ...
0
votes
1answer
360 views

How to remap XF86Sleep key to space---xmodmap, xkbcomp & udev fail

I'm running Ubuntu 16.04.1 LTS. I have a remote similar to one here (though mine is just called a "Vista MCE Remote Control") which acts like a keyboard, along with a real keyboard. I'm trying to ...
0
votes
1answer
44 views

Remaping Keys in Ubuntu 17

Please help me solve the following problem: I have a USB pedal that I want to function as Control key for my work. So far system identifies that this pedal is working as F2 key (I am using Ubuntu 17) ...
1
vote
0answers
22 views

right way to change xmodmap

My ~/.Xmodmap: remove mod1 = Alt_R add mod1 = Alt_R my ~/.profile: if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi ...
4
votes
0answers
111 views

scroll lock modifier for arrow keys

Most laptops these days have the Page up/Page down/Home/End keys as Fn overlays of the arrow keys. It has always been a minor annoyance that Fn is on the other side of the keyboard, making one-handed ...
3
votes
1answer
191 views

Remap power button on mouse (using X)

There is a button on my mouse which hibernates my system and I want to map it to do nothing. This button was originally mapped to do something else in Windows using the Windows software that came with ...
1
vote
1answer
3k views

Left Alt key should work as right Alt key (Alt Gr)

I'm using a German Apple keyboard on my Ubuntu 12.04 machine. Under Mac OS X the left Alt key has the same behavior as the right Alt key (I think the right Alt key acts a Alt Gr). I don't know what I ...
14
votes
5answers
15k views

Why won't my ~/.Xmodmap file load on login?

I created the following ~/.Xmodmap file as per this answer. keysym Delete = Menu keysym Menu = Delete clear Lock keycode 0x42 = Escape In other words, swap Delete and Menu, and make Caps Lock an ...
0
votes
0answers
16 views

Swapping keys, period and alt right [duplicate]

The . key in my keyboard doesn't work. How can I swap . with ALT+RIGHT? Will be thankful for step-by-step instructions.
0
votes
1answer
152 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 ...
1
vote
0answers
134 views

What is the use of modifier keys in Xmodmap?

I was following this question to do some remapping. In the question, there is: Additional information: The sequence of these mappings is Key, Shift+Key, mode_switch+Key, mode_switch+Shift+Key, ...
0
votes
0answers
22 views

'Alt' key (left) doesn't act as 'Space' - but CapsLock does? (using 'xkb')

The Space key on my keyboard has given up soI want to change 'Alt' (left) to 'Space' and 'CapsLock' to 'Alt'. In /usr/share/X11/xkb/symbols/pc I have changed the lines //key <CAPS> { [ ...
16
votes
5answers
15k views

How persistently remap keys in Ubuntu 16.04?

This is working for the current session: costales@dev:~/Desktop$ xmodmap -e "keycode 166 = less" costales@dev:~/Desktop$ xmodmap -e "keycode 167 = greater" Then I created this config file: costales@...
33
votes
2answers
28k 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 ...
2
votes
0answers
349 views

How can i modify AltGr with xmodmap?

Hi i have a little problem with the order of two keys in my keyboard, instead of being AltGr+< > like in most of the keyboards in my country, my keyboard comes with the keys this way: < >+AltGr. ...
2
votes
1answer
228 views

How to reconfigure keyboard (W and P not functioning correctly) [duplicate]

I was reluctant in asking this question but everything I've researched has led me to a dead end. Shift + w and Shift + p aren't working correctly. So I'm unable to use W and P unless I use the caps ...
13
votes
2answers
6k views

What does “Key to choose 5th level” in gnome-keyboard-properties do?

There is an option to specify a key to be used to acces 5th level on the keyboard in gnome-keyboard-properties ("Keyboard" under Hardware in System settings): But if I set the 5th level to AltGr and ...
0
votes
0answers
27 views

Ubuntu xmodmap not applying

I am running Ubuntu 16.04 and i3, trying to remap my left Super with left Ctrl (on a Mac). I have done the following: ~/.Xmodmap remove mod4 = Super_L add control = Super_L ~/.xinitrc xmodmap ~/....
33
votes
5answers
26k 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 ...
1
vote
0answers
28 views

Can a mouse button be simulated by the keyboard without enabling numpad mouse emulation?

I'd like to be able to send middle mouse clicks from a keyboard key, for example, the right control key (keycode 105 on my keyboard). I can remap it using xmodmap like so: xmodmap -e "keycode 105 = ...
1
vote
0answers
23 views

Spotify not receiving remapped XF86Audio signals

I have a external USB Thinkpad keyboard I'm using with my Macbook Pro running Ubuntu 16. I'm trying to remap my Fn+F7, Fn+F8, and Fn+F9 keys to send the XF86AudioPrev, XF86AudioPlay, and XF86AudioNext ...
3
votes
0answers
213 views

How to remap a key that's not captured by xev?

I have a mechanical keyboard (by Duck) that includes a Fn key used with F10 to trigger Win-lock (disables Windows key so it doesn't bother when playing) and N-Key rollover. As a programmer, I don't ...
68
votes
4answers
28k 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 ...
100
votes
13answers
130k views

How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?)

I want to change the key bindings on some of the keys on my keyboard. I want some to run commands and others to activate different keys. What applications can I use to do this? Index: ...
0
votes
0answers
16 views

How to save xmodmap changes after reboot? [duplicate]

I remapped my keypad 2 key to represent @ so I changed the normal 2 key with keypad_2 key, but after a reboot I have to do the changes again I used: xmodmap -e "keycode 88 = 2" xmodmap -e "keycode ...
0
votes
1answer
144 views

How do I remap right ctrl to right alt?

I've got right alt remapped to ctrl (via remap right alt to behave as right ctrl), now I need my ctrl to be an alt. thanks for help with this
44
votes
6answers
64k 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 ...
1
vote
1answer
395 views

How to map AltGr to Ctrl+Alt [duplicate]

I would like to map the AltGr key on my keyboard to produce Ctrl+Alt. I am aware of xkb and xmodmap. As far as I could tell, however, using those you can only map from key combinations onto single ...
2
votes
0answers
368 views

How to disable specific key in keyboard at the lower level?

Am using Ubuntu 14.04. My keyboard is acting strangely. The Mail button keeps pressing. I tried the things from the following links: [1] How to disable keys from the keyboard? [2] https://superuser....
11
votes
2answers
4k 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 "\e[1;5D":...
2
votes
2answers
474 views

Google Chrome ignores XmodMap key mapping

My laptop Down arrow key is stuck on, so I have used Xmodmap to remove the mapping of that key with the following command: xmodmap .Xmodmap The contents of my .Xmodmap file is just the single line:...
3
votes
0answers
155 views

How do I remap my CAPS Lock key to Hyper?

I tried this guy's solution, but I got the following error: X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 118 (...
4
votes
2answers
1k views

How do I remap the caps lock key to the backspace key?

I have grown very comfortable to my Colemak keyboard layout (my typing speed has doubled since I started using it). My only problem with it is that there is no caps lock key because under this layout ...
2
votes
4answers
2k views

How to map <modifier> + hjkl to arrow key functionality?

I've been getting so used to vim's hjkl for moving around recently, and find myself wanting to use them right after alt tabbing out of vim. What would be the best way to map fn + h/j/k/l to left/down/...
0
votes
0answers
141 views

Super key mapping

I am using Ubuntu 16.10. My super key doesn't work. xev output while pressing it : KeyPress event, serial 37, synthetic NO, window 0xa00001, root 0xe6, subw 0x0, time 47503, (-394,103), root:(...
0
votes
0answers
234 views

xmodmap does not always work

I remapped some function keys with xmodmap (e.g. F7 is now X86AudioPlay, F9 is X86AudioMute and vice versa). What I did is just xmodmap -pke > ~/.Xmodmap and then I swapped keycodes for function ...
3
votes
2answers
254 views

How to have programmer-friendly Dvorak with deadkeys in Ubuntu?

The current keyboard layout Dvorak with deadkeys is horrible. All those "¨` are under one key which is not practical for a programmer. OSX has well distributed programmer keys in Dvorak with ...
54
votes
9answers
39k 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 ...
10
votes
2answers
1k 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 ...
2
votes
1answer
142 views

Using grp:caps_switch with xkbmap for custom keyboard shortcuts

I want I J K L to function as arrow keys when CapsLock is pressed down. To do this, I pasted the following to the bottom of the /usr/shar/X11/xkb/symbols/pc file: partial partial alphanumeric_keys ...
0
votes
0answers
23 views

how can I map altgr to _

I would like to map AlgGr to _. How can I do that? I have tried: keysym keycode 135 = _ in my xmodmap config But it is not working.
12
votes
3answers
2k views

How to share two keyboard on the same laptop, french iso layout and usa ansi layout keyboard with usb?

I recently bought a "noppoo choc mini" with this specific ANSI US-INTERNATIONAL pc84 layout This specific keyboard only has 84 keys, a 60% (compact tenkeyless) reduced layout. My problem is simple, ...
10
votes
2answers
2k 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 ...
2
votes
1answer
88 views

Custom keymapping is lost after rebooting

I've wanted to remap my print key on my Thinkpad T460p because Lenovo decided it would be more useful than the context menu ("Menu" which is basically the right mouse-) button. It tried a solution ...
2
votes
4answers
6k views

Chromebook: Map Search Key to ctrl, ubuntu

I've got ubuntu running on chromebook using crouton. How do I map the search key to the ctrl action. Similar to this, swapping the caps lock key and the ctrl key. /usr/bin/setxkbmap -option "ctrl:...
0
votes
0answers
51 views

xmodmap - Reassign alt + Up to Up,

I have remapped my Up arrow to be my Right Shift key, and vice versa, as such: keycode 111 = Shift_R Up Shift_R keycode 62 = Up NoSymbol Up I cleared the shifts as I'm supposed to etc. and this ...
7
votes
2answers
11k 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 12" ...
7
votes
1answer
1k views

Howto to set AltGr key with xmodmap

I use a us-intl with "AltGr dead keys" layout and the option to switch Alt and Win key. Nice, but my AltGr does not work. The key I want to use for AltGr has keycode 134 (found out using xev). So I ...
1
vote
2answers
524 views

Running Key Remap Script at Startup

I'm trying to re-map my left Alt key to the Alt Gr and Alt Gr to Left Alt. So far I've been able to do it in terminal, but it never runs it on start up. I've read multiple AskUbuntu questions, but ...

15 30 50 per page