linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Reported key not released
@ 2014-11-23 13:13 Pali Rohár
  2014-11-24 20:04 ` Matthew Garrett
  0 siblings, 1 reply; 5+ messages in thread
From: Pali Rohár @ 2014-11-23 13:13 UTC (permalink / raw)
  To: linux-input, platform-driver-x86
  Cc: Matthew Garrett, Darren Hart, Gabriele Mazzotta, Alex Hung

[-- Attachment #1: Type: Text/Plain, Size: 1604 bytes --]

Hello,

my laptop (Dell Latitude E6440) has HW switch which for disabling 
some radio devices (bluetooth, wifi, 3g; list of devices can be 
configured in BIOS).

When I enable or disable this switch it correctly enable or 
disable devices (and also hard rfkill status is set correctly).

But problem is that switch generate key press event on i8042 
keyboard controller without release event. See output:

$ sudo input-events 4
/dev/input/event4
   bustype : BUS_I8042
   vendor  : 0x1
   product : 0x1
   version : 43841
   name    : "AT Translated Set 2 keyboard"
   phys    : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events
...
(here I enabled switch)
14:04:07.047897: EV_MSC MSC_SCAN 136
14:04:07.047897: EV_KEY KEY_UNKNOWN (0xf0) pressed
14:04:07.047897: EV_SYN code=0 value=0
(and after that my terminal emulator start writing dummy chars)
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@1

(here I disabled switch)
14:04:08.730526: EV_MSC MSC_SCAN 136
14:04:08.730526: EV_KEY KEY_UNKNOWN (0xf0) pressed
14:04:08.730526: EV_SYN code=0 value=0

So I think that above chars were written because there was no 
release event.

I have two questions:

1) Should kernel for this special switch key emit also release 
event? And if yes, how to do that if keyboard controller do not 
do that?

2) It is possible to remap KEY_UNKNOWN to something meaningful? 
Or it should be KEY_UNKNOWN iff BIOS already handle hard rfkill 
state?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-24 22:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-23 13:13 Reported key not released Pali Rohár
2014-11-24 20:04 ` Matthew Garrett
2014-11-24 20:58   ` Pali Rohár
2014-11-24 21:51     ` Matthew Garrett
2014-11-24 22:04       ` Pali Rohár

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).