You are not logged in.

#1 2012-11-25 15:29:10

Registered: 2012-03-14
Posts: 12

Remapping keyboard behavior "Home" and "End"

I'd like to have easy access to "Home" and "End" behavior by remapping Alt_L + "Prior" (pageup) and Alt_L + "Next" (pagedown).

According to these :

$ xmodmap -pm
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

I tried :

xmodmap -e "keycode 112 mod1 = Prior Home"
xmodmap -e "keycode 117 mod1 = Next End"

Unfortunately, this is not working at all.

I read but didn't helped me much, is this remapping at least possible?

Edit : added the quotes for readability

Last edited by detestable (2012-11-25 18:12:38)


#2 2012-11-25 16:29:30

Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,388

Re: Remapping keyboard behavior "Home" and "End"

Based on what the man page says, that should map key 112+Shift to Home, not Alt.

• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.


#3 2012-11-25 18:07:47

Registered: 2012-03-14
Posts: 12

Re: Remapping keyboard behavior "Home" and "End"

The accepted answer of this topic misled me : … rtain-keys

If the key you are remapping has different behavior depending on a state ( like how the keys in the numeric keyboard depend on Num_Lock) you simply have to do xmodmap -pm to get a list of modifiers and then do:

xmodmap -e "KEYCODE MODIFIER = behaviour behaviour_with_modifier"

Suppose, for example, that you want to get a period instead of a comma on the numeric keyboard (useful for most programmers), but you want to keep the "delete" behavior when numlock is off.

xmodmap -e "keycode 91 mod2 = KP_Delete period"

Any idea?


Board footer

Powered by FluxBB