plugin: Logitech Cordless Keyboard

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

plugin: Logitech Cordless Keyboard

Post by topix » Sat Jan 23, 2010 8:33 am

Hello, i made a plugin for my Logitech Cordless Keyboard (VID: 046D, PID: C505). It's based on Bitmonster's Logitech UltraX plugin (thank you).

Only the media and internet keys are recognized.
It's just a quick hack. I think long button presses will not work. Didn't know how to make this work.
Attachments
picture.gif
picture.gif (8.54 KiB) Viewed 3270 times
__init__.py
Logitech Cordless Keyboard plugin ver. 1.0.0
(2.81 KiB) Downloaded 262 times

Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: plugin: Logitech Cordless Keyboard

Post by Bartman » Sat Feb 20, 2010 5:51 pm

I modified the pid of the plugin to fit my Logitech Keyboard.
The problem is that the mouse was also grouped with the extra keys in the device manager and now does not work anymore.
Some keys have wrong names, but that is a minor issue.

Wagner
Posts: 3
Joined: Sun Aug 23, 2009 4:15 am

Re: plugin: Logitech Cordless Keyboard

Post by Wagner » Sun Feb 21, 2010 6:53 pm

I was formerly using the generic HID plugin for this purpose, but this has the huge benefit of blocking the normal button functions. Enduring events seem to work fine on my end, what problem where you having with them?

My keyboard supports two simultaneous key presses, with the second and third digits in 'data'. This causes a problem with the code as attached, issuing a second keypress for the key held if you press a second key. I've currently worked around this by storing the previous state, and checking it against the current data, but then this will cause problems with enduring events, as EG only allows one active event per plugin.

Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: plugin: Logitech Cordless Keyboard

Post by Bartman » Sun Feb 21, 2010 6:58 pm

The problem is that the mouse function is also taken over by the WinUSB driver.

The second USB Input device is taken over by the WinUSB driver. Notice the HID-compliant mouse
Attachments
usb.png
usb.png (8.92 KiB) Viewed 3192 times

Post Reply