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
0 votes
0 answers
40 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&...
0 votes
1 answer
25 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?
  • 33
0 votes
0 answers
39 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 ...
0 votes
0 answers
76 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 ...
1 vote
0 answers
38 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 ...
0 votes
1 answer
463 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 &...
3 votes
1 answer
884 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 ...
2 votes
0 answers
751 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 ...
0 votes
0 answers
83 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 ...
  • 111
1 vote
1 answer
210 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 ...
0 votes
2 answers
101 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 ...
1 vote
1 answer
88 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....
  • 45
5 votes
2 answers
265 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 ...
  • 2,312
3 votes
1 answer
580 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 ...
  • 31
1 vote
0 answers
187 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 ...
  • 501
0 votes
0 answers
64 views

xmodmap freezing on Ubuntu 20.4

I needed to swap keys on my Apple Magic Keybboard so I remaped them using xmodmap and need it to be persistent accross reboots so I exported the key mappings into .Xmodmap file and created a startup ...
  • 501
0 votes
0 answers
67 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 ...
1 vote
1 answer
350 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 ...
1 vote
0 answers
43 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 ...
1 vote
2 answers
168 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 ...
0 votes
1 answer
530 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?
  • 147
0 votes
0 answers
80 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 ...
0 votes
1 answer
159 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 ...
  • 313
0 votes
0 answers
99 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 ...
0 votes
0 answers
308 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
2 votes
1 answer
245 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 ...
1 vote
0 answers
110 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 ...
1 vote
0 answers
41 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 ...
  • 111
0 votes
1 answer
130 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 ...
  • 1,599
2 votes
0 answers
387 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 ...
  • 121
6 votes
2 answers
345 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 ...
0 votes
0 answers
189 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'...
3 votes
1 answer
2k 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 ➜ ...
2 votes
1 answer
568 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)....
  • 31
1 vote
0 answers
145 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 ...
2 votes
1 answer
406 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 '...
1 vote
1 answer
2k 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 ...
  • 21
1 vote
1 answer
130 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)
  • 133
1 vote
2 answers
282 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 ...
  • 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 ...
2 votes
1 answer
343 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 ...
  • 73
2 votes
2 answers
2k views

How do I set caps to BOTH control and escape in ubuntu/gnome?

I've seen a few questions about this, but none that answered it to my satisfaction. The question: "I'm on ubuntu-flavored linux. I want to use caps as an escape and a control at the same time. (...
2 votes
2 answers
2k views

Remap Keyboard Keys based on what keyboard being used

I have a Dell XPS13 and I'm using a Keychron K2 keyboard. The keyboard layouts are different. Is there a way of mapping different keys on the different keyboards? Either at the same time or some sort ...
  • 131
1 vote
1 answer
639 views

xmodmap keyboard changes stop working after Logout and Login again

I run Lubuntu 19.10. To disable "F11" and "Right-click" on the mouse I use xmodmap. I launch this during startup with the Lubuntu Autostart. For the first login it works fine. After I logout and login ...
  • 21
3 votes
2 answers
5k views

How to disable multimedia keys entirely? 18.04 LTS

I have a fresh vanilla 18.04 LTS install, using gnome-shell 3.28.4. I'm using a wired Apple aluminum keyboard: I would like to use the top-row F-keys as keyboard shortcuts in various end-user ...
1 vote
0 answers
63 views

Menu key remaps itself in 16.04

I've gotten some good advice from other answers to the question about how to remap my menu key. The solution I settled on has me setting the following in .bashrc xmodmap -e 'keycode 135 = Hyper_R' ...
  • 111
4 votes
0 answers
129 views

Remap Capslock, but keep its function with Ctrl + Capslock

I want to remap my Capslock key to function as left mouse click, Alt+Capslock to function as right mouse click, and Ctrl+Capslock to function as Capslock. I've been using this in Windows with ...
  • 41
1 vote
0 answers
205 views

xmodmap: changing language reset caps/tab swapping

my tab key is broken and i want to swap/remap caps with tab. i follow instruction from How to swap/remap the CAPS LOCK key with Tab key? and write clear Lock keycode 66 = Tab ISO_Left_Tab Tab ...
  • 11
1 vote
0 answers
30 views

Xmodmap key mappings reverting periodically [duplicate]

Possible duplicate of this xmodmap reverting periodically, but since there is no life in there and the "answer field" is just for answers, I have to create a new question. Six years later on Ubuntu 18....
  • 51
2 votes
0 answers
795 views

Running xmodmap when new keyboard is plugged in

When I plug an external keyboard into my laptop (which runs Xubuntu 18.04), I have to run xmodmap ~/.Xmodmap to apply the changes to the second keyboard also. This bothers me. Here is my .Xmodmap: ! ...
  • 1,599

1
2 3 4 5