Subject: FVWM: setting action by key code

From: Micha Feigin <[email-masked]>
Date: Fri, 18 Jun 2004 05:58:43 +0300

I have a few multimedia keys on my laptop (4) which I know the key codes
for (223, 160, 174, 176) and I would like to attach to actions using
fvwm. Is this possible?

They are currently handled using lineakd, but 5M for handling 4 key
codes seems like too much for me.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Ben Winslow <[email-masked]>
Date: Fri, 18 Jun 2004 02:44:01 -0400

> codes seems like too much for me.

In my ~/.Xmodmap (see notes at end of message):
keycode 222 = XF86PowerOff
keycode 223 = XF86Sleep
keycode 227 = XF86WakeUp

This is pretty self explanatory, and you can find XF86-specific key
names (where there are symbols for several 'multimedia' keyboard keys)
in /usr/X11R6/include/X11/XF86keysym.h.  More generic keys exist in 
/usr/X11R6/include/X11/keysymdef.h.  A friendlier listing of the keys
probably exists, but I don't know of one offhand.

In my fvwm2rc:
Key XF86PowerOff A A Exec xscreensaver-command -lock
Key XF86Sleep A A Exec ~/.local/bin/monoff

Again, this is pretty self explanatory--the strangest part is difference
between the REAL key symbol and the define in the header
(XF86XK_PowerOff vs. XF86PowerOff.)

Notes:
You may have to run 'xmodmap ~/.Xmodmap' manually from your
.xsession/.xinitrc/etc.
GNOME 2.6 is evil, and if you're using it, ti will summarily eat
anything you've changed with xmodmap when it starts gnome-daemon.

HTH,
-- 
Ben Winslow <[email-masked]>

---

From: Erik Steffl <[email-masked]>
Date: Fri, 18 Jun 2004 12:46:17 -0700

> probably exists, but I don't know of one offhand.

   you can also use xkb extension (see /etc/X11/xkb/ (probably, it might 
be in some other dir on your system))

	erik