Page 1 of 1

No Windows key!! (re. Tiling window managers)

Posted: Sun Jul 11, 2010 5:17 am
by ahmad
So, my new X32 does not have a windows key. This does not bode well for my use of wmii as a window manager.

Is there any way I can map the 'fn' button using Xmodmap? I've tried a couple of things but it seems the OS does not 'see' the Fn key. Is there any other key that anyone here would suggest mapping? At the moment I have wmii set to use Mod1 (Alt key) but that conflicts with some of my applications...

Re: No Windows key!! (re. Tiling window managers)

Posted: Sun Jul 11, 2010 8:03 am
by Neil
Currently, I have my caps lock key mapped to function as the "super" key in Crunchbang. I've had it set up that way for a few months now, and have not yet missed having it's original function.

Re: No Windows key!! (re. Tiling window managers)

Posted: Sun Jul 11, 2010 8:50 am
by Harryc
I don't know what Crunchbang is, but given the frequency with which I hit the Caps Lock key by accident, I think I'd be 'crunchbanging' all day :).

Re: No Windows key!! (re. Tiling window managers)

Posted: Sun Jul 11, 2010 7:13 pm
by dk
Hello.

Here are the relevant keycodes as determined using `xev'. The 'fn' key generates the following:

Code: Select all

KeyPress event, serial 34, synthetic NO, window 0x2a00001,
    root 0x11a, subw 0x0, time 650662, (172,-14), root:(803,366),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2a00001,
    root 0x11a, subw 0x0, time 650674, (172,-14), root:(803,366),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
The 'Windows' key generates the following:

Code: Select all

KeyPress event, serial 34, synthetic NO, window 0x2a00001,
    root 0x11a, subw 0x0, time 631176, (169,-9), root:(800,371),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2a00001,
    root 0x11a, subw 0x0, time 631271, (169,-9), root:(800,371),
    state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
So, you should be able to remap it using those keycode's easily. If you are not sure if your 'fn' is working, try `xev' and see if it is generating an event.

Re: No Windows key!! (re. Tiling window managers)

Posted: Mon Jul 26, 2010 10:17 pm
by PizzaandWine
I too run crunchbang, but on an x31 and love it. With almost anything that runs X (i.e. any graphical linux distro), you can create use a xmodmap config to get map the key over. On some it will automatically be detected if you name it .Xmodmap and put it in your home folder. However, just for good measure I put it in a script that runs right after login--something like

Code: Select all

(sleep 2s && xmodmap ~/.Xmodmap) &
.

The code I use to convert the caps_lock key to the windows key is:

Code: Select all

! No Caps Lock
clear lock
! Caps Lock as Win Key
add mod4 = Caps_Lock
! No Caps Lock
clear lock
! Caps Lock as Win Key
add mod4 = Caps_Lock
Good luck.