From: Hans de Goede <hdegoede@redhat.com>
To: Jamie Lentin <jm@lentin.co.uk>
Cc: Jiri Kosina <jkosina@suse.cz>, Antonio Ospite <ao2@ao2.it>,
linux-usb <linux-input@vger.kernel.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Subject: Re: Mapping of F11 and F12 on new lenovo laptops and Lenovo Compact Keyboard
Date: Fri, 20 Jun 2014 14:44:50 +0200 [thread overview]
Message-ID: <53A42CC2.9010608@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1406201238550.4059@marmot.wormnet.eu>
Hi,
On 06/20/2014 02:00 PM, Jamie Lentin wrote:
> On Thu, 19 Jun 2014, Hans de Goede wrote:
>
>> Hi Jamie,
>>
>> I saw your patch-set for the Lenovo Compact Keyboard on the lwn.net
>> kernel page.
>>
>> This spiked my interest as I'm the author of this patch:
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/platform/x86/thinkpad_acpi.c?id=8b9dd4fab26a0f328420cbda0845a325f45bcd92
>>
>> Which adds mapping for the F9 - F12 on the Lenovo *40 series
>> laptops, which have the same weird symbols on F11 and F12 as the
>> Lenovo Compact Keyboard, the ones which you describe as:
>>
>> /* Fn-F11: View open applications (3 boxes) */
>> /* Fn-F12: Open My computer (6 boxes) USB-only */
>>
>> You map these to:
>> KEY_FN_F11
>> KEY_FILE
>>
>> Where as my (already merged into Linus tree) patch maps these to:
>>
>> KEY_SCALE
>> KEY_COMPUTER
>>
>> Which are defined in linux/uapi/input.h as:
>>
>> #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */
>> #define KEY_COMPUTER 157
>>
>> Which I believe maps closes to View open applications (which to me
>> sounds like expose mode) and Open My computer.
>
> Yes, the Function keys look the same:-
> http://www.lenovo.com/images/gallery/1060x596/lenovo-laptop-thinkpad-t440-overhead-keyboard-2.jpg
> https://c2.staticflickr.com/6/5467/9092693533_440cfcf311_z.jpg
>
> I went with KEY_FILE on the USB keyboard, since this is what it's mapped to on the Bluetooth keyboard, as part of the CONSUMER usage page:-
> http://lxr.free-electrons.com/source/drivers/hid/hid-input.c#L694
Ah, well if the bluetooth version of the keyboard actually uses a standard
HUT code for that and that maps to KEY_FILE, then I agree that it would
be best to map the "F-12" key to KEY_FILE.
> Personally I've no fondness to what the keys map to, since I remap them to how they are labelled on an Thinkpad X230, which is pause/nexttrack. However, it seems somewhat silly customising something that appears to be a standard mapping.
>
>> Note that on the laptops the keys have their special meaning by
>> default and using Fn turns them back into normal F11 keys, so
>> KEY_FN_F11 seems like a particular bad match as that suggests
>> a key combo which it is not on the laptops.
>
> That's true. It works fine with Fn-ESC but yes, on these keyboards they are labelled such that F11 is the Fn-modified version.
Right so lets just go with KEY_SCALE then? If you switch F-11 to
KEY_SCALE in the next version of your patch set, then I'll send
a followup patch for thinkpad-acpi to change F-12 to KEY_FILE, and
then the 2 mappings will be in sync.
Agreed ?
Regards,
Hans
next prev parent reply other threads:[~2014-06-20 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 8:41 Mapping of F11 and F12 on new lenovo laptops and Lenovo Compact Keyboard Hans de Goede
2014-06-20 12:00 ` Jamie Lentin
2014-06-20 12:44 ` Hans de Goede [this message]
2014-06-21 13:10 ` Jamie Lentin
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=53A42CC2.9010608@redhat.com \
--to=hdegoede@redhat.com \
--cc=ao2@ao2.it \
--cc=jkosina@suse.cz \
--cc=jm@lentin.co.uk \
--cc=linux-input@vger.kernel.org \
--cc=platform-driver-x86@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 NNTP newsgroup(s).