KubuntuLaptopKeycodes

Differences between revisions 3 and 7 (spanning 4 versions)
Revision 3 as of 2006-07-09 13:47:29
Size: 1493
Editor: CPE-144-136-118-234
Comment:
Revision 7 as of 2006-07-10 21:13:23
Size: 2785
Editor: clj46-234
Comment: better xev example
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
I am working on KubuntuLaptopButtons spec for Edgy and would like to get more reports on keycodes from laptop users. = Keycode/hal events for laptop keys =
I am working on KubuntuLaptopButtons spec for Edgy and would like to get more reports on keycodes and HAL events from laptop users.
Line 3: Line 4:
Please add your notebook (with your nick) to this table - if you have a key which is not listed, please add new row. 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}}}:
Line 6: Line 7:
|| Sleep || 223 || 223 || || Sleep || 223 / sleep || 223 ||
Line 8: Line 9:
|| Battery || 241 || ||
|| Info || 245 || ||
|| Presentation || 205 || ||
|| Mute || 160 || 160 ||
|| Volume Down || 174 || ||
|| Volume Up || 176 || ||
|| Eject || || 36 ||
|| Windows Key || || 115 ||
|| Battery/Power modes || 241 / battery || 241 ||
|| Info || 245 / info || ||
|| Presentation || 205 / presentation || ||
|| Mute || 160 / mute || 160 ||
|| Volume Down || 174 / volumedown || ||
|| Volume Up || 176 / volumeup|| ||
Line 17: Line 16:
|| Power Modes || || 241 ||
Line 20: Line 18:

Note: you can get keycode by running {{{xev}}} program from command line (termina/Konsole) and then pressing the special laptop keys and searching for keycode, for example output
== 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:
Line 40: Line 38:
xev | grep keycode xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
Line 42: Line 40:
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
}}}

Keycode/hal events for laptop keys

I am working on KubuntuLaptopButtons spec for Edgy 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

HP nw8240 BR LukaRenko

Toshiba A10 Satellite BR ["Hobbsee"]

Sleep

223 / sleep

223

Hibernate

165

Battery/Power modes

241 / battery

241

Info

245 / info

Presentation

205 / presentation

Mute

160 / mute

160

Volume Down

174 / volumedown

Volume Up

176 / volumeup

Lock screen

146

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 }}}

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