Questions tagged [xmodmap]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
25 views

Remap keys including a modifier

I use an alternative german keyboard layout on Ubuntu 18.04: ~$ setxkbmap de koy Now I want to swap three keys (Mod3 → f → ß → Mod3) as shown in that picture: This are the keycodes for these keys: ...
0
votes
1answer
15 views

Remapping Caps Lock to Alt (Meta) in GNOME / X11

I'm looking to replace Caps Lock behaviour with the "Left Alt"/"Meta" modifier, in GNOME / X11. There are a few options to replace Caps Lock with Super, Ctrl, etc. in GNOME Tweak Tool, which seems to ...
0
votes
1answer
47 views

How to make xmodmap changes permanent? (reboot and resume)

Using xmodmap to remap meta key with the following command: xmodmap -e 'keycode 133 = F14' How can i make the change permanent, especially on system sleep/resume ?
0
votes
2answers
32 views

Trigger a certain key combo with another one

Can anyone suggest me on what would be the best way to trigger a certain key kombo with another one. Say, I'd like to send CTRL+= while pressing CTRL+[. Basically I want to workaround zoom for Google ...
0
votes
0answers
41 views

Vim statusline shows ^[[2;2R^[[>41;330;0c^[]10;rgb:e5e5/e5e5/e5e5^G^[]11;rgb:0000/0000/0000^G after mapping Capslock to Esc

I added au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' au VimLeave * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock' to my .vimrc to map Capslock to Escape. ...
0
votes
0answers
26 views

Keyboard issue with key 7 xmodmap

Here is a line in my xmodmap -pke output keycode 16 = 7 slash 7 slash bar backslash bar And the output of xmodmap -pm is xmodmap: up to 4 keys per modifier, (keycodes in parentheses): shift ...
0
votes
0answers
43 views

Remapping Capslock as Control: Capslock + Shift + 2 doesn't work

I have a Dell Precision M5530 and I am running xmonad as the DE, I've set up my system to map CapsLock to CTRL via the following: setxkbmap -option "ctrl:nocaps,altwin:swap_lalt_lwin" ## Set up ...
1
vote
0answers
100 views

xmodmap lost after sleep

In Ubuntu 18.04 I use the following autostart script: [Desktop Entry] Type=Application Exec=/home/user/.xinitrc Version=1.0 X-GNOME-Autostart-enabled=true Name=xmodmap Comment=xmodmap script which ...
0
votes
0answers
17 views

New entry in xmodmap creates new group instead of layer

Here is my dotfile: ! Key ! Shift+Key ! Mode_switch+Key ! Mode_switch+Shift+Key ! ISO_Level3_Shift+Key ! ISO_Level3_Shift+Shift+Key keycode 43 = h H BackSpace NoSymbol U20BD NoSymbol Cyrillic_er ...
1
vote
1answer
96 views

Some applications ignore Xmodmap settings

I am using the following ~/.Xmodmap keycode 133 = Mode_switch keycode 134 = Mode_switch keysym h = h H Left keysym l = l L Right keysym k = k K Up keysym j = j J Down keysym w = w W Prior keysym s = ...
0
votes
1answer
21 views

How to select text when Arrows, Home, and End are mapped to Mode_Switch+Letter

I managed to map the arrow keys, Home, and End to Mode_Switch+Letter (where mode switch is Caps Lock) as explained in this answer: Bind CAPS+hjkl to arrow keys; CAPS to ESC though if I want to ...
6
votes
2answers
487 views

How to map mouse keys as keyboard keys without losing'numeric keypad' for Linux?

I know how to map mouse click for F1, F2 and F3 (respectively left click, middle click, right click): xkbset m # required, but disable keypad xmodmap -e "keycode 67 = Pointer_Button1 ...
0
votes
1answer
32 views

configure non-modifier as a modifier key

This question is similar to: https://askubuntu.com/questions/33751/making-any-key-into-a-modifier-key I have a machine with a non-standard keyboard layout (lenovo x1 carbon) where the CapsLock key ...
3
votes
0answers
177 views

setxkbmap conflicting with xmodmap

So initially I had the following in my ~/.Xmodmap which mapped CapsLock+HJKL to left/down/up/right like in vim: keycode 66 = Mode_switch keysym h = h H Left keysym j = j J Down keysym k = k K Up ...
1
vote
0answers
64 views

Change Scan Code of Keys

In Windows I use sharpkeys to remap keys. On Mac I use Karabiner Elements to remap keys. Is there a preferably built in way to remap keys based on scan code? The advantage of this is that VirtualBox,...
3
votes
1answer
857 views

How to know what is super key?

I have this output of xmodmap command: shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Caps_Lock (0x42), Control_R (0x69) mod1 Alt_L (...
1
vote
0answers
159 views

xmodmap: Super modifier negates Mode_switch modifier when pressed together

Running Manjaro with i3wm. I mapped my Caps key to Mode_switch modifier with xmodmap. I am using it to turn WASD into arrow keys, and a few other combinations. Pressing Caps+W/A/S/D works as ...
1
vote
1answer
51 views

xmodmap: remapped Control_L not working for copying and pasting

After spending hours, I found that xmodmap can be used to remap / key to Left Control key. I used following command: $ xmodmap -e "keycode 94 = Control_L NoSymbol Control_L" Using xev, I find that ...
1
vote
0answers
93 views

Why Tab can't be modified with ISO_Level3_Shift

I am using a 40 key keyboard called daisy, I want to have a consistent layout of all my keyboards. The tab can't modified to other keys is kind a waste of resources. The relevant part in .Xmodmap is: ...
1
vote
0answers
357 views

How to alter level 3 meaning of keys with XKB

I had a neat little hack to get German "Umlaute" on a US ANSI keyboard with XModap. When I hold Caps-Lock, I get Umlaute in the places where they are on a German keyboard. Here my .Xmodmap file ...
5
votes
1answer
166 views

xmodmap key bindings reset when I open a new tab in the shell

When I open a shell in ranger with shift-s, open vim and then open a shell with :sh or open a new shell tab with ctrl-shift-t, my xmodmap keybindings (swapped caps lock and escape keys) are reset. ...
1
vote
1answer
40 views

xmodmap - L_Alt + ijkl as arrows (polish programmers layout)

I've created following xmodmap file: keycode 64 = Mode_switch (right Alt key) keysym j = j J Left keysym l = l L Right keysym i = i I Up keysym k = k K Down it works almost great, but. In polish ...
0
votes
1answer
610 views

how to load an xmodmap configuration file using .xinitrc

I am trying to figure out how to use my .xinitrc file to load an xmodmap configuration file. Although this seems to be a popular problem around the internet, I can't seem to get it working. I am ...
0
votes
1answer
80 views

How do I mapping Ctrl+Middle to Right-Click in X?

How do I mapping Ctrl+Middle to Right-Click in X? I aware "window manager"+"xdotool" maybe is a way,but such things now working for window manager itself and also possible more unexpected behavior.
0
votes
1answer
411 views

xmodmap not mapping Ctrl to Super except in Ubuntu's Keyboard Shortcuts

Post-mortem update: After wrestling with xmodmap for the better part of the morning, I found this answer perfectly solves the issue. The reason, I believe, is that xmodmap is not as powerful as xkb, ...
0
votes
1answer
47 views

Execute a command if F+J keys are pressed

What would I need to do if I wanted to execute: chromium & by pressing F+J ? Preferred requirements: Globally accessible across Desktop Environment Independent of terminal focus or not Without ...
1
vote
0answers
73 views

Fully remap a key to work as right alt

I'm using Linux Mint 18.3. My keyboard has a nonsensical key setup where I have an extra \ key right before the right alt, and I keep using it by mistake. Since I don't need the \ key there at all, I ...
2
votes
0answers
170 views

Turning the Escape key into a modifier that still acts as Escape when tapped

I use a tiling window manager (xMonad at the moment), and due to this I need a key that acts as the ‘control key’ for window management. Whenever I use a keyboard with Windows/Super/Mod4 keys, I use ...
0
votes
1answer
83 views

XTerm*metaSendsEscape broken when Alt_R is mod4

I can't get xterm to behave correctly re: the metaSendsEscape setting. When I have this as my Xmodmap, the setting doesn't work (i.e., xterm ignores the Alt keys even when metaSendsEscape is enabled):...
2
votes
1answer
192 views

Advanced key mappings in linux

I am using manjaro i3 and am looking into revamping some of the key mappings I have made. Currently I am using xcape, xmodmap, and setxkbmap commands to remap the following keys: caps to contol when ...
7
votes
1answer
534 views

How to map extra keys in linux?

I'm running archlinux on my thinkpad x1 carbon 5th gen which has some extra keys. These keys currently do nothing and I'd like to remap them. Firstly, I tried getting their keycodes via xev but they ...
2
votes
0answers
325 views

Mapping key using xmodmap changes multiple keys

I am running Ubuntu server 16.04. Not sure if this matters, but I am forwarding the screen to a browser using XPRA. All works reasonably well except for a few pesky key combinations. I am using a GB ...
1
vote
1answer
164 views

AltGr special character binding

Is there a way to bind AltGr-modifiers to other special characters? I use a UK Macintosh keyboard, but need Norwegian letters. I can access ø and æ with AltGr-o and AltGr-a, but there is no å: /ɔːˀ/. ...
0
votes
1answer
46 views

Rebound shift key still acts as shift key

I have rebound my right shift key (keycode 62) to act as the up arrow by replacing Shift_R in its keysym with Up: $ xmodmap -e "keycode 62 = Up NoSymbol Up" However when using the key, some ...
1
vote
0answers
45 views

How can I remap Ctrl_Left + button to one action, and Ctrl_Right + button to another?

In my particular example, I want to be able to remap Control_left + n to output LeftArrow, but also to Control_right + n to output Return. How can I do that? I red through xmodmap man, so as xbinkeys, ...
0
votes
1answer
227 views

Running xmodmap trough systemd

I have a script that remaps escape to caps lock. I normally call the script manually with xmodmap /home/myusername/.Xmodmap; .Xmodmap is a file that contains: remove Lock = Caps_Lock keysym Escape =...
1
vote
1answer
163 views

xmodmap Remap Left Mouse to Right Mouse

What I've tried: xmodmap -e "pointer = 3 2 3" xmodmap -e "LeftMouse = RightMouse" What am I doing wrong?
1
vote
2answers
1k views

`xmodmap` not working on startup

I recently installed Debian 9 and inserted my usual ~/.Xmodmap file and added xmodmap ~/.Xmodmap to my .xsession. To my disappointment this didn't actually work. For reference, I run i3 from startx ...
1
vote
0answers
457 views

Remapping Caps Lock to left control, and left control to Super key using xmodmap

I've been checking out other questions regarding xmodmap, but couldn't find a solution to my situation. I got an old IBM keyboard that doesn't have a Windows/super key, and would like to remap the ...
0
votes
1answer
89 views

keyboard remap has killed keyboard

Following a post at fascinatingcaptain, I tried remapping F1 to the g key, as my g key has bitten the dust due to mechanical reasons. I added an entry: key <FK01> {g} ; (getting the "g" by ...
0
votes
0answers
76 views

xmodmap breaks my setup when I run it a second time

I have a .xmodmap file stored in my home directory ( I am using Debian 9.0 and Gnome). When I activate with a command $xmodmap $HOME/.Xmodmap in the terminal, everything is fine. But when I enter ...
2
votes
0answers
149 views

Modify only one keyboard layer in .xmodmap

My default keyboard layout looks like this $ xmodkeymap -pke ... keycode 38 = a A a A ae AE ae AE a A ae AE ... I want to modify the part of the layout where mode_switch is pressed, that is, ...
1
vote
0answers
326 views

Map ACPI events to X keys (or to custom commands)

Some of the multimedia keys on my Lenovo X1 Carbon aren't recognized by xev. Each time I press the "volume down" key, for example, I get an output that looks like: FocusOut event, serial 34, ...
1
vote
1answer
93 views

Latching group in xmodmap / core protocol mappings (XChangeKeyboardMapping())

This question should probably go to retrocomputing since people should use XKB, but I am really curious how did they latch group switching with xmodmap / XChangeKeyboardMapping(). I read xmodmap man ...
1
vote
0answers
305 views

Swap touchpad buttons independently of the touchpad

I use a Lenovo X250 with Debian. I have a touchpad with 3 physical buttons on top. Using xev I can see that these correspond to buttons 1, 2, and 3. Additionally, the touchpad itself can be pressed....
1
vote
2answers
1k views

F1-F12 keys don't work

I bought compact keyboard. F1 = Fn + 1 and F2 = Fn + 2 ... But F1-F12 keys don't work on my Ubuntu 16.04. For example F1 makes brightness up. I checked keycodes of F1-F12 keys and they are invalid. ...
1
vote
0answers
67 views

How to translate modifier + key(control + space) into another modifier(shift)?

I'm using Ubuntu 16.04. I've tried xmodmap, xbindkeys + xdotool with no luck. Here's an example solution that I've tried with xmodmap. xmodmap -e "keycode 65 control = space Shift_L"
1
vote
1answer
365 views

xmodmap not working for Alt-a

So, I am trying to map Alt-A to the right arrow. I followed 'xev and xmodmap' approach described here and came up with this: xmodmap -e "keycode 38 mod1 = Right" which fails miserably: when I press ...
1
vote
1answer
139 views

Terminal does not accept some typed-in unicode characters

I need to troubleshoot why typing in some unicode characters in my terminal won’t work. I use a non-qwerty keyboard layout (namely neo) which allows me to directly type in unicode characters such as ...
5
votes
1answer
1k views

What files does the Gnome Tweak Tool act on (when changing the Typing settings)?

I've saved the output of $ xmodmap -pke in ~/.map1. Then, I have changed some settings through the Gnome Tweak Tool (say, to keep it simple, I swapped Esc and Caps Lock). Then I again saved the ...