Skip to main content

Questions tagged [xmodmap]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
18 views

How to find the keycodes for remapping Control and Super keys using xmodmap on X11

I am trying to swap my Super_L and Control_L keys on my keyboard. I determine the keycodes for remapping these keys using xev, showkey, and xmodmap itself. They provide me different keycodes but none ...
Lone Wolf's user avatar
0 votes
0 answers
24 views

Setting modifier using xmodmap

I am using GNU/Linux (Devuan) with the mate desktop and with i3wm. I would like to assign mod1 to Meta_L. If I show the current assignment with $ xmodmap I get mod1 Alt_L (0x40), Meta_L (0xcd)...
Giorgio's user avatar
  • 807
0 votes
0 answers
8 views

Swap touchpad button 2+3; ignore touchpad button 2; make key work as button 2

My touchpad's middle button is sick: It activates at random times (Maybe it was the juice I spilled on it, who knows?). I use the middle button all the time, but I have simply remapped button3 and ...
Ole Tange's user avatar
  • 35.8k
0 votes
0 answers
32 views

I can't bind Meta-h to backward-kill-word using bash/readline for my xterms

redhat-release: Red Hat Enterprise Linux Workstation release 7.4 (Maipo) bash version: 4.2.46(2) xterm version: X.Org 7.6.0(295) I'm using xmodmap to map my Meta keys correctly. Confirmed this via ...
eh3's user avatar
  • 1
1 vote
0 answers
58 views

keyboard FN keys send ctrl+a, ctrl+c, ctrl+v instead of unique events

I have a keyboard whose F2, F3, F4 keys send ctrl+a, ctrl+c, ctrl+v events respectively instead of a unique keycode which could be remapped easily using xmodmap keycode mapping. My goal is to use the ...
ealfonso's user avatar
  • 955
0 votes
0 answers
48 views

How to run script after input device is added?

I want to run a script, when I add an input device. On the one hand I need to run xmodmap, when an external keyboard is added to get there my key bindings. I achieved that already partial with a udev ...
Len Bauer's user avatar
0 votes
0 answers
43 views

Unable to map Alt + Shift+ <key> with xmodmap

xmodmap -e "keycode 64 = Mode_switch" xmodmap -e "keycode 43 = h H NoSymbol Left" xmodmap -e "keycode 44 = j J NoSymbol Down" xmodmap -e "keycode 45 = k K NoSymbol ...
Saikiran's user avatar
  • 101
0 votes
0 answers
53 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
345 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,301
2 votes
2 answers
1k 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
42 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
1 vote
1 answer
65 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
380 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 ...
psygo's user avatar
  • 201
1 vote
0 answers
222 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
  • 53
1 vote
0 answers
202 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
74 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
2k 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
50 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
4 votes
1 answer
3k 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
  • 43
1 vote
0 answers
166 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
140 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
110 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
144 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
93 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
254 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
338 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
126 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
156 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
1k 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
615 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
301 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
3 votes
0 answers
698 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
  • 81
0 votes
0 answers
390 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
2k 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
1k 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
1 vote
1 answer
1k 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
  • 487
3 votes
1 answer
656 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
2k 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
  • 331
0 votes
0 answers
602 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
108 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
1k 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
3k 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
  • 137
0 votes
1 answer
390 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
194 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
507 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
  • 221
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
115 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
4k 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
74 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

1
2 3 4 5 6