I managed to do this by editing my keymap in xkb.
In /usr/share/X11/xkb/symbols/
, add this to the file corresponding to the layout you're using (I use an US layout, so I edit the us
file):
partial alphanumeric_keys modifier_keys
xkb_symbols "remap_prtsc_home_insert_end" {
replace key <PRSC> { [ Home ] };
replace key <INS> { [ End ] };
};
// Then include the previous block in the layout variant you're using
// For instance I'm using an international US layout so I edit the "intl" block:
partial alphanumeric_keys
xkb_symbols "intl" {
include "us(remap_prtsc_home_insert_end)"
// ...
// Here the rest of your configuration, left unchanged
}
Then you need to reboot for these changes to be taken into account.
Warning: double check for typos in these files, as if they are invalid you could have trouble logging in after reboot, and you will need to boot in recovery mode and manually edit the file mentionned above to correct them.
Note on where to find the name of the keys:
On the left hand you need to use the key event names (like <PRSC>
), which can be found in /usr/share/X11/xkb/keycodes/evdev
.
On the right hand you need to use a valid X11 name for characters (like Home
). It seems they can be found in /usr/include/X11/keysymdef.h
if you ignore the leading XK_
(not a 100% sure about that, but they seem to match for what I've seen so far).
/usr/share/X11/xkb/symbols/pc
, scroll down tohidden partial alphanumeric_keys
and you'll find them. HTH. – don_crissti Jul 10 '15 at 22:43