Key Binding

Rich Edelman edelman at speedscript.com
Thu Dec 26 15:06:03 CST 2002


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

Restart X, those buttons will start showing up as say, XF86Mail and XF86Search 
and such like that (which you can view by using xev). Since you mentioned 
you're using KDE, just go into KDE's menu editor (found easiest by 
right-clicking on the K menu and selecting 'menu editor') and start assigning 
shortcuts. This will only work if you're using kwin for your window manager 
in KDE, though.

There's no super easy way to mess with the volume settings through shortcuts 
and kmix, unfortunately. Tony Hammitt wrote a nice little program to control 
xmms, and it does do some messing with the volume. I use it at work and home, 
and I'm pretty damn sure it's free to do whatever with. So if you're 
interested, I can post that.

Gerald, I'd like to see your modifications to aumix, too. I've been thinking 
of doing something similar to kmix.

Hmm, I think that about wraps up this post. :)

Rich

On Thursday 26 December 2002 08:27 am, Gerald Combs wrote:
> I had to create a new keyboard configuration under /usr/X11R6/lib/xkb in
> order to correctly map the "bonus" keys on my laptop.  XKB documentation
> can be found at
>
>     http://people.debian.org/~branden/xsf/xkb/setup.html
>
> My laptop has volume keys, so I hacked^H^H^H^H^H^Hmodified one of the
> mixer utilities (aumix?) to display a TV-like green bar at the bottom of
> the screen when I adjust the volume.  I can post the sources somewhere if
> anyone is interested.
>
> On Wed, 25 Dec 2002, Jim Herrmann wrote:
> > I'm using KDE, and sometimes IceWM.  Is the example you sent from
> > file:/etc/X11/Xmodmap?  That should set them up for any window manager,
> > correct?  How do you map function keys to commands or scripts?
> >
> > Thanks,
> > Jim
> >
> > Tony Hammitt wrote:
> > > Which window manager are you using?  KDE has pretty simple
> > > configuration, I hear.  I don't even know about gnome.  My FVWM setup
> > > was a little more complicated but it's a _lot_ more flexible than any
> > > of the other WM's key configurations (for instance, it can easily do
> > > anything you can write in a script and can behave differently with
> > > shift control or alt)
> > >
> > > You can always just bind the keys to function keys, here's what I have
> > > for my Logitec Cordless Desktop Pro:
> > >
> > >
> > > # left 'doze    keycode 115     F13
> > > # right 'doze   keycode 116     F14
> > > # menu          keycode 117     F15
> > > # logitech      keycode 161     F28
> > > xmodmap -e 'keycode 115 = F13'
> > > xmodmap -e 'keycode 116 = F14'
> > > xmodmap -e 'keycode 117 = F15'
> > > xmodmap -e 'keycode 161 = F28'
> > >
> > > # sleep         keycode 223     F16
> > > # home          keycode 178     F17
> > > # email         keycode 236     F18
> > > # search        keycode 229     F19
> > > # run           keycode 230     F20
> > > xmodmap -e 'keycode 223 = F16'
> > > xmodmap -e 'keycode 178 = F17'
> > > xmodmap -e 'keycode 236 = F18'
> > > xmodmap -e 'keycode 229 = F19'
> > > xmodmap -e 'keycode 230 = F20'
> > >
> > > # mute          keycode 160     F21
> > > # vol down      keycode 174     F22
> > > # vol up        keycode 176     F23
> > > # pause         keycode 162     F24
> > > # stop          keycode 164     F25
> > > # replay        keycode 144     F26
> > > # skip to next  keycode 153     F27
> > > xmodmap -e 'keycode 160 = F21'
> > > xmodmap -e 'keycode 174 = F22'
> > > xmodmap -e 'keycode 176 = F23'
> > > xmodmap -e 'keycode 162 = F24'
> > > xmodmap -e 'keycode 164 = F25'
> > > xmodmap -e 'keycode 144 = F26'
> > > xmodmap -e 'keycode 153 = F27'
> > >
> > > Jim Herrmann wrote:
> > >> OK, I got a new wireless keyboard and mouse for christmas.  I plugged
> > >> it in, and it works fine without any help from me.  The thing is, it
> > >> has all these extra keys and buttons and geegaws.  It sure would be
> > >> cool to be able to use them.  Does anyone know how to go about this?
> > >>
> > >> Thanks,
> > >> Jim
> > >>
> > >>
> > >>
> > >>
> > >> majordomo at kclug.org Enter without the quotes in body of message
> > >
> >
>




More information about the Kclug mailing list