xmodmap Oddness
Giles Orr
gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Feb 27 04:10:08 UTC 2008
On Tue, Feb 26, 2008 at 4:14 PM, William O'Higgins Witteman
<william.ohiggins-H217xnMUJC0sA/PxXw9srA at public.gmane.org> wrote:
> Ordinarily, I just fire up xev to get the keycode and then `xmodmap -e
> "keycode 64 = Control_L"`. And that has worked for all of my keys but
> one - my Alt_L (keycode 64). I was trying to remap it to Control_L, but
> it is staying subbornly Alt_L.
>
> Here's the output of xev for my uncooperative keyboard:
>
> KeyPress event, serial 32, synthetic NO, window 0x1800001,
> root 0x63, subw 0x1800002, time 1468606840, (37,48), root:(1538,917),
> state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyPress event, serial 32, synthetic NO, window 0x1800001,
> root 0x63, subw 0x1800002, time 1468618977, (37,48), root:(1538,917),
> state 0x10, keycode 64 (keysym 0xffe3, Control_L), same_screen YES,
> XKeysymToKeycode returns keycode: 37
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> The top key is working as expected, but the bottom one, which is the one
> I'd like to have actually be the Control_L, is claiming to be Control_L,
> as I remapped it, but when I press it is still actually Alt_L. The only
> difference I see is that the one that doesn't do what I'd like has a
> keysym remap. Given I put it there, that's not a huge surprise, but I
> am not sure what I should do.
I was struggling with keymapping recently, sounds like a fairly
similar problem. I was trying to get Alt_R - which by default is
mapped to AltGr, which I have no use for - to behave in the same way
as Alt_L. I tried this:
xmodmap -e "keycode 113 = Alt_R"
Good start, associating the keycode with a name. As you did, I got
the keycode from xev. Next:
xmodmap -e "add Mod1 = Alt_R"
I thought that would do it, but it didn't because Alt_R was still
associated with Mod5 _as well as_ Mod1. This is where I really needed
"xmodmap" without params to see what was going on - and why a keypress
wasn't giving the response I expected. So to finish it:
xmodmap -e "remove Mod5 = Alt_R"
Hope this helps.
--
Giles
http://www.gilesorr.com/
gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list