Hi there, i am really stuck.
I have a remote Control which was bundled with a HTPC Case (MS-Tech MC-1200). It is registered as USB Keyboard AND USB Mouse. I am using Mythbuntu 9.10 (a Ubuntu Derivate).
No Problem so far, i managed to install gizmod with udev rule and all, got exclusive Accsess with following Code:
if self.Device.DeviceIDVendor == 0x4b4 and self.Device.DeviceIDProduct == 0x101:
self.Device.grabExclusiveAccess(True)
inside GizmoRegistrar
following one other post, and mapped all the Keys which come as a single Keystroke with the following code:
if Event.Code == GizmoKey.KEY_UP and Event.Value == 1: # Navigation
Gizmod.Keyboards.createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_UP)
return True
Now the more problematic Part.
Some Keys send two events like Skip Forward: KEY_LEFTCTRL + KEY_F some send three like Forward: KEY_LEFTCTRL + KEY_LEFTSHIFT + KEY_F. As you can see i can#t cath KEY_F because i can't distinguish between pressed Button Forward and Skip Forward. I need some kind of State Machine or, at least a method to save the last event and throw it away after a timeout (like 100ms).
How can I do that?
I tried a lot of possibilities until now and did a lot of research (keymaps, keyfuzz, lirc and now gizmod) and so far i think everything i need could work with gizmod. Please Help.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there, i am really stuck.
I have a remote Control which was bundled with a HTPC Case (MS-Tech MC-1200). It is registered as USB Keyboard AND USB Mouse. I am using Mythbuntu 9.10 (a Ubuntu Derivate).
No Problem so far, i managed to install gizmod with udev rule and all, got exclusive Accsess with following Code:
if self.Device.DeviceIDVendor == 0x4b4 and self.Device.DeviceIDProduct == 0x101:
self.Device.grabExclusiveAccess(True)
inside GizmoRegistrar
following one other post, and mapped all the Keys which come as a single Keystroke with the following code:
if Event.Code == GizmoKey.KEY_UP and Event.Value == 1: # Navigation
Gizmod.Keyboards.createEvent(GizmoEventType.EV_KEY, GizmoKey.KEY_UP)
return True
Now the more problematic Part.
Some Keys send two events like Skip Forward: KEY_LEFTCTRL + KEY_F some send three like Forward: KEY_LEFTCTRL + KEY_LEFTSHIFT + KEY_F. As you can see i can#t cath KEY_F because i can't distinguish between pressed Button Forward and Skip Forward. I need some kind of State Machine or, at least a method to save the last event and throw it away after a timeout (like 100ms).
How can I do that?
I tried a lot of possibilities until now and did a lot of research (keymaps, keyfuzz, lirc and now gizmod) and so far i think everything i need could work with gizmod. Please Help.
Thanks