Fixing hotkeys

Hello Bug reporter! Thanks for your report. To be able to fix the hotkeys on your laptop we need three things:

  1. What the key *should* do.
  2. What keycode (magic number) the key produces on your laptop.
  3. How to identify your laptop by the manufacturer and model.

What the key should do

If you're unsure what the key is supposed to do, reboot into the originally supplied operating system (eg. Microsoft Windows or Mac OS X) and describe what action happens there.

You should also include what the 'icon' on the key looks like (eg. looks like a half moon).

What keycode is of the key

To get the magic number (keycode) of a key follow one (or more) of these methods:

Method 1

In Ubuntu with a GNOME desktop go to:

Method 2

Method 3

Your laptop may not generate keyboard keycodes, but may instead generate ACPI events (a different way of reporting key-press events). Please do the following:

Method 4

You can get keycode by running xev program from command line (terminal) 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

Identifying your laptop

To be able to map the hotkey on your laptop correctly, we need to be able to tell if it is your laptop. Please:

Other sources of information

LaptopTestingTeam/Old/HotkeyResearch (last edited 2010-03-01 22:46:27 by 94)