Go to Google Groups Home
Groups 
 
 • Advanced Groups Search
 • Groups Help
 
Groups search result 1 for microsoft keyboard linux script

Search Result 1
From: Jim Randell (jim@slashdot.f[8+1].co.uk)
Subject: Re: 'multimedia' buttons on keyboard --how?
Newsgroups: comp.os.linux.hardware
View: Complete Thread (3 articles) | Original Format
Date: 2000-10-12 02:54:56 PST
Mr Thomas Alexander Grek <tag98@ic.ac.uk> writes:
> Hi,
> I have a new keyboard with something like 30 multimedia buttons, it has
> drivers for Windows only.
> I have tried this:
> showkey -s (to get the scancodes) then
> setkeycodes e043 (or whatever) 120, which I think should work?
> But showkey still does not recognise them and setkeycodes appears to do
> nothing.
> Can anybody help me get them working, either in console or especially
> under kde.

I have an "Internet" keyboard with extra keys that I got working in
XFree86 4.0.

Attached is a message I wrote about it (everything pretty much stands
- except I'm using sawfish now, not enlightenment, but configuration
is much the same).

Hope it's some help...

--
From: Jim Randell <jim@slashdot.f[8+1].co.uk>
Subject: Re: Microsoft Keyboard
Date: 28 Sep 2000 17:02:42 +0100
Newsgroups: pcplus.linux

Eddie <eddietheman@penguinpowered.com> writes:
> is there any way that the Internet shortcuts can work in Linux?

I don't know about a Microsoft keyboard, but the keyboard I've got has
lots of strange little keys on it (WWW, Mute, V-, V+, Play/Stop, Skip,
etc.), which are recognised in XFree86 4.0.1.

You can check this using xev.

If you get a keycode but no corresponding keysym then you can assign a
keysym to the key using xmodmap.

Here's what I've got in my ~/.Xmodmap

--
! Additional "Internet" Keys
! 161 = WWW
! 158 = Mute
! 232 = V-
! 176 = V+
! 152 = Scrolling Down
! 144 = Scrolling Up
! 151 = Audio Track Down
! 174 = Audio Track Up
! 146 = Play/Pause
! 163 = Stop
! 153 = Zooming -
! 178 = Zooming +
! 164 = Calc
! 165 = X'fer
! 162 = Menu
! 166 = Msg
! 222 = Power
! 223 = Sleep
! 227 = Wake
keycode 223 = XF86Standby
keycode 232 = XF86AudioLowerVolume
keycode 158 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 146 = XF86AudioPlay
keycode 163 = XF86AudioStop
keycode 151 = XF86AudioPrev
keycode 174 = XF86AudioNext
keycode 161 = XF86HomePage
keycode 166 = XF86Mail

! I added additional KeySyms to XKeySymDB for these
keycode 152 = XF86ScrollDown
keycode 144 = XF86ScrollUp
keycode 153 = XF86ZoomMinus
keycode 178 = XF86ZoomPlus
keycode 164 = XF86Calc
keycode 165 = XF86Transfer
keycode 162 = XF86Menu
keycode 222 = XF86Power
keycode 227 = XF86Wake
--

The first chunk already had keysyms defined in
/usr/X11R6/lib/X11/XKeySymDB, the second chunk didn't so I added the
following (as root):

--
XF86ScrollDown          :1008FF1C
XF86ScrollUp            :1008FF1D
XF86ZoomMinus           :1008FF1E
XF86ZoomPlus            :1008FF1F
XF86Calc                :1008FF20
XF86Transfer            :1008FF21
XF86Menu                :1008FF22
XF86Power               :1008FF23
XF86Wake                :1008FF24
--

Now, they should show up (in xev) as having both keycodes and keysyms,
so you can bind actions to them. I use Enlightenment, so I used the
e-conf tool to bind commands to the keys:

XF86HomePage         = Run command vh (my own script for starting a web browser)
XF86AudioPlay        = Run command xmms --pause
XF86AudioStop        = Run command xmms --stop
XF86AudioPrev        = Run command xmms --rew
XF86AudioNext        = Run command xmms --fwd
XF86ZoomPlus         = Run command xvidtune -next
XF86ZoomMinus        = Run command xvidtune -prev
XF86ScrollUp         = Goto Next Desktop
XF86ScrollDown       = Goto Previous Desktop
XF86Mail             = Run command gnudoit -q '(vm)'
XF86Power            = Run command xscreensaver-command -lock
XF86Wake             = Run command xrefresh
XF86Standby          = Run command xscreensaver-command -next
XF86AudioLowerVolume = Run command aumix -v -5
XF86AudioRaiseVolume = Run command aumix -v +5
--

-- 
Jim Randell
http://www.slashdot.f9.co.uk/jim/
To reply replace the [sum in brackets] by it's value


Google Home - Advertise with Us - Add Google to Your Site - News and Resources - Language Tools - Jobs, Press, Cool Stuff...

©2001 Google