[FIXED] Error adding device in Plugin HID

Found a bug in EventGhost? Report it here.
Post Reply
fidoboy
Experienced User
Posts: 74
Joined: Mon Jun 25, 2007 7:48 am

[FIXED] Error adding device in Plugin HID

Post by fidoboy » Thu Aug 16, 2007 5:19 pm

I'm using this keyboard: http://images.umdonline.com/cde2946c4c3 ... image.jpeg all works fine from me (special keys, etc). This device creates four HID devices, and all of them with identical names. Three of them (the first, second and fourth device) works fine and i can add them to the Autostart, but when i try to add the third device, i get this error:

Code: Select all

Error reading HID device: Genius MCE RX
Exception in thread \\?\hid#vid_0458&pid_0072&mi_01&col04#7&16810678&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}:
Traceback (most recent call last):
  File "threading.pyc", line 460, in __bootstrap
  File "C:\Archivos de programa\EventGhost\plugins\HID\__init__.py", line 535, in run
UnboundLocalError: local variable 'buf' referenced before assignment
I'm using EventGhost 0.3.6.1094

regards,

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

Re: Error adding device in Plugin HID

Post by Bartman » Thu Aug 16, 2007 7:36 pm

I'm not a hundert percent sure, but this might be a report length of zero bytes.
The attached file will catch this, but you won't be able to use this part of the device.
If you don't get the "Report length must not be zero" and keep getting the error please tell.
Attachments
__init__.py
(30.26 KiB) Downloaded 358 times

fidoboy
Experienced User
Posts: 74
Joined: Mon Jun 25, 2007 7:48 am

Re: Error adding device in Plugin HID

Post by fidoboy » Thu Aug 16, 2007 8:41 pm

Now, using your patched script, it doesn't report any error, but i can't get events from that part of device. I though that that part of device was the standard keys... but i'm not sure. My idea was to intercept events from that keyboard and use it for sending ALL keystrokes (including letter keys) to one application and my other standard keyboard to work normally from all other apps. I hope that you can understand the idea... i have two keyboards connected to my PC, one is Genius 810 wireless as HID device, and another is a standard PS2 keyboard, because i have two screens connected to my computer i want to use the HID keyboard in one screen for controlling ONLY ONE app and the standard keyboard on other screen for normal windows tasks... do you think that it could be possible to acomplish? :roll:

thanks...

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

Re: Error adding device in Plugin HID

Post by Bartman » Fri Aug 17, 2007 5:15 am

The standard keys (and mice) are used exclusivly by windows and therefore cannot be used with standard HID ways. Devices that cannot be opened are not shown in the list of the hid plugin.
To distinguish between different keyboards you have to look into direct input.

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Error adding device in Plugin HID

Post by Bitmonster » Tue Aug 21, 2007 2:26 pm

Can we set this topic to [FIXED]?
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

fidoboy
Experienced User
Posts: 74
Joined: Mon Jun 25, 2007 7:48 am

Re: Error adding device in Plugin HID

Post by fidoboy » Tue Aug 21, 2007 5:51 pm

If new script is included in the new build... yes.

regards,

fidoboy
Experienced User
Posts: 74
Joined: Mon Jun 25, 2007 7:48 am

Re: Error adding device in Plugin HID

Post by fidoboy » Tue Aug 21, 2007 5:53 pm

@Bartman:

but do you think that using DirectInput is possible to use two mices and two keyboards at the same time? i want to filter events from each device and send them to a fixed app for one keyboard.

Post Reply