KubuntuLaptopKeycodes
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 |
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 |
|
Sleep |
XF86Standby |
223 / sleep |
223 /sleep |
|
sleep |
|
|
sleep |
223 / sleep |
|
223 / sleep |
Hibernate |
XF86Sleep |
|
165 / hibernate |
|
|
|
|
165 |
- |
|
|
Battery/Power modes |
XF86LaunchB |
241 / battery |
241 |
|
|
241 |
|
241 / battery |
- |
|
|
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 |
Volume Down |
XF86AudioLowerVolume |
174 / volumedown |
|
174 |
174 / volumedown |
174 |
174 |
174 / volumedown |
174 / volumedown |
174 |
? / vol+ |
Volume Up |
XF86AudioRaiseVolume |
176 / volumeup |
|
176 |
176 / volumeup |
176 |
176 |
176 / volumeup |
176 / volumeup |
176 |
? / vol- |
Play/Pause |
XF86AudioPause |
|
|
|
|
|
|
162 |
162 / playpause |
|
162 / doesn't work |
Next Track |
XF86AudioNext |
|
|
|
|
|
|
153 |
153 / nextsong |
|
153 / doesn't work |
Previous Track |
XF86AudioPrev |
|
|
|
|
|
|
144 |
144 / previoussong |
|
144 / doesn't work |
Stop |
XF86AudioStop |
|
|
|
|
|
|
164 |
164 / stopcd |
|
164 / doesn't work |
Lock screen |
XF86Lock |
|
146 |
|
|
n/a |
|
|
- |
|
146 / doesn't work |
Switch Monitor |
|
|
|
|
|
? |
|
170 |
- |
n/a |
no number |
Eject CD/DVD |
XF86Eject |
|
|
|
|
no keycode |
|
204 |
- |
204 |
|
Brightness Up |
|
|
|
|
|
212 |
no keycode |
212 |
- |
|
? / bright+ |
Brightness Down |
|
|
|
|
|
no keycode |
239 |
101 |
- |
|
? / bright- |
Cut |
|
|
|
|
|
|
|
|
188 / cut |
|
|
Copy |
|
|
|
|
|
|
|
|
248 / copy |
|
|
Paste |
|
|
|
|
|
|
|
|
192 / paste |
|
|
Calculator |
XF86Calculator |
|
|
|
|
|
|
|
161 / calc |
|
|
Internet (browser) |
XF86HomePage |
|
|
|
|
|
|
|
130 / homepage |
|
178 / doesn't work |
XF86Mail |
|
|
|
|
|
|
|
236 / mail |
|
|
|
Search |
|
|
|
|
|
|
|
|
122 / find |
|
|
Back |
XF86Back |
|
|
|
|
|
|
|
234 / back |
|
|
Forward |
XF86Forward |
|
|
|
|
|
|
|
233 / forward |
|
|
Favorites/Bookmarks |
XF86Favorites |
|
|
|
|
|
|
|
230 / bookmarks |
|
|
Notes
Travelmate 8100 Note: 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)
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.
TODO
Keyboard stuff from KubuntuFeistyLaptop
Add missing keycode -> xkeysym mappings: XF86HomePage, XF86Lock
- Add missing default actions: Standby, Suspend, Lock, Favorites, Battery
Diagnose and fix XF86WWW which does not get properly processed
- Try to pre-configure Firefox to work out of the box (similar to Konqueror)