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 vote
0 answers
21 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 > ...
user avatar
0 votes
1 answer
13 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 = ...
user avatar
0 votes
0 answers
11 views

"xmodmaped" key are not recognized by gsettings key bindings

I'm on Zorin OS 16.1 based on Ubuntu 20.04. Current setup: I disabled caps lock key when pressed alone then map caps lock + hjkl to corresponding arrow key via xmodmap and this works perfectly, ...
user avatar
1 vote
0 answers
77 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" & ...
user avatar
  • 111
0 votes
0 answers
60 views

Change Caps Lock to Hyper

There are quite a lot of posts on how to change Caps Lock to Hyper, but for me, none of them explains how to turn off the locking;) I've got this for xmodmap: remove Lock = Caps_Lock keycode 77 = ...
user avatar
0 votes
0 answers
36 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 ...
user avatar
  • 1
0 votes
0 answers
16 views

Remaping `alt(R)+hjkl` to `left down up right`using xmodmap behaves wierd

To remap alt(R)+hjkl to left dowm up rightI put these lines in my .bashrc file. xmodmap -e "keycode 108 = Mode_switch" xmodmap -e "keycode 43 = h H Left NoSymbol NoSymbol NoSymbol" ...
user avatar
  • 1
0 votes
2 answers
238 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 ...
user avatar
  • 193
0 votes
0 answers
211 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 ...
user avatar
0 votes
0 answers
52 views

Xmodmap: remap the "alt gr" + "y" key?

I want to remap my "Alt Gr" + "y" key (e.g. with with "$" key). I use some ThinkPad laptop and within Ubuntu 21.10. Based on some tutorials on internet xmodmap would be ...
user avatar
0 votes
0 answers
15 views

Alt+Shift key release event differs if the Alt key is Alt_R rather than Alt_L

On my linux (I am using CentOS-7 but also had the same behavior on RedHatRel6) workstation, I would modify the key release behavior of my Alt keys so the Alt+Shift sequence event does not emit a Meta ...
user avatar
  • 101
0 votes
0 answers
19 views

Openbox does not recognize key remaps

The remaps don't work in Openbox menu nor Openbox window decorations. Remap example: xmodmap -e "keycode 31 = i I i I Up Up rightarrow" xmodmap -e "keycode 44 = j J j J Left Left ...
user avatar
  • 235
0 votes
1 answer
193 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 ...
user avatar
  • 249
3 votes
1 answer
96 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 ...
user avatar
  • 133
0 votes
0 answers
141 views

Set r_ctrl to super using setxkbmap

Need to make my right ctrl act as a windows/super key. This needs to be a one-way change, I do not want to also swap my left windows key to control, I want to have two super keys, one on each side. I'...
user avatar
0 votes
0 answers
72 views

Xev returns 'NoSymbol' after xmodmap remapping

The keyboard I am currently using happens to have the 94 and 49 keys swapped with respect to their expected behavior, so I am trying to swap them back at the OS level via xmodmap and xev. ...
user avatar
  • 1
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 ...
user avatar
0 votes
1 answer
214 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 ...
user avatar
  • 301
0 votes
0 answers
257 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 -...
user avatar
1 vote
0 answers
41 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 ...
user avatar
  • 11
2 votes
1 answer
233 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 ...
user avatar
1 vote
1 answer
623 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 = ...
user avatar
  • 115
0 votes
1 answer
74 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 ...
user avatar
0 votes
0 answers
60 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 ...
user avatar
1 vote
0 answers
146 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 ...
user avatar
  • 51
1 vote
1 answer
743 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 ...
user avatar
1 vote
0 answers
39 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 ...
user avatar
1 vote
2 answers
968 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 ...
user avatar
2 votes
1 answer
43 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 &...
user avatar
3 votes
0 answers
203 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 ...
user avatar
  • 89
1 vote
1 answer
498 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 ...
user avatar
0 votes
0 answers
206 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 ...
user avatar
0 votes
0 answers
201 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 ...
user avatar
  • 157
1 vote
0 answers
75 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 ...
user avatar
1 vote
0 answers
140 views

Remapped multimedia keys using xmodmap not triggering event in Linux Mint 20

My aim is to remap XF86AudioLowerVolume/XF86AudioRaiseVolume to the mode_switch minus/equal keys using xmodmap. If the XF86AudioLowerVolume/XF86AudioRaiseVolume are mapped to the first position, the ...
user avatar
  • 131
0 votes
0 answers
52 views

Openbox mousebinds not recognizing remaps of Pointer_Button1 & Pointer_Button3

In openbox, when I press the left or right buttons from the mouse over the titlebar of a window, the later focuses, raises and unshades. The behavior is given by the following mousebinds from openbox ...
user avatar
  • 235
1 vote
1 answer
392 views

xev doesn't identify some keys, and some have incorrect mappings?

My keyboard modifier map as returned by xmodmap is: shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x69) mod1 Alt_L (0x40), ...
user avatar
0 votes
1 answer
49 views

Remap Shift_R+Enter to Enter, but leave Shift_L+Enter alone

Sometimes I'll clumsily hit both the Enter key and the right Shift key, resulting in a Shift+Enter by accident. If I want to type Shift+Enter I'll use the left Shift key. So I'd like to remap ...
user avatar
5 votes
1 answer
6k views

How can one create a custom keyboard layout for Linux?

Ideally, I'm looking for a GUI tool, maybe a web application, but good documentation on creating a text definition for a keyboard layout would be great too. What is the normal procedure here? In this ...
user avatar
  • 215
0 votes
2 answers
176 views

FN+ESC (Reverse Fn) in Asus ux362fa in Debian

I am trying to set the fn+esc to toggle fn lock on my Asus ux362fa running with Debian 10. Using xev, I can confirm that the keycode when I press the fn+esc is keycode 248. But looking in xmodmap -pk ...
user avatar
0 votes
0 answers
77 views

xmodmap in xsession running without effect

Following this other question I put this in my .xsession file date -I > /tmp/xsession_started xmodmap -e "pointer = 3 2 1" &> /tmp/mouser.log I can see the xsession_started file ...
user avatar
  • 99
0 votes
1 answer
262 views

`setxkbmap` doesn't alter modifier map

I'm able to successfully update my keymap using this: /usr/bin/setxkbmap -option "ctrl:swapcaps" This doesn't seem to change my modifier map. [OP@localhost ~]$ xmodmap xmodmap: up to 4 ...
user avatar
  • 1,073
0 votes
0 answers
293 views

Xmodmap not remapping mouse buttons

My .Xmodmap file contains this line: keycode 115 = Pointer_Button1. I used Xev to confirm that 115 is the end key on my keyboard. When I press the end key on my keyboard, everything works as usual (...
user avatar
  • 769
1 vote
1 answer
290 views

xmodmap not working with AltGr and arrow keys

I have an us altgr-intl layout. with this command : >_xmodmap -e "keycode 113 = Left NoSymbol U21BC NoSymbol U21BC U21BC U21BC" (Or just 6 combinations, I tried many things ...) AltGr+← still ...
user avatar
  • 65
0 votes
1 answer
488 views

Xmodmap: Remapped Home key works, but not Shift+Home

I'm using xmodmap (in Linux Mint 19.3) to remap the physical PrintScr & Insert keys to Home & End (because the keyboard's actual Home & End are secondary functions under the arrow keys, ...
user avatar
  • 379
0 votes
1 answer
462 views

How to set Alt_L to Ctrl_L in xmodmap?

I can swap Alt_L and Ctrl_L with the following config remove control = Control_L remove mod1 = Alt_L keycode 37 = Alt_L Meta_L Alt_L Meta_L keycode 64 = Control_L NoSymbol Control_L add control = ...
user avatar
  • 267
0 votes
1 answer
425 views

How to keep xmodmap after suspend

I have an xmodmap file ~/.Xmodmap and it works perfectly. I put it in the startup applications app in ubuntu 19.10 like this xmodmap /home/yasser/.Xmodmap and it works when first booting up. However, ...
user avatar
0 votes
1 answer
105 views

Simultaneous keystrokes - emulating mouse movements with keyboard

I'm trying to emulate mouse movements and actions with keyboard, and I succeeded in remapping everything (e.g.: hjkl to movements), with xkb (in particular using xkbset -m) and xmodmap. The problem ...
user avatar
  • 101
1 vote
1 answer
275 views

X11: swap keyboard key with mouse button

I want my Menu key on the keyboard (Keycode 135) to do the same as my right mouse button. https://superuser.com/questions/336674/emulating-mouse-click-with-a-keyboard does that but it sacrifices the ...
user avatar
  • 29.9k
0 votes
0 answers
38 views

How to make a board key act like the right mouse key?

As most keyboard these days come with no Menu-key it would be nice to set a key to the operation of the right mouse button. So far I still have to select text. How could I get the board key act like ...
user avatar

1
2 3 4 5