Skip to contentSkip to conversation

generating keyboard events from userspace

DISCUSSION Philip Lawatsch 2 participants 3 messages Jan 15, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I'm currently writing an userspace application (with libusb) which handles the LCD display on a logitech g15 keyboard.

This keyboard consists of two usb devices + a usb hub. One device is the normal keyboard and the other device is the lcd + the special keys. Both devices get detected by the usb-hid driver.

Now the problem is that in order to access the lcd from userspace I have to detach usb-hid driver from the interface so I can use it. (Or, I'd have to write a driver for it which I'd like to avoid).

So, is there any way to "inject" events generated by pressing the keys on the device I'm handling myself back into the whole system from userspace?

I'd really like to avoid writing a kernel mode driver for this.

Any help would be appreciated (even redirecting me to a more suitable mailing list, I didn't find any)

kind regards Philip

#1 lore raw
Quoted 13 lines · Philip Lawatsch

Hi,

I'm currently writing an userspace application (with libusb) which handles the LCD display on a logitech g15 keyboard.

This keyboard consists of two usb devices + a usb hub. One device is the normal keyboard and the other device is the lcd + the special keys. Both devices get detected by the usb-hid driver.

Now the problem is that in order to access the lcd from userspace I have to detach usb-hid driver from the interface so I can use it. (Or, I'd have to write a driver for it which I'd like to avoid).

Quoted 8 lines

So, is there any way to "inject" events generated by pressing the keys on the device I'm handling myself back into the whole system from userspace?

I'd really like to avoid writing a kernel mode driver for this.

Any help would be appreciated (even redirecting me to a more suitable mailing list, I didn't find any)

You need uinput driver (drivers/input/misc/uinput.c)

Signature · 1 line
Dmitry
#2 lore raw
Quoted 4 lines · Dmitry Torokhov
Quoted 1 line

So, is there any way to "inject" events generated by pressing the keys on the device I'm handling myself back into the whole system from userspace?

You need uinput driver (drivers/input/misc/uinput.c)

Thanks a lot.

kind regards Philip