Lenovo IdeaPad S206

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

My new Lenovo IdeaPad S206 has a special button ("OneKey recovery system"
button) that I wanted to re-map to a sleep button.  I did this, and it
works well.  There is also a QS key, that one could profitably re-map.

Along the way realized that the generic IdeaPad mappings of the Ubuntu 12.10
distro are largely incompatible with the keys on this computer.
So I set out to remedy that.

I'm not sure I'm following best practices though.  In particular, should
existing IdeaPad rules be restricted, or should the mappings be overridden?

I have some evidence that the mappings here should also work for the S200,
but I'm pretty sure they *aren't* appropriate for the S205.
  ________________________________
$ cat /sys/class/dmi/id/sys_vendor
LENOVO
$ cat /sys/class/dmi/id/product_name
2638
$ cat /sys/class/dmi/id/product_version
Lenovo IdeaPad S206
  ________________________________
The OneKey button on this machine is perfect for a sleep button:
it is easily accessible, but impossible to press accidentally.

To simply re-map the OneKey button, I first observed:
A 0x10 press-release pair is emitted if the button is given a substantial
press, and released. After about 3 sec of continuous pressing,
a 0x11 press-release pair is emitted.

I put a rule like this under "keyboard_modulecheck":
  ________________________________
ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="Ideapad extra buttons", ATTR{[dmi/id]product_version}=="*S206|*S200", RUN+="keymap $name 0x10 sleep 0x11 hibernate"
  ________________________________
For the other keys, I have made a keymap file, which at least gets the proper
mappings going.  I'm not sure if I really improved anything.  See attached.

For one thing, some of the keys don't seem to make scan codes on any device
(the camera key on the F9 key.) Some seem to work regardless of how I map
them -- I guess that means they're going straight to hardware and the
system just reads the hardware state.

I'll be glad to hear what you think!

Attachment: udev-db.txt.gz
Description: application/gunzip

# key codes on Lenovo IdeaPad S206, and presumably the S200
0x81 reserved           # disable lenovo-ideapad mapping
0xB9 reserved           # disable lenovo-ideapad mapping
0xBA reserved           # disable lenovo-ideapad mapping
0xF1 f6                 # on F6 touchpad toggle (disabled)
0x83 rfkill             # on F7 handled in module-lenovo-ideapad-s206
0xCE micmute            # on F8
#???? camera            # on F9 can't find this in udev
0xDB switchvideomode    # on F10 
0xF0 display_off        # on F11 
0xCC brightnessdown     # on F12
0xD4 brightnessup       # on ins
0x82 unknown            # QS key

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux