Lenovo IdeaPad S206
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!
# 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
Hi,
In the previous post, I had confused the "win" key with the "switch video" key. This is corrected now. See attached.
I still have several questions:
switch video
------------
The key meant to switch video (mod F10) produces two scan codes. In man showkey, there are some remarks, but I don't know what they mean.
$ keymap -i /input/event4 scan code: 0xDB scan code: 0x19 (both scancodes emitted together only once on press, nothing on longer hold, nothing on release) $ showkey -s 0x19 on press 0x99 on release
** What does this mean, and how are such results to be used with udev rules?
camera off-on
-------------
I can't see that this key (mod F9) generates anything on any device, although it does in fact seem to kill the USB-based camera.
** Any ideas?
kill key
----------
The kill key (mod F4) very effectively kills any terminal it's running in, so I have yet to determine what scan codes it generates.
** Any ideas?
# 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 # mod F6 touchpad toggle (disabled) 0x83 rfkill # mod F7 handled in module-lenovo-ideapad-s206 0xCE micmute # mod F8 #???? camera # mod F9 can't find this in udev #???? switchvideomode # mod F10 emits multiple scancodes? 0xF0 display_off # mod F11 0xCC brightnessdown # mod F12 0xD4 brightnessup # mod ins 0xDB menu # win key 0x82 unknown # QS key