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

Re: Tips for using "extra" keyboard keys. Mini-HOWTO



Keith G. Robertson-Turner wrote:
Note: I chose the name "LogiSearch" arbitrarily. You can give it any name
you like, so long as you keep a note of that name - and remember it is
case sensitive (as with most things on Linux).

3) ...

Edit /usr/X11R6/lib/X11/XKeysymDB (part of the XFree86-libs-data package).

Choose a range of identifiers not already in use, on my system I chose
10090001 upwards (this is a hex value).

Add the following line:

LogiSearch :10090001

I found that the KeysymDB file already contains a ton of useful keywords, you don't have to make up your own. Or rather, making up your own is more work with little benefit :)


Quit gconf-editor and logout (restart X), no need to reboot.

There's no need to restart X, either, gconf-editor's changes take effect immediately.


Here's a sample from my configs:

Here's a sample from my configs, for a Microsoft Natural Multimedia Keyboard:


/etc/X11/Xmodmap
/home/rbpark/.Xmodmap
keycode 187=F13
keycode 136=F14
keycode 135=F15
keycode 119=F16
keycode 120=F17
keycode 121=F18
keycode 122=F19
keycode 194=F20
keycode 195=F21
keycode 163=F22
keycode 215=F23
keycode 216=F24

keycode 101=XF86Documents
keycode 228=XF86Pictures
keycode 188=XF86Music
keycode 160=XF86AudioMute
keycode 162=XF86AudioPlay
keycode 164=XF86AudioStop
keycode 176=XF86AudioRaiseVolume
keycode 174=XF86AudioLowerVolume
keycode 144=XF86AudioPrev
keycode 153=XF86AudioNext
keycode 237=XF86AudioMedia
keycode 236=XF86Mail
keycode 178=XF86HomePage
keycode 133=XF86Messenger
keycode 161=XF86Calculator
keycode 150=XF86LogOff
keycode 223=XF86Standby

Also, here's ~/.Xclients:
xmodmap ~/.Xmodmap

/usr/X11R6/lib/X11/XKeysymDB

I didn't make any changes to this file.


gconf settings
global_keybindings
run_command_2   XF86Documents
run_command_3   XF86Pictures
run_command_4   XF86Music
run_command_5   XF86AudioMute
run_command_6   XF86AudioPlay
run_command_7   XF86AudioStop
run_command_8   XF86AudioRaiseVolume
run_command_9   XF86AudioLowerVolume
run_command_10  XF86AudioPrev
run_command_11  XF86AudioNext
run_command_12  XF86AudioMedia
run_command_13  XF86Mail
run_command_14  XF86HomePage
run_command_15  XF86Messenger
run_command_16  XF86Calculator
run_command_17  XF86LogOff
run_command_18  XF86Standby

keybinding_commands
command_2   nautilus --no-desktop
command_3   nautilus --no-desktop /home/rbpark/images
command_4   nautilus --no-desktop /home/rbpark/music
command_5   mute-toggle
command_6   xmms --play-pause
command_7   xmms --stop
command_8   aumix-minimal -v+1
command_9   aumix-minimal -v-1
command_10  xmms --rew
command_11  xmms --fwd
command_12  gmplayer
command_13  launchmoz -mail
command_14  launchmoz
command_15  gaim
command_16  gnome-calculator
command_17  gnome-session-save --kill
command_18  xscreensaver-command -lock

# xmms-toggle-mute.sh
~/bin/mute-toggle:
#!/bin/bash

NEW=$(aumix -vq|perl -pe 's/^\D+(\d+).+/\1/;')
OLD=$(cat ~/.mute-toggle 2>/dev/null)

if [ "$NEW" == "0" ]; then
  aumix -v$OLD
else
  echo $NEW > ~/.mute-toggle
  aumix -v0
fi

# xmms-toggle-play.sh

XMMS can already do this itself (xmms --play-pause). In fact, xmms-shell is entirely unnecessary...


Launchmoz is a script that launches firebird/thunderbird.

Read about it here:

http://slashdot.org/~Feztaa/journal/54469 (there's a download link too)

I assume there are ways of getting all this to work under different window
managers, YMMV.

Yeah, metacity makes it difficult by requiring you use gconf-editor, KDE makes this kind of stuff fairly straightforward.


(anxiously awaiting the release of KDE 3.2 :)




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