KubuntuLaptopKeycodes

Differences between revisions 39 and 40
Revision 39 as of 2007-02-18 08:20:57
Size: 10352
Editor: vfc69-1-82-233-44-250
Comment:
Revision 40 as of 2007-02-18 08:52:28
Size: 10347
Editor: vfc69-1-82-233-44-250
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
|| Switch Monitor || || || || || || ? || || 170 || - || n/a || no number || || works, no keycode || 170 || works, no keycode || key exists (through Fn) but doesn't work, no keycode || || Switch Monitor || || || || || || ? || || 170 || - || n/a || no number || || works, no keycode || 170 || works, no keycode || key exists (Fn+F3) but doesn't work, no keycode ||

Keycode/hal events for laptop keys

We have done KubuntuLaptopButtons spec for Edgy and would like to improve it even further for Feisty (see KubuntuFeistyLaptop) and would like to get more reports on keycodes and HAL events from laptop users.

Please add your notebook (with your nick) to this table - if you have a key which is not listed yet, please add new row. If you get report, put it into table in following format: keycode / event:

Key

XF86 keysym

HP nw8240 BR LukaRenko

Toshiba A10 Satellite BR ["Hobbsee"]

Maxdata ECO4500A BR ["Hugelmopf"]

Prestigio Visconte 1200 BR JindrichPozlovsky

Dell Latitude D600 BR ["Allee"]

Acer Travelmate 8100 BR ['JoolsSmyth']

Dell Inspiron 6400 BR ["FranciscoBorges"]

Airis Signum AG-408S (Desktop) BR MachinShin

Dell Inspiron 5100 BR ["NaelMasood"]

Compaq Presario C304NR BR RichardJohnson

Apple iBook G4 BR FrodeDoeving

ASUS A6KmQ007H BR Nikoo

DELL Inspiron 640m BRMaleqAlhaq

Acer Travelmate 3212WXWmi BRLucaBeltrame

Fujitsu-Siemens Amilo Pro V3505 BRJacquesLouisKreiss

Sleep

XF86Standby

223 / sleep

223 /sleep

sleep

sleep

223 / sleep

223 / sleep

165

223 / sleep

Hibernate

XF86Sleep

165 / hibernate

165

-

Available, works, no keycode

n/a

Battery/Power modes

XF86LaunchB

241 / battery

241

241

241 / battery

-

241 / XF86LaunchB

n/a

Info

XF86Launch0

245 / info

n/a

-

n/a

245 / help

key exists (available with Fn key) but doesn't return no keycode

Presentation

XF86LaunchC

205 / presentation

n/a

n/a

-

n/a

n/a

Mute

XF86AudioMute

160 / mute

160

160

160 / mute

160

160

160 / mute

160 / mute

160

? / mute

160 / nosymbol

160 / Mute On/Off

160

160

160 / Mute On/Off

Volume Down

XF86AudioLowerVolume

174 / volumedown

174

174 / volumedown

174

174

174 / volumedown

174 / volumedown

174

? / vol+

174 / nosymbol

174 / volumedown

174

174

174 / Volume down

Volume Up

XF86AudioRaiseVolume

176 / volumeup

176

176 / volumeup

176

176

176 / volumeup

176 / volumeup

176

? / vol-

176 / nosymbol

176 / volume up

176

176

176 / Volume up

Play/Pause

XF86AudioPause

162

162 / playpause

162 / playrestart

162

n/a

Next Track

XF86AudioNext

153

153 / nextsong

153 / nextrack

153

n/a

Previous Track

XF86AudioPrev

144

144 / previoussong

144 / prevtrack

144

n/a

Stop

XF86AudioStop

164

164 / stopcd

164 / stop

164

n/a

Lock screen

XF86Lock

146

n/a

-

146 / doesn't work

NA

n/a

Switch Monitor

?

170

-

n/a

no number

works, no keycode

170

works, no keycode

key exists (Fn+F3) but doesn't work, no keycode

Eject CD/DVD

XF86Eject

no keycode

204

-

204

204 / nosymbol

204

n/a

Brightness Up

212

no keycode

212

-

? / bright+

212 / nosymbol

works, no keycode and nosymbol

212

works, no keycode

239 (really!) / works but no symbol

Brightness Down

no keycode

239

101

-

? / bright-

101 / nosymbol

works, no keycode and nosymbol

101

239

works but no keycode

Cut

188 / cut

NA

n/a

Copy

248 / copy

NA

n/a

Paste

192 / paste

NA

n/a

Calculator

XF86Calculator

161 / calc

NA

n/a

Internet (browser)

XF86HomePage

130 / homepage

178 / doesn't work

doesn't work

NA

178 / XF86WWW / does nothing

e-mail

XF86Mail

236 / mail

236 / XF86Mail / launch kmail

NA

236 / XF86Mail / launch kmail

Search

122 / find

NA

n/a

Back

XF86Back

234 / back

doesn't work

NA

n/a

Forward

XF86Forward

233 / forward

doesn't work

NA

n/a

Favorites/Bookmarks

XF86Favorites

230 / bookmarks

NA

n/a

How to get keycode?

You can get keycode by running xev program from command line (terminal/Konsole) and then pressing the special laptop keys and searching for keycode, for example output:

KeyPress event, serial 28, synthetic NO, window 0x5000001,
    root 0x76, subw 0x0, time 1400690129, (70,50), root:(74,102),
    state 0x0, keycode 223 (keysym 0x1008ff10, XF86Standby), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x5000001,
    root 0x76, subw 0x0, time 1400690129, (70,50), root:(74,102),
    state 0x0, keycode 223 (keysym 0x1008ff10, XF86Standby), same_screen YES,
    XLookupString gives 0 bytes:

An easier way to do this is to run:

xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'

This will only output pressed keycode and currently assigned keysym, for example:

160 XF86AudioMute
174 XF86AudioLowerVolume
176 XF86AudioRaiseVolume

How to get HAL events?

You can get HAL events by running lshal -m program from command line (terminal/Konsole) and the pressing special laptop keys which will generate output like this: {{{Start monitoring devicelist:


platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = sleep platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = battery platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = help platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = presentation platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = mute platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = volumedown platform_i8042_i8042_Kbd_Port_logicaldev_input condition ButtonPressed = volumeup }}}

What if the key does not produce keycode / HAL event?

You should check ["LaptopTestingTeam/HotkeyResearch"] page for details how to get this addressed.

Developer's TODO List

  • Add missing keycode -> xkeysym mappings: XF86HomePage, XF86Lock (what xkeysym to use)?

  • Add missing default actions: Lock, Favorites
  • Diagnose and fix XF86WWW which does not get properly processed

  • Try to pre-configure Firefox to work out of the box (similar to Konqueror)

User Comments & Notes

Please add your comments here and add your name.

Notes

Travelmate 8100 Notes: I have a wireless button. To get it to work I had to first edit the hotkeys-setup (/usr/share/hotkeys-setup/acer.hk) and add the lines

{{{setkeycodes e055 $KEY_F13 # Orange Wireless On (hardware, led, informational only) setkeycodes e056 $KEY_F14 # Orange Wireless Off (hardware, led, informational only)}}}

then I could set up the keycodes in X with xmodmap to ifup/ifdown the wlan.

{{{keycode 182 = XF86User1KB keycode 183 = XF86User2KB}}}

Would be nice if these buttons could be used "out of the box". Although perhaps to leave it to the user in kde as to how they manage the actual buttons

Dell Inspiron 6400 Notes:

  • [1]:Wifi key behavior is configurable at the BIOS.
  • [2]:It takes a while and then it prints:

acpi_BAT0 property battery.voltage.current = 12562 (0x3112)

HP Compaq NX9005 Notes:

  • It seems that I can't even check the keycodes of the Search, Lock, Help and Wireless buttons on this laptop - tried: xev, lshal, showkey, check acpi events from log, KDE hotkey assign. Other buttons, like "XF86WWW", XF86Mail, XF86AudioRaiseVolume, XF86AudioLowerVolume work without problems.
  • Laptop: Hewlett-Packard HP nx9005 (DJ163A) KAM1.58

Travelmate 3212WXWmi Notes:

Fujitsu-Siemens Amilo Pro Edition V3505:

  • Has a wireless hotkey (that does Wifi + Bluetooth on/off under Windows). Doesn't work out of the box in Feisty Herd 4. Returns no keycode in xev. Returns this in dmesg: [ 306.976000] atkbd.c: Unknown key released (translated set 2, code 0xd6 on isa0060/serio0).

    [ 306.976000] atkbd.c: Use 'setkeycodes e056 <keycode>' to make it known.

  • Has a wireless on/off key accessible through Fn+F10. Doesn't work in Feisty Herd 4. Returns no keycode in xev. Returns this in dmesg (same as wireless hotkey): [ 881.612000] atkbd.c: Unknown key pressed (translated set 2, code 0xd6 on isa0060/serio0).

    [ 881.612000] atkbd.c: Use 'setkeycodes e056 <keycode>' to make it known.

KubuntuLaptopKeycodes (last edited 2009-03-02 11:17:29 by 195-241-206-92)