linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve White <swhite@zipcon.net>
To: linux-hotplug@vger.kernel.org
Subject: Lenovo IdeaPad S206
Date: Fri, 26 Apr 2013 08:46:24 +0000	[thread overview]
Message-ID: <20130426084624.GA28942@iota> (raw)

[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]

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 #2: udev-db.txt.gz --]
[-- Type: application/x-gunzip, Size: 14526 bytes --]

[-- Attachment #3: lenovo-ideapad-s206 --]
[-- Type: text/plain, Size: 615 bytes --]

# 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

             reply	other threads:[~2013-04-26  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  8:46 Steve White [this message]
2013-04-27 16:15 ` Lenovo IdeaPad S206 Steve White

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130426084624.GA28942@iota \
    --to=swhite@zipcon.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).