Questions tagged [xmodmap]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Mapping upper left esc key to fn

Is it possible to map the upper left esc key to fn? How? Apparently xmodmap is deprecated and you should use something like setxkbmap instead. I tried something like: xmodmap -e "keycode 1 = 464&...
justsome631's user avatar
1 vote
1 answer
43 views

How to remap keys to work with KVM switch

I have a KVM switch for which the hot-key is <scroll lock> <scroll lock>. The hot key lets me switch the keyboard, video and mouse from a Windows machine to a Linux machine, but not vice-...
StrongBad's user avatar
  • 5,151
2 votes
2 answers
86 views

How to remap a regular key into a modifier key (Shift...) in Linux

On my new laptop keyboard, there's a strange key next to my shift key. Frankly it's useless to me and having a shorter shift key doesn't let me reach some of the combinations that I was used to. I'd ...
henry_the_brave's user avatar
0 votes
1 answer
35 views

Is it possible to change Alt_R+8 = bracketleft to Alt_L+8 = bracketleft

When pressing Alt_R+8 it prints XKeysymToKeycode returns keycode: 34 and I started to wonder if it's possible to emulate this with different key combo. It's a pain to output brackets using right alt ...
geesebeater's user avatar
0 votes
1 answer
27 views

setxkbmap and xmodmap often stop working

I have a script to: Set the keyboard layout to include accents Set capslock as mod when held Set capslock as escape when pressed It looks like this: setxkbmap -rules evdev -model evdev -layout us -...
indeedwatson's user avatar
0 votes
1 answer
60 views

Map <C-S-A-hjkl> to Arrow Keys with XKB Map

I'm trying to also have access to my arrow keys from the default Vim hjkl. Since CtrlShiftAlt seems to be a rare key combo, I was thinking about using that. How would I do that using setxkbmap (or ...
Philippe Fanaro's user avatar
1 vote
0 answers
79 views

Xmodmap not working and changes not being register outside XEV

I am noob, so I'm a little overwhelmed by all of this. I am using manjaro. What I am trying to do is to remap the greater and less keys to the position of the colon and period since the keyboard I use ...
Educpf's user avatar
  • 41
1 vote
0 answers
67 views

How to keymap using Xmodmap in Linux Mint?

I am having a problem key mapping my left ctrl key to right click. When I run the command, it does nothing. I am trying to key map my left ctrl key to right click because my right click suddenly ...
Ok.'s user avatar
  • 11
1 vote
0 answers
50 views

Xmodmap doesn't work on Linux Mint 19

I am trying to run the command xmodmap -e "keycode 37 = Pointer_Button3" which should switch the ctrl to right click mouse button. However, it doesn't work. Why? I try to check the key event ...
guest12345's user avatar
1 vote
1 answer
704 views

How can I bind "modifier + arrow" keys to home/end/pageup/pagedown under X?

I have a new 60% keyboard (NuPhy Air60), but it does not have any way to trigger pageup/pagedown or home/end keys. My goal is to recover these commands with a custom keybinding, using a modifier key ...
ChaseMoskal's user avatar
0 votes
1 answer
49 views

Key mapping: printable char key (like a/s/d/f) mapped to control?

Is it possible to use xmodmap or xkb to turn a key that usually inserts characters (like a/s/d/f) into a modifier key? I try xmodmap with what I thought would work, e.g., add Control = a, but this ...
Maciek's user avatar
  • 3
0 votes
0 answers
19 views

How do I use xmodmap; Remap f1~12 function keys [duplicate]

Because my keyboard is 61 keys, and the fn key is in the lower right corner. If I want to use the F12 key. It will be very inconvenient. I want to remap f12 to Right_ Alt++(=) sign f1 = R_ Alt + 1 f2 =...
wang hengxing's user avatar
3 votes
1 answer
1k views

How to use setxkbmap to map keys permanently?

I'm currently using xmodmap to remap some keys, keeping my configuration in a .Xmodmap file, but every time I boot my laptop, or my screen locks, the customization is lost and I have to run xmodmap ~/....
Lucas's user avatar
  • 33
0 votes
0 answers
15 views

How to remap Alt_R as Mod1 for Cyrillic layout to work

I remapped Alt_R to Super_R. .Xmodmap remove mod1 = Alt_R 2 keycode 108 = Super_R 3 add mod1 = Alt_R But when I change layout to Cyrillic, xev shows keycode 108 (keysym 0x0 nosymbol) for Alt_R. This ...
u0_'s user avatar
  • 1
1 vote
0 answers
114 views

Why is .xmodmap automatically executing?

I'm running xubuntu 22.04. For years I have used a startup command in Session and Startup to remap the keyboard: /usr/bin/xmodmap /home/xxxxx/.xmodmap. After performing do-release-upgrade to 22.04, ...
Robert McDonald's user avatar
2 votes
0 answers
127 views

ctrl+shift+tab with Caps Lock as ctrl does not work with xmodmap

I'm using the following template from https://wiki.archlinux.org/title/Xmodmap clear lock clear control clear mod1 clear mod2 clear mod3 clear mod4 clear mod5 keycode ...
Jay Lee's user avatar
  • 121
2 votes
0 answers
82 views

Super L Key Double-Triggering Whisker Menu in Xubuntu

Before upgrading to Xubuntu 22.04 I would tap the left Windows key (Super L) and it would open the Whisker menu in xfce. After upgrading, whenever I hit that same key, it is as if I typed it twice in ...
wspeirs's user avatar
  • 121
1 vote
0 answers
90 views

How to keep keyboard mapping after reboot?

In order to remap my keyboard I use the following commands: $ setxkbmap -layout fr -variant latin9 -option '' $ setxkbmap -option ctrl:nocaps $ printf "keycode 127 = Caps_Lock NoSymbol Caps_Lock&...
crocefisso's user avatar
0 votes
1 answer
81 views

Linux Mint 21 - ctrl + 5 not sending any input and discarding xmodmap changes

Yesterday, I updated Linux Mint to version 21. With that update, one small but for me huge issue creeped into the install. I often play FFXIV on this computer, and I have keybinds with a MMO mouse, ...
Eredom's user avatar
  • 1
2 votes
1 answer
113 views

How to remap Caps Lock to a specific key?

By default I have the following key mapping: $ xmodmap -pke ... keycode 49 = oe OE oe OE leftdoublequotemark rightdoublequotemark leftdoublequotemark ... keycode 66 = Caps_Lock NoSymbol Caps_Lock ......
crocefisso's user avatar
1 vote
0 answers
231 views

How to map mouse button to keyboard keys using xmodmap and xev

I use xmodmap and xev to bind my keyboard key to mouse button but when i try to map my mouse button to keyboard key it doesn't work, I can't get the mouse "code" using xev. Does xmodmap only ...
Guest162's user avatar
0 votes
0 answers
87 views

Key combination don't work with xmodmap?

The tab key on my laptop is broken, and keyboard replacement will arrive in 1 month, life is a lot harder without tab key. I've replaced my fn key to emulate tab key and it work well. xmodmap -e '...
qxxt's user avatar
  • 1
1 vote
0 answers
83 views

Continous scroll with xmodmap

I would like to emulate the function of a mouse-wheel with keys using xmodmap. For this reason I mapped Alt+Shift+J and Alt+Shift+K to mousewheel up and down like this: xmodmap -e "keycode 44 = j ...
GaugeSym's user avatar
1 vote
0 answers
769 views

How to run a command at startup using Startup Application Preferences [Pop!_OS 22.04 LTS x86_64]

I have a script and want to run it at startup for all users. My script located in: ~/shell_script/swapkey.sh #!/bin/bash xmodmap ~/.Xmodmap I followed the instruction in here and then added the ...
Pham Hung's user avatar
1 vote
0 answers
419 views

How to make changes made with xmodmap permanent

On my laptop, I have to enter angled brackets with Fn+l for < Fn+Shift+l for > and Fn+AltGr+l for | which is extremely awkward, so I'd like to change that to AltGr+ö for < AltGr+ä for > ...
lineinthesand's user avatar
0 votes
1 answer
181 views

Help with xmodmap example from archwiki

This article: https://wiki.archlinux.org/title/xmodmap#Reassigning_modifiers_to_keys_on_your_keyboard Has an example: clear lock clear control add control = Caps_Lock Control_L Control_R keycode 66 = ...
Jordan Mandel's user avatar
2 votes
0 answers
411 views

How to set Caps Lock as Hyper (and change modifiers) using xkb?

This is currently my .xsessionrc file: xmodmap -e "remove Mod4 = Hyper_L" -e "add Mod3 = Hyper_L" -e "lock = Hyper_L" -e "keysym Caps_Lock = Hyper_L" & ...
cidra's user avatar
  • 121
0 votes
0 answers
257 views

problem with xmodmap NoSymbol

so my keyboard got water-damaged and subtract key(the one in the num pad area) is randomly repeating itself so I wanted to disable the key with xmodmap -e 'keycode 82 = NoSymbol' and when i run ...
alitkp's user avatar
  • 1
0 votes
2 answers
1k views

How to swap / remap the Escape key with backtick (`) and Caps-lock with Escape Key

So I just bought a 60% keyboard, and I didn't realize that the backtick doesn't have it's own dedicated key. This is problematic as I write a lot of Markdown and JavaScript. It seems like swapping the ...
Tom's user avatar
  • 195
1 vote
0 answers
897 views

How to remap the AltGr key on wayland?

I'm trying to have the "regular Alt" instead of the AltGr key, this is because it would be more easily to me work with emacs with that setting. I tried to change the keysym with xmodmap but ...
David Barrios's user avatar
0 votes
1 answer
810 views

In Linux Mint 20.2 how to execute xmodmap at startup

I use Linux Mint 20.2 (with Mate desktop environment). I need to make permanent some modifications of the keyboard mapping, as explained in the chosen answer to this question. In other words, I need ...
Fabio's user avatar
  • 407
3 votes
1 answer
453 views

How do I remap Caps Lock to Tab?

I've seen this trick to rebind keys using dconf, but it only seems to work for some target keys: dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:ctrl_modifier']" This works ...
lokus's user avatar
  • 133
0 votes
0 answers
23 views

Can I trigger xmodmap on USB keyboard connection, as a user? [duplicate]

I remap my Right Alt to Compose with xmodmap in my .profile. But when I disconnect my USB keyboard and reconnect it I have to rerun xmodmap for it to take effect again. Is there a way, I suspect as a ...
Chris Wesseling's user avatar
0 votes
1 answer
1k views

How to get a keycode from my mouse's side button?

In my .bashrc, I would like to add this line : xmodmap -e "keycode 135 = Return" where the keycode number is the one from my mouse's side button. To find a keycode from the keyboard, I use ...
Cedric's user avatar
  • 311
0 votes
0 answers
527 views

Map Escape to caps lock in vim not working in Fedora 34

I am new to Fedora and I have installed Fedora-34 couple of days ago. Well, when I used ubuntu, I mapped my Esc to CapsLk in vim using following lines in ~/.vimrc file au VimEnter * silent! !xmodmap -...
ajinzrathod's user avatar
1 vote
0 answers
87 views

Keyboard layout (xmodmap) on plugin depends on Desktop used? (e.g. KDE)

I'm using a wireless keyboard with modified layout as per ~/.Xmodmap. Using exactly this file name ensures that after disconnecting and reconnecting the keyboard, the mapping is okay. But not on a ...
Rob's user avatar
  • 21
2 votes
1 answer
807 views

Swap super and ctrl keys in xmodmap

I'm trying to swap my ctrl and super keys. I currently have successfully mapped the super keys to ctrl, now I need to map the ctrl keys to super, but I can't find a way to do so. Current code: ! Map ...
limao777's user avatar
1 vote
1 answer
2k views

How to swap Left Alt with Right Alt

How to swap the keys and make Left Alt act like AltGr as well? I tried xmodmap with the following: clear mod1 clear mod5 keycode 108 = Alt_L Meta_L keycode 64 = Alt_R Meta_R add mod1 = ...
banan3'14's user avatar
  • 115
0 votes
1 answer
258 views

Reassigning Right_Control from control modifier key to mod3 without using xmodmap

I am doing a task that is taking me longer than expected as xmodmap cannot be combined with other commands such as setxkbmap and so on. My goal is to change Right_Control key from been assigned on ...
freddie_ventura's user avatar
0 votes
0 answers
152 views

Super Keys cannot be remapped using xmodmap

I'm developing an application with a kiosk to it. It's an examination delivery platform, and I'm developing the Linux version through electron.js. I'm looking to kiosk the application by forcing a ...
Jinen Setpal's user avatar
1 vote
0 answers
409 views

What is a user-specific way to remap some keys, that is easy to backup

I wonder how I can remap some keys (especially modifier keys) in a way that will hopefully continue to work for the forseeable future, will probably work on different machines and preferrably use ...
Eike's user avatar
  • 191
2 votes
1 answer
2k views

Alt-Gr and keyboard level 3

PROBLEM: Alt-Gr is not functional under X11. It seems that keyboard level 3 (for 'at', 'euro', 'curly brackets', etc.) is not set up upon pressing Alt-Gr. In the text console (reached by Right-Shift ...
Frank-Rene Schäfer's user avatar
1 vote
0 answers
66 views

Help with remapping control to escape using xmodmap?

So I'm currently using this to achieve CapsLock + Anykey = Control + Anykey Shift + CapsLock = CapsLock clear lock clear control add control = Caps_Lock Control_L Control_R keycode 66 = Control_L ...
Nimai Patel's user avatar
1 vote
2 answers
3k views

Run shell command exectly one time at login

I am on Ubuntu 18.04 and trying swap Ctrl and CapsLock using xmodmap. But failed to find a way of doing that automatically: .[X|x]modmap[rc] and .config/autostart didn't work. What other ways are ...
vatosarmat's user avatar
2 votes
1 answer
67 views

How to activate a deactivated num_lock?

I use the following code to deactivate the num lock key. xmodmap -e "keycode 77 = """ How can I activate the num lock key again? I think I have to use something like: xmodmap -e &...
Kian Maleki's user avatar
3 votes
0 answers
438 views

How can I fully cuztomize my keyboard modifiers in xkb?

I am using a ThinkPad laptop with Arch Linux, and I am looking into the possibilities of remapping my keyboard layout + modifiers. What I want to do is similar to what you can do with the QMK firmware ...
mama's user avatar
  • 89
5 votes
1 answer
1k views

xmodmap resets when keyboard mode changes

I have a Keychron K2 mechanical keyboard and the keys on the righthand side of the keyboard look like this: I would like to swap them to a more standard layout, so that, from top to bottom, I would ...
gilbertohasnofb's user avatar
0 votes
0 answers
418 views

Ubuntu, disable "num lock" on startup using crontab

When I type this in a terminal I can disable the "num lock" xmodmap -e "keycode 77 = """ Now I want to disable it on startup. I type, sudo crontab -e It opens a nano ...
Kian Maleki's user avatar
1 vote
1 answer
410 views

How to remap Super key properly

I don't know why, but I've needed to remap my super key. It got erased somehow. I logged the keypress as 248 using xev, then used xmodmap -e "keycode 248 = Super_L" just to make sure the ...
Yehuda's user avatar
  • 207
1 vote
0 answers
139 views

Swap semicolon/colon to P unexpected cause semicolon/colon affected by Cpas Lock

I use xmodmap -e "keycode 47 = p P p P" -e "keycode 33 = semicolon colon semicolon colon" to swap P and semicolon/colon My expected behavior: semicolon/colon don't affected by ...
illiterate's user avatar

1
2 3 4 5 6