Media Keys on Inspiron 8200

Carlos Escutia Chávez carlosescutia at gmail.com
Thu Feb 24 23:04:58 UTC 2005


1. First, some dry theory from setkeycodes man:


 The usual PC keyboard produces a series of scancodes for each key press
       and  key  release. (Scancodes are shown by showkey -s, see showkey(1).)
       The kernel parses this stream of scancodes, and converts it to a stream
       of  keycodes  (key  press/release  events).   (Keycodes  are  shown  by
       showkey.)  Apart from a few scancodes with special meaning,  and  apart
       from  the sequence produced by the Pause key, and apart from shiftstate
       related scancodes, and apart from the key up/down bit,  the  stream  of
       scancodes consists of unescaped scancodes xx (7 bits) and escaped scan-
       codes e0 xx (8+7 bits).  It is hardwired in the current kernel that  in
       the  range  1-88 (0x01-0x58) keycode equals scancode. For the remaining
       scancodes (0x59-0x7f) or scancode pairs (0xe0 0x00 - 0xe0 0x7f) a  cor-
       responding  keycode can be assigned (in the range 1-127).  For example,
       if you have a Macro key that produces e0 6f  according  to  showkey(1),
       the command
              setkeycodes e06f 112
       will  assign the keycode 112 to it, and then loadkeys(1) can be used to
       define the function of this key.


2. ok, so first we need to identify the scancodes generated by your
four multimedia keys (this is not necessary for volume keys). I just
can't remember how I did it, but I know that multimedia keys on Dell
Inspiron 8100 have these scancodes:

	play/pause:	0x81
	stop:		0x82
	previous:	0x83
	next:		0x84

3. so we're going to assign these scancodes (known by linux) to
keycodes (known by X). On a terminal, execute:

	$ sudo setkeycodes 0x81 129
	$ sudo setkeycodes 0x82 130
	$ sudo setkeycodes 0x83 131
	$ sudo setkeycodes 0x84 132

	(here, we're assigning scancode 0x81 to keycode 129 and so on).

4. assign those keys to their desired functionality:
	a. Click on Computer -> Desktop preferences -> keybindings (I'm not
sure of these names, I'm using spanish locales)
	b. Go to sound section. Click on Play, and press your play multimedia
key, and so on.

5. To assign automatically your scancodes at boot time, edit
/etc/init.d/bootmisc.sh
	$ sudo gedit /etc/init.d/bootmisc.sh

and append at the end of the file:

	setkeycodes 0x81 129
	setkeycodes 0x82 130
	setkeycodes 0x83 131
	setkeycodes 0x84 132


Enjoy!




On Thu, 24 Feb 2005 15:24:09 -0600, Carlos Escutia Chávez
<carlosescutia at gmail.com> wrote:
> I've done it in my Inspiron 8100 with all multimedia keys (volume,
> play, pause, etc)
> 
> Right now I'm in XP :-/
> 
> I'll post how I did it in the first chance I have to reboot into warty
> 
> Regards
> 
> 
> On Wed, 23 Feb 2005 20:31:13 -0500, cbrito at optonline.net
> <cbrito at optonline.net> wrote:
> > Has anyone gotten the media keys (volume most importantly) to work on an Inspiron 8200 running Warty?
> >
> > I looked on the wiki, and it says volume keys work ( http://www.ubuntulinux.org/wiki/HardwareSupportMachinesLaptops/view?searchterm=Inspiron%208200 ) but no such luck for me, pressing them does nothing. Including using the Fn + Page UP/Down keys. Regular volume control through applets works.
> >
> > -Chris
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
> 
> --
> 007 - Con licencia para... leer, escribir, ejecutar
> 


-- 
007 - Con licencia para... leer, escribir, ejecutar




More information about the ubuntu-users mailing list