Questions tagged [xmodmap]

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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
46 views

Trouble changing Control_R to Shift_L

I have trouble changing my right control to left shift. The solution I had working in 18.04 was xmodmad /home/kameranis/.Xmodmap with the following contents. keycode 105 = Shift_L After upgrading to ...
kameranis's user avatar
  • 111
0 votes
0 answers
147 views

Remap keys with xmodmap

Ubuntu 22.04 running inside MS Hyper-V. I have used xmodmap to remap my left arrow key to right Control key. The Left key is broken. From xmodmap -pk , we can see 100 is Left key, and 109 is Control_R ...
anru 's user avatar
  • 101
0 votes
0 answers
94 views

How to use xmodmap to map Right-Alt to Super (Windows) key?

I'm stuck trying to map Right-Alt to the Super ("Windows") key; I'm on Kubuntu 22.04 LTS. The keyboard I'm trying to use is an IBM Space Saver Keyboard ("SSK", 84 key ANSI layout, ...
nerdfever.com's user avatar
0 votes
0 answers
60 views

How to remap 'Esc' with '~'

I have a laptop. The Esc key stopped working. I would like to swap it with ~ this key which is never used by me. I'm a complete beginner on linux. If anyone could help or point me in the direction of ...
Daniel Nixon's user avatar
0 votes
0 answers
81 views

ubuntu 23.04 overwrite my personal .Xmodmap settings

I have been using personal .Xmodmap keyboard settings since Ubuntu 12.04 to Ubuntu 20.04. But in Ubuntu 23.04 the OS constantly overwrites these settings by LOCALE ones and I need to restart them by &...
leoalvar's user avatar
0 votes
0 answers
94 views

Remap several key: Alt_L key to have the same behavior as Alt_R (or Alt gr) + remap caps lock to escape

I want to change the behavior of the Alt_L key on my keyboard (keycode 64) so that it has the same behavior as the Alt_R (keycode 108 or Alt gr) on Ubuntu 22.04. the output of the following command ...
ecjb's user avatar
  • 111
0 votes
0 answers
241 views

Remapping of key with xmodmap is detected by xev but not by other apps?

So as I bought a laptop with a foreign keyboard (qwerty but I type in azerty most of the time) I don't have any dedicated key for chevrons (<>). That's annoying, so I want to remap my right ...
rznrd's user avatar
  • 1
1 vote
1 answer
103 views

Need help converting Xmodmap to XKB

I've been using this .Xmodmap for years but now I'm switching to Wayland and I need to replace it: !remove Lock = Caps_Lock keycode 66 = Mode_switch keycode 108 = Mode_switch keycode 26 = e E ...
ojn06031's user avatar
0 votes
1 answer
145 views

Disable home key in keyboard

My home key keeps pressing every time I use my laptop's keyboard so I am using an external keyboard right now, disabling the entire laptop keyboard. But I want to use the laptop's keyboard as I feel ...
Can'tThinkOfMyUserName's user avatar
-2 votes
1 answer
77 views

How do I disable the page down (number 3) key?

My keyboard has gone mad and keeps pressing the page down/number 3 key, it happens quite frequently. I have an idea of how I can disable it but when I try to get it's keycode it doesn't give me any ...
Alajéa's user avatar
0 votes
0 answers
280 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
34 views

Capturing whether keycode 66 is associated with Hyper_L in bash script

I want to check whether keycode 66 is associated with Hyper_L by calling xmodmap -pke | grep "Hyper" and storing in a variable in a bash script. What can I do?
Fatipati's user avatar
  • 379
0 votes
0 answers
195 views

xmodmap remappings not working correctly in all applications

I remapped some of my keys using a Mode_switch with the following .Xmodmap ! remove Caps Lock clear lock clear mod1 remove Lock = Caps_Lock remove Shift = Caps_Lock keycode 66 = Alt_L Meta_L Escape ...
AstanVizu's user avatar
0 votes
0 answers
305 views

To disable rightclick on ubuntu desktop

I using Ubuntu 20.04 and GNOME desktop manager for end users to access the remote based application. Due to some reason, I need to restrict the Right-Click access on Ubuntu desktop. I used xmodmap to ...
Lakshminarayanan S's user avatar
1 vote
0 answers
109 views

How can I change my Right Ctrl Key to act as a backslash?

I wanted to be able to change my Right Control key to be backslash. I know that this is possible with xmodmap, however I couldn't make ubuntu run it on startup even if I put it in .xinitrc or .Xmodmap ...
TheBoogeyMan's user avatar
1 vote
1 answer
1k views

Ubuntu 22.04 how making rAlt + [hjkl] arrows keys

I have done this before on kubuntu but when I try to do this with xmodmap on ubuntu 22.04, the binds don't work. This is what I was using: xmodmap -e "keycode 108 = Mode_switch" xmodmap -e &...
Sam Broten's user avatar
3 votes
1 answer
2k views

xmodmap doesn't work anymore after upgrading to 22.04

I upgraded to the latest 22.04 LTS version this morning and after that my xmodmap script doesn't work anymore, i'm curious if something has changed that is causing the script to not work anymore. I ...
ijzeredraak5's user avatar
6 votes
0 answers
2k views

Mapping Left `Ctrl` and `fn` keys in Ubuntu 20.04.4 LTS

So I've spent a solid couple of hours trying to figure out how to remap a couple of keys on a Lenovo ThinkPad T440p laptop. This article from 2020 got me pretty close. It uses the xmodmap command to ...
Kevin Flowers Jr's user avatar
0 votes
0 answers
149 views

Key chords via xmodmap in 20.04

On macos I use a fabulous tool, Karabiner Elements, to obtain the ability to use the return key as a control modifier key when typed with another key. Same for the caps lock key. Now that I am moving ...
pajato0's user avatar
  • 111
1 vote
1 answer
493 views

Xmodmap: How to get Xmodmap on autostart

I am using "Ubuntu Xorg" inside of Ubuntu 21.10, cause on normal Ubuntu it was not possible for me to set up xmodmap inside of gnome applications (e.g. Firefox, LibreOffice, Terminal). My ...
Martin Kunze's user avatar
0 votes
2 answers
170 views

Xmodmap: On Lenovo Thinkpad T420 not working?

I use a Lenovo ThinkPad T450 laptop (Linux 5.13.0-28-generic x86_64) with a german keyboard layout. Unfortunately the greater and lesser key is not available on this setup. I can not switch the keys ...
Martin Kunze's user avatar
2 votes
1 answer
156 views

Mapping `del` functionality onto another key doesn't preserve single-press repeat functionality

My del key is working just fine with single-press repeat actin (i.e. if I keep it pressed, it keeps deleting characters) but if I try to map it (or the DEL functionality` onto another key, this breaks....
George's user avatar
  • 55
5 votes
2 answers
361 views

Hyper-key u --> Like Arrow-Up

I made CapsLock the Hyper-key via gnome-tweaks Sorry, I have only the german screenshot. "Feststelltaste" means "CapsLock" Now I would like to map Hyper-u to Arrow-Up Hyper-n to ...
guettli's user avatar
  • 1,787
3 votes
1 answer
1k views

Keyboard remap [Alt_L] + {ijkl} as arrow {Up, Left, Down, Right}

I want to use 'ijkl' together with alt to act like arrow keys. i.e. Alt+i = Up , Alt+K = Down etc. I have tried xmodmap following this answer. The answer says that Alt modified key is the third column ...
adal's user avatar
  • 31
1 vote
0 answers
338 views

Ubuntu 20.04 swap keys on apple magic keyboard of backticks and tilde sign

I upgraded to Ubuntu 20.04 from 16.04 and noticed that the tilde and backticks key has been moved to the key to left of number 1(!) and underneath ESC (sorry, I googled for the name but didn't find ...
jedi's user avatar
  • 529
0 votes
0 answers
116 views

Using AltGr + Home/PgUp/PgDown etc. for media keys (US International with AltGr Dead Keys)

For a while I have been using the CODE keyboard shortcuts in which you use the Fn key combined with Insert/Home/PgUp/Delete/End/PgDn in order to control media functions. I would like to do something ...
MariusSiuram's user avatar
1 vote
1 answer
1k views

Swap some keyboard keys

I would like to swap some keys, like Home and End on my keyboard. I did it using xmodmap, but this gets reverted every time my computer goes to sleep, and some applications, e. g. VSCode don't respect ...
sfphoton's user avatar
1 vote
0 answers
71 views

Map Right Alt to Spacebar including in key combinations

I am working on a laptop with a broken spacebar, so I re-mapped the right alt key to the spacebar with: xmodmap -e "keysym Alt_R = space" This works well, except it seems like the right alt ...
Amadou Kone's user avatar
1 vote
2 answers
237 views

How do make Windows key (Super_L) to NOT bring up Search menu?

I would prefer to use Windows key as Super_L in emacs and possibly other apps. However, the key is programmed to bring up Ubuntu Search Apps menu. Is there any way to disable this shortcut, in other ...
DeLorean88's user avatar
0 votes
1 answer
970 views

Bind alt + wasd to arrow keys

I tried what the OP did in How to map [Alt] + [hjkl] keys to arrow keys? and faced the same issue. The only answer did not work. Any suggestions?
antoine's user avatar
  • 157
0 votes
0 answers
87 views

One of the media keys( next track ) is stuck and is making the keyboard useless. I want to disable it but I'm not getting the keycode using xev

The next track key is stuck and the screen is continously showing not allowed sign. None of the other keys work when this key gets pressed automatically I want to disable this particular key but I'm ...
Aditya Gitte's user avatar
0 votes
1 answer
263 views

Remap Caps Lock key to Ctrl+Y or other key

I am trying to remap my caps lock key to a new key combination like ctrl+b for using tmux. I spent hours googling but all explanations are just cryptic or only cover remapping a key to only a single ...
xbufu's user avatar
  • 313
0 votes
0 answers
151 views

xmodmap locking MATE desktop

20.10 with MATE desktop up to date as of today. I want to disable one of the special keys on my keyboard. The calculator button is positioned where I will too often press it while picking up the ...
Stephen Boston's user avatar
0 votes
0 answers
489 views

Change Hyper key from mod 4 to mod 3

Is there any way to change this permanently? I do it with an xmodmap script but I have to run it every time I boot my device (Ubuntu 20.04) and I want to find a way to do it permanently
Anonimeishon's user avatar
2 votes
1 answer
380 views

Swapping CapsLock key for hyper

i tried doing this by running a .Xmodmap script at startup but it just doesn't work, I've seen a lot of threads with people (maybe) fixing it, but i just can't! I've also seen some threads about using ...
Anonimeishon's user avatar
1 vote
0 answers
236 views

xmodmap Mode_switch for different layouts

I need to add the same "Mode_switch layer" triggered by Caps_Lock for both layouts: EN and RU. Specifically, both Caps_Lock + h and Capd_Lock + р (Cyrillic_er) should lead to Left; both ...
Andrey Pikunov's user avatar
1 vote
0 answers
98 views

Making a Lock Key with Xmodmap

How do I create a "lock" or "sticky" key in Xmodmap – such as Caps_Lock? Currently, I am using a dead-Greek key, but I would also like a key that locks my keyboard into Greek until ...
LinearGuy's user avatar
  • 111
0 votes
1 answer
217 views

Why does `xmodmap` not always load `.Xmodmap` on login?

I've got the following in the file ~/.Xmodmap ! change CapsLock to Escape clear Lock keycode 0x42 = Escape It remaps the CapsLock key to Escape, and works pretty well, when I issue the comman xmodmap ...
red_trumpet's user avatar
  • 1,849
2 votes
0 answers
581 views

xmodmap fails to clear any modifier

I'm trying to remap my right Windows/Super/Meta/Command key to behave the same as my left Alt key (instead of what it's doing now which I believe is acting as "Super"). I've read a bunch of ...
stbrody's user avatar
  • 131
6 votes
2 answers
412 views

xmodmap stopped working in the latest Google Chrome update

I remap Insert,Home,Page Up, Delete, End, and Page Down, and it have worked for many years, but with the latest Google Chrome update, it ignores the remapping, and preforms the action if it where were ...
Sandra Schlichting's user avatar
0 votes
0 answers
261 views

Changing NumPad keycodes to non-NumPad countertypes?

I have an external keyboard to my laptop which has a NumPad. I want to be able to use both the external keyboard and the built-in keyboard in the same way. However, because the keycodes for the NumPad'...
flipjacob's user avatar
3 votes
1 answer
3k views

Remap a key in Ubuntu 20.04, Wayland

I think I\ve looked all over the whole internet for an answer now, but I can\t find it. I have a keyboard where the tilde key should be mapped to the bar/pipe key. Before Wayland I used this config ➜ ...
kontrollanten's user avatar
2 votes
1 answer
850 views

Linux - How to use CAPS LOCK as both a SHIFT and BACKSPACE?

I want to be able to use the caps lock key on my keyboard as a shift key when I am holding it down and as a backspace when I release the key (given that I didn't press any other keys in that interval)....
Aru's user avatar
  • 31
1 vote
0 answers
213 views

How to ignore a specific character input from your keyboard?

My laptop's keyboard has malfunctioned, and so whenever I press spacebar the computer gets input as if I pressed spacebar and page-down at the same time. I tried using xev to figure out which ...
Maxim Hermez's user avatar
2 votes
1 answer
564 views

Remap right up arrow to shift does not work as expected

I've read the several questions regarding remapping keys and I found that to remap my right up arrow to a shift key would require: xmodmap -e 'keycode 111 = Shift_R NoSymbol Shift_R' or xmodmap -e '...
JrRockeTer's user avatar
1 vote
1 answer
3k views

How can I get my display back? xmodmap: unable to open display ''

Like so many others, I've been trying to upgrade my OpenGL from 3.0 to 3.2, which was probably a terrible idea to begin with but here we are. Now my Ubuntu partition will not open properly and I'm ...
Karen's user avatar
  • 21
1 vote
1 answer
217 views

Xmodmap: Assign right ctrl to two keys

I'm trying to use right Ctrl to type -> Is that possible? If not, do you know of an easy way to achieve it? Here's the code I tried: keycode 105 = (minus, greater)
unloco's user avatar
  • 133
1 vote
2 answers
457 views

use some other key on the keyboard to replace the non-functioning shift key

this laptop is old and my both shift keys and the caps lock key are no longer working. all the other keys are however still working. i dont know what caused this. maybe it is the layout problem or the ...
rsonx's user avatar
  • 111
5 votes
2 answers
2k views

How can I remap my keyboard to create a lefthand numpad?

Like many smaller machines, my laptop's keyboard is missing a dedicated numpad. I can generally type without looking at my keyboard, but I am unable to blindly type numbers with the number row. That's ...
Prototype700's user avatar
2 votes
1 answer
437 views

How to temporarily disable aa key on the keyboard after pressing it?

I spilled beer in my mechanical keyboard and ever since it tends to repeat the "a" key whenever I press it (yes, I've cleaned it several times, used aalcohol, etc.). I tried to mitigate this issue ...
Jdclark's user avatar
  • 73

1
2 3 4 5