Key Binding
Gerald Combs
gerald at ethereal.com
Sat Dec 28 23:20:35 CST 2002
On Thu, 26 Dec 2002, Rich Edelman wrote:
> Easier than using all that nifty xmodmap stuff to map to function keys, just
> make sure you set your keyboard model and such in the "inputdevice" section
> of your XF86Config file, like so:
>
> Section "InputDevice"
> Identifier "Keyboard0"
> Driver "keyboard"
> Option "XkbModel" "microsoftpro"
> EndSection
This is what I ended up doing, althouch I had to create my own keyboard
definition since none of the existing ones matched my laptop. If memory
serves, this is what I did:
1) Added entries to /etc/X11/xkb/symbols/inet and
/etc/X11/xkb/rules/xfree86 to define my keyboard. This is the
default for Gentoo - under Red Hat xkb is in /usr/X11R6/lib/X11/xkb.
Dunno about other systems. The following was added to symbols/inet:
-=-=-=-=-=-=-=-
partial alphanumeric_keys
xkb_symbols "hp_omnibook_xe3_gf" {
// Describes the extra keys on an HP "Internet" keyboard.
name[Group1]= "HP Omnibook XE3 GF";
key <I6C> { [ XF86Mail ] };
key <I32> { [ XF86WWW ] };
key <I74> { [ XF86OpenURL ] };
key <I73> { [ Help ] };
key <I2E> { [ XF86AudioLowerVolume ] };
key <I30> { [ XF86AudioRaiseVolume ] };
key <I10> { [ XF86AudioPrev ] };
key <I22> { [ XF86AudioPlay, XF86AudioPause ] };
key <I24> { [ XF86AudioStop, XF86Eject ] };
key <I19> { [ XF86AudioNext ] };
};
-=-=-=-=-=-=-=-
Only one line needed to be added to rules/xfree86:
-=-=-=-=-=-=-=-
hp_omnibook_xe3_gf = xfree86 pc(pc104)
-=-=-=-=-=-=-=-
2) In my XF86Config, "XkbModel" was set to "hp_omnibook_xe3_gf" similar to
what Rich described.
3) I modified my ~/.kde/share/config/khotkeysrc to run my modified aumix
to turn the volume up and down, and to run "eject" when the eject key
is pressed. Google turned up a pretty good reference for configuring
hot keys under different window managers. All praise Google:
http://www.linuxgazette.com/issue67/evans.html#Keybindings
My modified aumix can be found at http://www.zing.org/hacks/. To display
the bar graph, use the "-A" flag, e.g.
aumix -v +5 -A 1
My Gentoo system has both GTK+ 1.2 and 2.0 installed. This confused
aumix's configure script, and I had to explicitly disable linking against
GTK+ 2.0.
More information about the Kclug
mailing list