[1+1=2]

OneAndOneIs2

« Because, obviously, a new desktop means...Finally! »

Thu, Jun 25, 2009

[Icon][Icon]Configuring hotkeys in Lenny

• Post categories: Omni, FOSS, My Life, Helpful

When I use FVWM, I want my Windows key to bring up the main menu, just like it does in Windows.

(Except that the menu appears under the mouse, not always in the screen corner - much better!)

To do this, you have to configure the key to be recognizable to X and to your window manager. The process I used in Debian Lenny for this was:

Use xev to find the keycode, which was in this case the standard 115:
KeyRelease event, serial 35, synthetic NO, window 0x1000001,
root 0x69, subw 0x0, time 6401648, (171,171), root:(216,273),
state 0x40, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

Edit /usr/share/X11/XKeysymDB so it knows there's a new key for it to deal with on the keyboard:
Start :11000001
added to the end of the file

Create the file /etc/X11/Xmodmap to link the Start key to keycode 115:
keycode 115 = Start

To get xmodmap to actually load the file you just created, near the end of the file /etc/X11/Xsession add:
[ -f /etc/X11/Xmodmap ] && xmodmap /etc/X11/Xmodmap

That should set up the key properly (and for all users, which is why you don't use a ~/.Xmodmap file) Then it's just a matter of a line in FVWM's config:
Key Start A A Popup "MainMenu"

And that's it, all done. The windows key brings up my menu! And if I want to configure any of the other 'hotkeys' that usually don't actually do anything, it's the same process.

This is what I mean about GUIs getting in the way and being able to do more when you know what's really going on under the hood!

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
 

[icon] Blogroll

Blogroll generated by MagpieRSS

[Links][icon] My links

[Icon][Icon] Dominic can drive for another year! My little Fiesta survived its ordeal by MOT :).
05/03/10

[Icon][Icon] I last listened to:
The Offspring - She's Got Issues

[Icon][Icon] Most recent photo:
Submersible houseboat

[Icon][Icon]About Me

[Icon][Icon]About this blog

[Icon][Icon]My LQ profile

[Icon][Icon]My /. profile

[Icon][Icon]My Wishlist

[Icon]MyCommerce

[FSF Associate Member]


March 2010
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Search

User tools

XML Feeds

eXTReMe Tracker

Valid XHTML 1.0 Transitional

Valid CSS!

[Valid RSS feed]

blog engine