[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: windows key



On Sat, 19 May 2001, Brian Stults <bs7452@csc.albany.edu> wrote:

>A while back, I remapped the ms-windows key on my keyboard to open an
>xterm.  The mapping was done through sawfish configuration.  I was
>pleased to have a Microsoft-intended key open a program that is such a
>bastion of *nix OS's.  Anyway, maybe 2-3 weeks ago, the key stopped
>responding.  Not only does it not run an xterm, but it generates no code
>whatsoever.  That is, when I type Ctrl-V and then hit the windows key,
>nothing happens.  Could someone point me in the right direction, and
>perhaps suggest a reason what would have caused the change?

How did you map the key with sawfish?

I'll try to outline the usual procedure, walking through the list
might help you find out what has changed.

Run xev, press the windows key and look for the keycode, e.g.:

KeyPress event, serial 27, synthetic NO, window 0x6800001,
    root 0x26, subw 0x0, time 2443744271, (-148,-578), root:(826,78),
    state 0x0, keycode 115 (keysym 0xffed, Hyper_L), same_screen YES,
               ^^^^^^^^^^^

Create $HOME/.Xmodmap and map the keycode to any _unused_ keysym, e.g.
(assuming you keyboard has function keys F1-F12, so F13- are not
used):

keycode 115 = F15

For a complete list of keysyms, see /usr/X11R6/include/X11/keysymdef.h
(you need to omit the "XK_" prefix when using them with xmodmap).

Run xmodmap ~/.Xmodmap

Now you should be able to bind F15 to any action with sawfish. That's
why I was asking how you map a key with sawfish. I'd assume that
sawfish binds keysyms to actions, but doesn't now about raw keycodes.
But I haven't tried it myself, so this might be wrong.

To make this permanent, you need to run xmodmap whenever you launch
X. I think /etc/X11/Xsession will do this by default. If not, out the
line in ~/.xsession and/or ~/.xinitrc. HTH

-- 
Philipp Lehman <lehman@gmx.net>



Reply to: