Anonymous - 2011-05-05

I use an Aten CS1782. It registers both my mouse and keyboard with the same id.

Registering Devices:
    Standard - Directory [input]
    Standard - Power Button [event0] vId: 0x0 pId: 0x1
    Standard - Power Button [event1] vId: 0x0 pId: 0x1
    Keyboard - USB Keyboard [event2] vId: 0x4d9 pId: 0x2221
    Keyboard - USB Keyboard [event3] vId: 0x4d9 pId: 0x2221
    Keyboard - USB Keyboard [event4] vId: 0x4d9 pId: 0x2221
   Powermate - Griffin PowerMate [event5] vId: 0x77d pId: 0x410

As I have come to understand this makes it impossible to use the Powermate as there must be a keyboard and mouse registered first.
I tested to change:

if Event.Class in self.InterestedClasses and len(Gizmod.Mice) and len(Gizmod.Keyboards):

to

if Event.Class in self.InterestedClasses:

in the file GizmoScriptDefault.py.

The powermate can after this raise and lower the sound volume, and also mute it. But if I focus Firefox for example and try to scroll, it crashes.

Traceback (most recent call last):
  File "/usr/etc/gizmod/GizmodDispatcher.py", line 109, in onEvent
    if UserScript.onEvent(Event, Gizmo):
  File "/usr/etc/gizmod/modules.d/bases/GizmoScriptActiveApplication.py", line 65, in onEvent
    return self.onDeviceEvent(Event, Gizmo)
  File "/usr/etc/gizmod/modules.d/210-Powermate-Firefox.py", line 68, in onDeviceEvent
    Gizmod.Mice[0].createEventRaw(GizmoEventType.EV_REL, GizmoMouseAxis.WHEEL, -Event.Value)
IndexError: list index out of range
Failed to call GizmodDispatcher.onEvent for deserializeMessage

I also tried to register,

KEYBOARD_GIZMOS = ["keyboard", "0x4d9:0x2221"]

and also tried both this and

MOUSE_GIZMOS = ["mouse", "trackball", "touchpad", "!Macintosh mouse button emulation", "0x4d9:0x2221"]

Need I say, it did not work?

I did not have this problem before I got the CS1782, which is quite lovely I might add. With the exception for this.

I run kubuntu 11.04 x86_64, I had to soft-link /usr/etc/gizmod -> /etc/gizmod/ for gizmod to function, but that's a ubuntu problem.

I'm grateful for any help.