linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev keymaps: support for force_release quirk
Date: Sat, 28 Nov 2009 21:36:45 +0000	[thread overview]
Message-ID: <20091128213645.GA32698@sig21.net> (raw)
In-Reply-To: <20091126173912.GA25185@sig21.net>

On Sat, Nov 28, 2009 at 11:14:54AM -0800, Greg KH wrote:
> On Thu, Nov 26, 2009 at 06:39:12PM +0100, Johannes Stezenbach wrote:
> > 
> > (please keep me Cc'd, I'm not subscribed)
> > 
> > following existing practice I wanted to add a quirk
> > for the hotkeys of the Samsung N130 in the same way
> > as it was done for the NC10, but was informed that
> > this method is no longer accepted since the quirk can
> > be handled in userspace using the force_release
> > sysfs attribute introduced in 2.6.32-rc.
> 
> What specific quirk are you needing for the N130?  I have one here and
> it seems to work just fine.

Well, by default most of the Fn keys have no keycode assigned,
so no problem except that the Fn keys don't work.

[  163.138031] atkbd.c: Unknown key pressed (translated set 2, code 0xf9 on isa0060/serio0).
[  163.138052] atkbd.c: Use 'setkeycodes e079 <keycode>' to make it known.
[  164.721926] atkbd.c: Unknown key pressed (translated set 2, code 0xf7 on isa0060/serio0).
[  164.721947] atkbd.c: Use 'setkeycodes e077 <keycode>' to make it known.
etc.

When I add the N130 in /lib/udev/rules.d/95-keymap.rules then
they keycodes get assigned, but some of the keys don't
generate release events, which can cause an endless stream
of keyevents in X, you can see them with xev (happens only
the first time a key is pressed, after that that key is dead
since there is no release event in between; the stream of events
stops when any opther key is pressed).  This makes e.g. the
backlight control keys useless.

For Fn-F4 the behaviour is that the keyboard goes dead in X,
you need to switch to the Linux console and back to X to revive it.
Maybe because it generates FocusOut events, no idea what
X is doing here:

FocusOut event, serial 33, synthetic NO, window 0x2800001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 33, synthetic NO, window 0x2800001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 33, synthetic NO, window 0x0,
    keys:  33  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

(the keycode assigned to Fn-F4 is KEY_SWITCHVIDEOMODE)

All this isn't new, the same issues existed for the NC10 and were
fixed by adding the force_release quirk.


Thanks
Johannes

  parent reply	other threads:[~2009-11-28 21:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 17:39 udev keymaps: support for force_release quirk Johannes Stezenbach
2009-11-27 15:33 ` Martin Pitt
2009-11-27 15:48 ` Johannes Stezenbach
2009-11-27 15:57 ` Martin Pitt
2009-11-28 19:14 ` Greg KH
2009-11-28 21:36 ` Johannes Stezenbach [this message]
2009-11-30 23:27 ` Johannes Stezenbach
2009-12-01  1:28 ` Kay Sievers
2009-12-01  1:37 ` Dmitry Torokhov
2009-12-01  1:49 ` Kay Sievers
2009-12-01  1:52 ` Johannes Stezenbach
2009-12-01  1:55 ` Kay Sievers
2009-12-01  2:21 ` Johannes Stezenbach
2009-12-03  3:12 ` Dmitry Torokhov
2009-12-06 21:49 ` Johannes Stezenbach

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=20091128213645.GA32698@sig21.net \
    --to=js@sig21.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 NNTP newsgroup(s).