Getting the extra keys on a Logitech Cordless Desktop Deluxe to work in Debian's X

Last tested May 16, 2004 - on X 4.3.0-dfsg in Debian Sid

Step 1

Append the following to the file /usr/X11R6/lib/X11/XKeysymDB:

logitech_standby:10090000
logitech_mail:10090001
logitech_sms:10090002
logitech_webcam:10090003
logitech_mute:10090004
logitech_up:10090005
logitech_down:10090006
logitech_media:10090007
logitech_home:10090008
logitech_search:10090009
logitech_F1:1009000A
logitech_F2:1009000B
logitech_F3:1009000C
logitech_F4:1009000D
logitech_F5:1009000E
logitech_F6:1009000F
logitech_F7:10090010
logitech_F8:10090011
logitech_F9:10090012
logitech_F10:10090013
logitech_F11:10090014
logitech_F12:10090015

Make sure the values in the second row are unique for this file.

Step 2

Next, add this to ~/.xmodmap:

keycode 187=logitech_F1
keycode 188=logitech_F2
keycode 118=logitech_F3
keycode 119=logitech_F4
keycode 120=logitech_F5
keycode 121=logitech_F6
keycode 122=logitech_F7
keycode 194=logitech_F8
keycode 195=logitech_F9
keycode 196=logitech_F10
keycode 215=logitech_F11
keycode 216=logitech_F12
keycode 236=logitech_mail
keycode 145=logitech_sms
keycode 146=logitech_webcam
keycode 160=logitech_mute
keycode 176=logitech_up
keycode 174=logitech_down
keycode 237=logitech_media
keycode 178=logitech_home
keycode 229=logitech_search
keycode 223=logitech_standby

You'll need to make sure the keycodes are identical on your system. Use xev to determine the keycodes.

That's it, your extra Logitech Cordless Desktop Deluxe keys are now supported in the X Window System. In order for them to actually do something, you'll need to make your window manager aware of their existence. As I'm using Enlightenment, I'll describe what to do if you want that window manager to do something meaningful when you press those extra keys.

Step 3

Modify one of the keybinding sections in ~/.enlightenment/keybindings.cfg as such:

__NEXT_ACTION
__KEY logitech_webcam
__EVENT __KEY_PRESS
__ACTION __A_EXEC /home/frederik/scripts/e_launchOrMoveApp.sh Gqcam gqcam

Replace the last part with the executable of your choice. As you notice, you're able to pass variables to your command by adding them on the line.