From: Corentin Chary <corentincj@iksaif.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "Konstantin V. Gavrilenko" <k.gavrilenko@arhont.com>,
Yong Wang <yong.y.wang@intel.com>,
linux-input@vger.kernel.org,
Seth Forshee <seth.forshee@canonical.com>
Subject: Re: asus_wmi: Unknown key pressed
Date: Mon, 7 Jan 2013 09:06:30 +0000 [thread overview]
Message-ID: <CAHR064hpC2zg6LttQ-t5Hvvp5tBPBGwqzdhghRFmdedvsLdyww@mail.gmail.com> (raw)
In-Reply-To: <20130107074015.GA22213@core.coreip.homeip.net>
On Mon, Jan 7, 2013 at 7:40 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Sun, Jan 06, 2013 at 06:30:40PM +0000, Corentin Chary wrote:
>> On Sat, Jan 5, 2013 at 11:09 PM, Dmitry Torokhov
>> <dmitry.torokhov@gmail.com> wrote:
>> > On Sat, Jan 05, 2013 at 08:06:32PM +0000, Corentin Chary wrote:
>> >> On Sat, Jan 5, 2013 at 7:19 PM, Konstantin V. Gavrilenko
>> >> <k.gavrilenko@arhont.com> wrote:
>> >> > Thanks for a prompt response.
>> >> >
>> >> > for all three events the showkey generates the same data
>> >> >
>> >> > keycode 240 press
>> >> > keycode 240 release
>> >> >
>> >> > ----- Original Message -----
>> >> > From: "Corentin Chary" <corentincj@iksaif.net>
>> >> > To: "Konstantin V. Gavrilenko" <k.gavrilenko@arhont.com>
>> >> > Cc: "Yong Wang" <yong.y.wang@intel.com>, "Dmitry Torokhov" <dtor@mail.ru>
>> >> > Sent: Saturday, 5 January, 2013 6:58:11 PM
>> >> > Subject: Re: asus_wmi: Unknown key pressed
>> >> >
>> >> > Hi,
>> >> >
>> >> > On Sat, Jan 5, 2013 at 3:17 PM, Konstantin V. Gavrilenko
>> >> > <k.gavrilenko@arhont.com> wrote:
>> >> >> Hi Guys,
>> >> >>
>> >> >> sorry for writing out of the blue, but your email addresses where provided in the kernel modules. I hope you will direct me to a better place where I can report the problem or someone that can help solve the problem with asus_wmi module.
>> >> >>
>> >> >> In my new laptop UX51VZA v203 my syslog is constantly filled with the following lines, even though I do not press any buttons on the keyboard.
>> >> >>
>> >> >> Dec 30 08:28:52 dynomob kernel: [22731.108645] asus_wmi: Unknown key c6 pressed
>> >> >> Dec 30 08:28:53 dynomob kernel: [22732.110834] asus_wmi: Unknown key c6 pressed
>> >> >> Dec 30 08:28:58 dynomob kernel: [22737.079312] asus_wmi: Unknown key c6 pressed
>> >> >> Dec 30 08:28:59 dynomob kernel: [22738.075352] asus_wmi: Unknown key c6 pressed
>> >> >> Dec 30 08:29:00 dynomob kernel: [22739.076342] asus_wmi: Unknown key c6 pressed
>> >> >> Dec 30 08:29:01 dynomob kernel: [22740.083493] asus_wmi: Unknown key c6 pressed
>> >> >>
>> >> >>
>> >> >> It took me a while to work out that this was information from the ambient light sensor )) and since there is no way to operate it or disable it, I had to cover it with a piece of black paper. Such default behavior is very disruptive as it generates an actual unseen key press, that is extremely annoying if you trying to type a password.
>> >> >
>> >> > This should not generate any key if the key is unknown. But maybe
>> >> > another key is generated (and not logged). Can you run showkey in a
>> >> > terminal and try to see what keycode you are getting ?
>> >> > I'll make a patch to ignore this key.
>> >> >
>> >> >> There are couple of other unknown signals tat I managed to figure out, namely
>> >> >>
>> >> >> Fn+A (ambient light button) generates
>> >> >> Jan 5 15:12:08 dynomob kernel: [46786.001579] asus_wmi: Unknown key 7a pressed
>> >> >
>> >> > Will map this key to some keycode.
>> >> >
>> >> >> unplugging of the powercord generates
>> >> >> Jan 5 15:13:08 dynomob kernel: [46845.606336] asus_wmi: Unknown key cf pressed
>> >> >
>> >> > Don't know what is means, so will probably just be ignored with a comment.
>> >> >
>> >> > Thanks,
>> >>
>> >> Oh right, Seth added some code to send KEY_UNKNOWN keys in such cases.
>> >> Seth, maybe keys present with KEY_IGNORE type should not send
>> >> KEY_UNKNOWN to avoid this kind of issues ?
>> >
>> > KEY_UNKNOWN should not really be mapped to any key so it should not
>> > interfere with normal typing/other operations while still being able to
>> > detect the events. The idea is for users to be able to notice the new
>> > events and then developers can decide if they should be ignored or
>> > mapped to some particular keycodes (or maybe routed through some other
>> > subsystem).
>>
>> The issue here is that the scancode is already present in the keymap
>> with the type "KE_IGNORE" instead of "KE_KEY", but sparse_keymap seems
>> to send KEY_UNKNOWN anyway.
>> And Konstantin seems to say that it's bad in some cases (passwords?).
>
> No, sparse keymap does not generate KEY_UNKNOWN events for entries
> marked KE_IGNORE. As far as I can see none of the codes mentioned by
> Konstantin are defines in keymap found in asus-nb-wmi.
Ah right, I misread sprase-keymap.c, and using KE_IGNORE here should work.
Sorry for the confusion.
--
Corentin Chary
http://xf.iksaif.net
next prev parent reply other threads:[~2013-01-07 9:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHR064jzPejiWM_XqeY0a+Uf7cYPUrYMNd0FDEUvwkgrMB1hDg@mail.gmail.com>
[not found] ` <22009182.20.1357413346491.JavaMail.gkos@dynomob>
2013-01-05 20:06 ` asus_wmi: Unknown key pressed Corentin Chary
2013-01-05 23:09 ` Dmitry Torokhov
2013-01-06 18:30 ` Corentin Chary
2013-01-07 7:40 ` Dmitry Torokhov
2013-01-07 9:06 ` Corentin Chary [this message]
2013-01-07 11:05 ` Konstantin V. Gavrilenko
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=CAHR064hpC2zg6LttQ-t5Hvvp5tBPBGwqzdhghRFmdedvsLdyww@mail.gmail.com \
--to=corentincj@iksaif.net \
--cc=dmitry.torokhov@gmail.com \
--cc=k.gavrilenko@arhont.com \
--cc=linux-input@vger.kernel.org \
--cc=seth.forshee@canonical.com \
--cc=yong.y.wang@intel.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).