How to set AltGr key with xmodmap?
I use a us-intl with “AltGr dead keys” layout and the option to switch Alt and Win key. Nice, but my AltGr does not work. The key I want to use for AltGr has keycode 134 (found out using xev). So I create a .Xmodmap file:
Do you need to clear modifier groups in xmodmap?
According to the Xmodmap Manual, when you want to swap or change modifier keys you need to remove & clear their ties to their original keycodes and modifier groups. Then after assigning them to a new keycode you must also assign them to a new, unique group.
How to export modmap file in.xmodmap?
Here’s what you do (in a terminal, from your $HOME dir, as a regular user): Export current mappings: Edit the “modmap” file, right at the end you’ll have a section which looks like this: This will have to be adapted to a xmodmap-compliant syntax, until it looks similar to the code below (don’t worry it’s really simple to adapt):
What does mode switch mean in xmodmap mode switch?
Another potential complication is that on virtually all systems Xmodmap is running on top of xkb (which defines certain aspects of the underlying virtual keyboard). [Mode_switch] is synonymous with [AltGr] to Xmodmap providing access to level 2- that would be the second set of [q] & [Q] in your example.
Do you need a custom xmodmap for your keyboard?
This is a guide for those who need to set up a custom Xmodmap for their keyboard. The worst thing one can do is to just copy a custom Xmodmap found on the internet without understanding how it works. You should use whatever existing mapping you already have (you must have one which works by default), and make modifications on top of it.
How is xmodmap related to X keyboard extension?
xmodmap is a utility for modifying keymaps and pointer button mappings in Xorg. xmodmap is not directly related to X keyboard extension (XKB), as it uses different (pre-XKB) ideas on how keycodes are processed within X. Generally, it is only recommended for the simplest tasks. See X keyboard extension for advanced layout configuration.