KubuntuLaptopKeycodes

Differences between revisions 33 and 34
Revision 33 as of 2007-02-16 19:41:29
Size: 8994
Editor: 213-140-6-122
Comment:
Revision 34 as of 2007-02-16 19:45:33
Size: 9100
Editor: 213-140-6-122
Comment:
Deletions are marked like this. Additions are marked like this.
Line 126: Line 126:
 * Some keycodes need to be set using setkeycode as they don't generate X events. This script, available at http://members.inode.at/p.pregler/linux/acer-tm3200-keys enables other special keys. It was made for an Acer Travelmate 3200, but it works well on my laptop as well.  * Some keycodes need to be set using setkeycode as they don't generate X events. This script, available at http://members.inode.at/p.pregler/linux/acer-tm3200-keys enables other special keys. It was made for an Acer Travelmate 3200, but it works well on my laptop as well. A complete list of keycodes is available at http://members.inode.at/p.pregler/linux/tm3200-keys-custom.txt

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

Sleep

XF86Standby

223 / sleep

223 /sleep

sleep

sleep

223 / sleep

223 / sleep

165

Hibernate

XF86Sleep

165 / hibernate

165

-

Available, works, no keycode

Battery/Power modes

XF86LaunchB

241 / battery

241

241

241 / battery

-

241 / XF86LaunchB

Info

XF86Launch0

245 / info

n/a

-

n/a

245 / help

Presentation

XF86LaunchC

205 / presentation

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

Volume Down

XF86AudioLowerVolume

174 / volumedown

174

174 / volumedown

174

174

174 / volumedown

174 / volumedown

174

? / vol+

174 / nosymbol

174 / volumedown

174

174

Volume Up

XF86AudioRaiseVolume

176 / volumeup

176

176 / volumeup

176

176

176 / volumeup

176 / volumeup

176

? / vol-

176 / nosymbol

176 / volume up

176

176

Play/Pause

XF86AudioPause

162

162 / playpause

162 / playrestart

162

Next Track

XF86AudioNext

153

153 / nextsong

153 / nextrack

153

Previous Track

XF86AudioPrev

144

144 / previoussong

144 / prevtrack

144

Stop

XF86AudioStop

164

164 / stopcd

164 / stop

164

Lock screen

XF86Lock

146

n/a

-

146 / doesn't work

NA

Switch Monitor

?

170

-

n/a

no number

works, no keycode

170

works, no keycode

Eject CD/DVD

XF86Eject

no keycode

204

-

204

204 / nosymbol

204

Brightness Up

212

no keycode

212

-

? / bright+

212 / nosymbol

works, no keycode and nosymbol

212

works, no keycode

Brightness Down

no keycode

239

101

-

? / bright-

101 / nosymbol

works, no keycode and nosymbol

101

239

Cut

188 / cut

NA

Copy

248 / copy

NA

Paste

192 / paste

NA

Calculator

XF86Calculator

161 / calc

NA

Internet (browser)

XF86HomePage

130 / homepage

178 / doesn't work

doesn't work

NA

e-mail

XF86Mail

236 / mail

236 / XF86Mail / launch kmail

NA

Search

122 / find

NA

Back

XF86Back

234 / back

doesn't work

NA

Forward

XF86Forward

233 / forward

doesn't work

NA

Favorites/Bookmarks

XF86Favorites

230 / bookmarks

NA

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:

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