From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rakesh Iyer <riyer@nvidia.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: Laptop Function key (KEY_FN) not recognized by XWindows
Date: Mon, 7 Feb 2011 10:48:29 -0800 [thread overview]
Message-ID: <20110207184829.GB31901@core.coreip.homeip.net> (raw)
In-Reply-To: <1FC56210173BB445BD77F608D6FB8D03165A0080B0@HQMAIL03.nvidia.com>
Hi Rakesh,
On Fri, Feb 04, 2011 at 05:05:50PM -0800, Rakesh Iyer wrote:
> Hi All.
>
> I am writing a Keyboard driver where the Function key (as seen in Laptop) is used as a modifier.
> In my driver I have used "KEY_FN"(from include/linux/input.h) as the keycode for this key.
>
> When I run "xev" the key press events do not get detected.
> If I modify the keycode to say KEY_MEDIA, "xev" does show the event properly.
>
> I am wondering how to go about getting this key detected and processed by XWindows.
Yes, indeed, you are stumbling against limitation of X which does not
allow to pass keycodes above 255 through it.
One option would be assigning KEY_LEFTMETA or KEY_RIGHTMETA to your 'Fn'
key and then adjusting keymaps, but after I looked again at the keys you
have assigned by default to your Fn combinations can see how one would
want to avoid involving X's keymaps and be able to generate needed
keycodes directly (volume, brightness and other control events) so that
infrastructure need not be hooked into X to be able to react to them.
I think if you implement a hard/soft-fn flag in platform data and, in
case of hard_fn mode would suppress KEY_FN event but rather treat it as
most significant bit in your row data (effectively doubling keymap size)
that would solve your issue.
What do you think?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2011-02-07 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-05 1:05 Laptop Function key (KEY_FN) not recognized by XWindows Rakesh Iyer
2011-02-07 18:48 ` Dmitry Torokhov [this message]
2011-02-07 19:34 ` Rakesh Iyer
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=20110207184829.GB31901@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=riyer@nvidia.com \
/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).