From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Derek Fawcus <dfawcus@cisco.com>
Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com,
linux-input@vger.kernel.org
Subject: Re: Re (hello?): [PATCH] Let keyboard notifiers modify key codes
Date: Tue, 13 Jan 2009 02:45:45 +0100 [thread overview]
Message-ID: <20090113014545.GG5026@const.famille.thibault.fr> (raw)
In-Reply-To: <20090113010613.GA23244@cisco.com>
Derek Fawcus, le Tue 13 Jan 2009 01:06:13 +0000, a écrit :
> > Yes, that seems a bit unsafe to me. Another solution is to just grab
> > all the keyboard devices, and reemit the wanted evdev keycodes. Quite
> > clumsy.
>
> reemit? as in inject back to the kernel?
Through uinput, yes.
> How does one prevent loops?
By not grabbing the evdev corresponding to your own uinput dev. IIRC it
can even work with several daemons doing so, the last being only able to
grab the last uinput's evdev. If a daemon hangs, no luck, however.
> > > I'm not sure w/o reading the code if the kernel will allow this to be
> > > shared between the tty and evdev on the same vt,
> >
> > What do you mean by "this"?
>
> I was referring to being able to read the evdev data from the keyboard
> while still allowing the vt to consume the data. Can one filter out
> just keys of interest, or will reading the /dev/input/eventX prevent
> the keys being fed to the vt and hence to /dev/ttyXX?
Grabbing does prevent it yes. But feeding through uinput puts it back
to the console.
> > > but then one could run a controller program talking through a pty and
> > > direct to the keyboard.
> >
> > Ugh. I'd prefer grabing evdev rather that using a pty.
>
> Well using the pty is not too bad, and some stuff seems unhappy unless
> fed from a tty of some form (default line buffering for stdin/stdout,
> job control with bash).
The problem with ptys too is that they manipulate letters, not physical
key position, thus loosing keyboard mapping independence.
> Anyway, wouldn't this all be easier with a app running on X and
> XKEYBOARD/XKB manipulations? Have the key that does left/right
> swapping simply be a group toggle action in the definition file.
Sure, but sometimes you're left without X, and that's not a reason for
suddenly completely loose typing speed.
Samuel
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-01-13 1:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 0:58 [PATCH] Let keyboard notifiers modify key codes Samuel Thibault
2009-01-09 21:23 ` Re (hello?): " Samuel Thibault
2009-01-09 21:35 ` Alan Cox
2009-01-09 21:43 ` Samuel Thibault
2009-01-09 22:01 ` Alan Cox
2009-01-09 22:23 ` Samuel Thibault
2009-01-12 22:36 ` Derek Fawcus
2009-01-12 22:51 ` Samuel Thibault
2009-01-13 1:06 ` Derek Fawcus
2009-01-13 1:45 ` Samuel Thibault [this message]
2009-01-15 7:40 ` Pavel Machek
2009-01-16 19:36 ` Samuel Thibault
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=20090113014545.GG5026@const.famille.thibault.fr \
--to=samuel.thibault@ens-lyon.org \
--cc=dfawcus@cisco.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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