xmodmap is a tool for manipulating keymaps and pointer button mappings in the Xorg environment.

learn more… | top users | synonyms

3
votes
4answers
2k views

Turn NumLock on on startup?

I usually edit in Vim,and when pressing +, I'd rather move my hand to the right part of the keyboard where + resides rather than doing shift + =. But when NumLock is not on, in Vim it just opens a ...
1
vote
0answers
6 views

read .Xmodmap on login in Cinnamon

I am running Linux Mint 17 and want Cinnamon to read from my .Xmodmap on start. Seems that ~/.Xmodmap is not being read by default. How do I do that?
1
vote
1answer
39 views

convert .Xmodmap to custom.xkb file and load it from $HOME directory - customize x keyboard [duplicate]

I use the following .Xmodmap file to map a few symbols and German Umlaute öäü: keycode 108 = Mode_switch keycode 13 = 4 dollar EuroSign keycode 19 = ...
1
vote
0answers
19 views

Map ctrl+key different from typing key in xkb or xmodmap

Is it possible to map ctrl+key different from regular typing key in linux? I have done it in windows with MSKLC but can't figure out how to do it in linux. E.g. I want to type dvorak but have regular ...
9
votes
1answer
2k views

Relationship of keyboard layout and xmodmap

I'm using Xubuntu. Before login I can choose a keyboard layout. I'm using xmodmap for remapping some keys. I'm interested in two things: How the state of keyboard mapping changes (a) when I turn ...
1
vote
0answers
26 views

Global vim-like (hjkl) navigation with numlock & xmodmap?

I'd like to be able mimic vim's hjkl navigation everywhere in the system by utilizing num lock (or scroll lock), and making hjkl keys act as arrows whenever num lock is on, and regular behavior ...
1
vote
0answers
40 views

Can I xmodmap only a specific keyboard?

I'd like to swap some keys but only in external keyboard. Is this possible with xmodmap? I've found this question: Can I Xmodmap only a specific device? but it refers only to mouse. I found here ...
2
votes
1answer
205 views

xmodmap hanging the system for 20 secs and not sticking

I edited the keyboard map using xmodmap as per https://wiki.archlinux.org/index.php/Xmodmap, and I have two problems: executing xmodmap ~/.Xmodmap completely hangs the system for 15-25secs, which ...
1
vote
0answers
15 views

How to map S-Up to Down? [duplicate]

The down key on my laptop is broken. I want to map shift+up to down. My original layout had (from xmodmap -pke) keycode 111 = Up NoSymbol Up keycode 113 = Left NoSymbol Left keycode 114 = Right ...
2
votes
1answer
87 views

Xmodmap syntax for rebinding Shift+Down to Up

I would like to rebind some keys on Linux via Xmodmap. Left and up cursor on my Acer (yes, I know) laptop have broke. I would like to map shift+down to up, and shift+right to left. Struggling to ...
4
votes
0answers
27 views

Why do my xmodmap binds involving AltGr only work one some keys?

I want to remap my AltGR+Right_Windows but I can't figure out how. No matter what I try, pressing the right windows key emits the name keysym when right alt is pressed or not. These are the contents ...
1
vote
1answer
47 views

Why isn't X treating ALT_L and ALT_R differently w/r/t Mod1

I have changed the definition of Mod1 via xmodmap to not include ALT_R (to understand why scroll to the bottom). The current layout of the modifiers is below. Despite ALT_R not participating in the ...
5
votes
3answers
4k views

How to permanently swap esc and caps lock in xfce / xubuntu?

I followed some post a while ago, and it said to make an ~/.xmodmap file like so: ! Swap caps lock and escape remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = ...
1
vote
0answers
37 views

Why could sudo be required OUTSIDE of shell script but not INSIDE of shell script? [closed]

Using the command xmodmap -e "keycode 66 = Hyper_L" in the console requires sudo. Putting the command xmodmap -e "keycode 66 = Hyper_L" inside a shell script does NOT require sudo (that is, I don't ...
0
votes
0answers
33 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). ...
1
vote
0answers
19 views

particular Laptop key has no keycode (found with xev from Xorg) [duplicate]

that following key should be XF86AudioLowerVolume, but it has not even a defined keycode, i could assign the function of XF86AudioLowerVolume. I've used xev to find that out. I'm using debian Jessie ...
1
vote
2answers
62 views

Can Xmonad treat left and right alt differently?

I have an application that utilizes ALT_R+ENTER to perform a function. When using this application in Xmonad, the combination Mod1+ENTER triggers the function "swap the current window with the master ...
18
votes
1answer
1k views

Keymapping problem when working with Emacs and Openbox

I have an Apple keyboard and I had to do some remapping of the keys to make the mod-4 key the first key to the left of the Space bar for when working with Emacs. The below script worked fine when I ...
0
votes
0answers
12 views

Prevent touchpad from switching to secondary click

So I'm trying to change the primary click on my touch-pad to left-handed with xmodmap -e "pointer = 3 2 1". it changed successfully, but there is one functionality I'd like changed. The touch pad ...
2
votes
1answer
213 views

Changing specific keys on Apple keyboard under Fedora 22

I'm trying to change some specific keys on my USB Apple keyboard running Fedora 22. Just spent three days searching for an answer and trying different solutions, I ended up using xmodmap and still ...
8
votes
4answers
13k views

Switch Fn key state

I have this issue with Lenovo Thinkcentre Edge. Its keyboard has Fn key, which acts in my Ubuntu (with Fluxbox) as if it is always "active/pressed". I can't use standard F1-F12 keys unless I hold ...
1
vote
1answer
130 views

Set global xmodmap in Debian

I currently have xmodmap setup for my user so I can type certain special characters. However, this only applies to my user, and I need these characters to be type-able everywhere, for all users. Is ...
1
vote
0answers
37 views

Why does Caps Lock key behave as Caps Lock key without the Lock modifier?

At first, there is no key mapping. The Caps Lock key on my keyboard behaves as Caps Lock. lone@debian:~$ xmodmap -pke | grep Caps_Lock keycode 66 = Caps_Lock NoSymbol Caps_Lock lone@debian:~$ ...
1
vote
1answer
54 views

After mapping Caps Lock to Escape using xmodmap, how to revert Caps Lock back to Caps Lock without altering Escape key?

I have mapped my Caps Lock key to function as Escape using this command. xmodmap -e "remove Lock = Caps_Lock" -e "keysym Caps_Lock = Escape" Now how can I undo this mapping? I tried the following ...
1
vote
1answer
416 views

How do I enable Shift Lock? (Sticky shift key)

I want to map one of my keys the shift lock key. In my understanding, the shift lock key is a kind of a 'sticky' shift key: it remains pressed, shifting all keys of the layout until pressed again. It ...
1
vote
1answer
76 views

Remapping both Caps Lock and Windows keys to be separate modifiers

I want to use both my Caps Lock key and Windows key in my i3wm config. In particular, I want Caps Lock to take the place of $mod in the config and I also want to be able to reference the Windows key ...
1
vote
0answers
45 views

Remap key to two modifers or use meta shortcuts in terminal (terminator)

Background: Running Arch Linux on KDE. KDE shortcuts have a problem with being saved past reboot so i'm using xmodmap and xbindkeys. So I am using xmodmap. Right now caps lock is mapped to meta ...
1
vote
1answer
265 views

How Are Keys or Keycodes Mapped to X Key Symbols?

I am trying to map a function key combination to an XF86 key symbol. The key combination is Fn+F1, which I was able to use showkey to get the raw keycode for. jason@io ~ $ showkey kb mode was RAW [ ...
4
votes
1answer
784 views

F4-key mysteriously reassigned

In the middle of today, my F4 key started producing the letter p, without my conscious acting and I can't seem to revert this change. Whenever I press F4, p appears instead. How can I change this ...
0
votes
0answers
19 views

Globally bind C-m to RET (preferably using Xmodmap)

I have learned to use C-m, C-i, and C-h in the terminal, and would like to bring over at least C-m to a global scale as I have yet to use it in many applications. Anyone know how to do this via ...
13
votes
3answers
7k views

How to prevent the caps-lock toggle effect, without remapping or disabling it?

I have an X11 program that grabs caps-lock, and uses it. The problem is, I want to disable the regular caps-lock toggling, but doing so seems to disable the key. So whatever X11 gets for a caps-lock ...
0
votes
1answer
68 views

change keyboard layout

i have hp pavillion g6 running manjaro, the keyboard looks like this, i broke both shift, the left ctrl and the caps lock... hmm while trying to clean it... i don't really care about ctrl, the other ...
3
votes
2answers
309 views

How do I bind AltGr+key to a symbol?

I want to bind AltGr+W to æ, and some other combinations, how can I do this? I also need AltGr+Shift+W to Æ. I normally use setxkbmap to change the keymap.
1
vote
0answers
104 views

xkbmap remap PrtScr and Insert Keys to Home and Escape

I've been fumbling with xkbmap for a while, and I can't figure out how to remap the Print Screen button to Home. It's as if the us keymap just doesn't mention the PRSC key code at all. I can't use ...
3
votes
1answer
72 views

Create xkb configuration from xmodmap

I have a custom xmodmap file I use, including useful multi-language diacriticals, english quotes, dashes &c. I want to use this map with kmscon, so I need to create a xkb configuration from it. Is ...
1
vote
1answer
464 views

Map Right Alt to Alt instead of AltGr

I have a Kinesis Advantage keyboard and I'm trying to make it so that my right and left Alt keys do the same thing. Currently the left Alt key works as expected but the right Alt key just allows me to ...
2
votes
0answers
287 views

How to permanently remap caps lock to esc in X11?

I want to remap caps lock to escape in X11 (i.e. pressing the physical caps lock button will be interpreted as esc by applications and esc's behavior will not change). The solution must survive an X ...
2
votes
0answers
162 views

Missing KeyPress event

I got new thinkpad and it's missing a ContextMenu key and has PrintScreen key where ContextMenu should have been. I remapped it using xmodmap. The problem is, the key is missing KeyPress events, only ...
4
votes
2answers
374 views

xmodmap keybindings don't work

I am trying to use Xmodmap to add some german diareses/umlauts to my keyboard, but Xmodmap is not working with them (but is with other remappings). I am following this guide: German Umlauts on US ...
0
votes
0answers
42 views

Some apps don't swapped alt&win after xmodmap runs? (GUI emacs)

I have a mac-book-air. I swapped my Alt & Win with xmodmap as per linux post like so: keycode 64 = Alt_L keycode 133 = Super_L remove Mod1 = Alt_L remove Mod4 = Super_L add Mod1 = Super_L add ...
4
votes
0answers
394 views

xmodmap for key combination - how to toggle the Fn behavior?

With Logitech K290 keyboard via USB, F. keys are not accessible by default, and I need to press Fn before using them, which is not really usable. The Fn key alone does not fire any event in xev. ...
2
votes
1answer
112 views

How to swap the Ctrl and Alt keys in ibus?

I swapped both sides of Ctrl and Alt using xmodmap. It is quite convenient to use Ctrl keys in Emacs, Emacs uses Ctrl key a lot. However, when I start ibus, the xmodmap stops working. I googled and ...
10
votes
4answers
5k views

Reassign Ctl and Alt keys - xmodmap error

I am attempting to remap my keyboard in order to make emacs usable. My ergonomic keyboard puts its single Control key in an isolated 4-key island way off to the left. The OS is Debian squeeze. Here ...
9
votes
2answers
1k views

Remapping power key to delete

I have a macbook pro running Ubuntu 13.10 with FluxBox. Unfortunately, the power button is physically above the backspace where I would expect the delete key to be in. In OS X, the PowerKey program ...
1
vote
1answer
214 views

How to map extended buttons on mouse?

I am trying to follow this guide to using a Logitech G600. I have (using a windows computer) mapped each key combo on the mouse to something on a normal keyboard. I have set up some rules in ...
4
votes
1answer
352 views

xmodmap shift + keycode to produce keysym

There seem to be few examples for how to use xmodmap to bind a modifier + some key, to a new key. E.g. I want to bind left Shift (keycode 50) + ` (keycode 21) to emit a grave accent character: ` ...
1
vote
1answer
203 views

.xsession executed on login in Linux Mint Cinnamon

I've put a command to change my keyboard mapping in .xession, but this does not appear to be executed on login in Cinnamon, although it seems to work fine on an older MATE box. Since first asking ...
32
votes
6answers
41k views

How to get keycodes for xmodmap?

I'm trying to use xmodmap to remap Alt / Super keys on Dell L100 keyboard, and have trouble getting the keycodes. For instance, using xev doesn't give me keycode for Alt FocusOut event, serial 36, ...
0
votes
0answers
139 views

xmodmap modified keyboard settings gets overwritten once in a while

I remapped capslock with xmodmap to something which is more useful (in fact I mapped it to F12 which I use as tmux command key, but that's not important here). Apparently this setting get's ...
2
votes
2answers
3k views

how to swap ctrl and capslock using xmodmap?

I know this xmodmap script can swap ctrl and capslock: remove Lock = Caps_Lock remove Control = Control_L keysym Caps_Lock = Control_L keysym Control_L = Caps_Lock add Lock = Caps_Lock add Control ...