All of lore.kernel.org
 help / color / mirror / Atom feed
* usb keyboard translations
@ 2010-10-30 14:32 James Courtier-Dutton
  2010-11-01 15:58 ` H Hartley Sweeten
  0 siblings, 1 reply; 3+ messages in thread
From: James Courtier-Dutton @ 2010-10-30 14:32 UTC (permalink / raw)
  To: linux-input

Hi,

When I plug a special purpose keyboard into the USB port, it creates a
/dev/input/event9
It then provides input to the terminal as though it was a keyboard.
Unfortunately, the key mappings are all wrong for this keyboard.
Is there some way I can do key translations between the the USB
keyboard and the terminal.
The problem is I only want the translations to occur to events from
/dev/input/event9 and not any other keyboard/mouse device that is also
plugged in.
Alternatively, is there a way that I can get these events to not even
reach the terminal, and allow me to write a daemon that would listen
to /dev/input/event9 and provide a interface to my specific
application.

Kind Regards

James

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

* RE: usb keyboard translations
  2010-10-30 14:32 usb keyboard translations James Courtier-Dutton
@ 2010-11-01 15:58 ` H Hartley Sweeten
  2010-11-01 22:40   ` James Courtier-Dutton
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2010-11-01 15:58 UTC (permalink / raw)
  To: James Courtier-Dutton, linux-input

On Saturday, October 30, 2010 7:32 AM, James Courtier-Dutton wrote:
> When I plug a special purpose keyboard into the USB port, it creates a
> /dev/input/event9
> It then provides input to the terminal as though it was a keyboard.
> Unfortunately, the key mappings are all wrong for this keyboard.
> Is there some way I can do key translations between the the USB
> keyboard and the terminal.
> The problem is I only want the translations to occur to events from
> /dev/input/event9 and not any other keyboard/mouse device that is also
> plugged in.
> Alternatively, is there a way that I can get these events to not even
> reach the terminal, and allow me to write a daemon that would listen
> to /dev/input/event9 and provide a interface to my specific
> application.

Try sending ioctl EVIOCGRAB to the device after you open it in your daemon.

Hartley

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

* Re: usb keyboard translations
  2010-11-01 15:58 ` H Hartley Sweeten
@ 2010-11-01 22:40   ` James Courtier-Dutton
  0 siblings, 0 replies; 3+ messages in thread
From: James Courtier-Dutton @ 2010-11-01 22:40 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: linux-input

On 1 November 2010 15:58, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> On Saturday, October 30, 2010 7:32 AM, James Courtier-Dutton wrote:
>> When I plug a special purpose keyboard into the USB port, it creates a
>> /dev/input/event9
>> It then provides input to the terminal as though it was a keyboard.
>> Unfortunately, the key mappings are all wrong for this keyboard.
>> Is there some way I can do key translations between the the USB
>> keyboard and the terminal.
>> The problem is I only want the translations to occur to events from
>> /dev/input/event9 and not any other keyboard/mouse device that is also
>> plugged in.
>> Alternatively, is there a way that I can get these events to not even
>> reach the terminal, and allow me to write a daemon that would listen
>> to /dev/input/event9 and provide a interface to my specific
>> application.
>
> Try sending ioctl EVIOCGRAB to the device after you open it in your daemon.
>

That was what I was looking for.

Thank you

James

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

end of thread, other threads:[~2010-11-01 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-30 14:32 usb keyboard translations James Courtier-Dutton
2010-11-01 15:58 ` H Hartley Sweeten
2010-11-01 22:40   ` James Courtier-Dutton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.