> 3. type = EV_REL, code=REL_DIAL8 value=1234 for the 8th dial turned 1234
> units in the positive direction ?
The current hid-input driver maps usage codes into values of input_event.code;
there is a single usage code for "Dial" defined in the HID spec.
(It would be possible to use the 6 defined usages for X/Y/Z/Rx/Ry/Rz,
ignoring the fact that they imply a given function for each control,
but I'd have to map at least two of remaining dials to totally inappropriate
codes like "Wheel" or "Slider". I currently do that for testing, and I'm not
happy about it.)
An additional problem is that currently, the documented interface by which
an application can find out which events it should expect is a bitmap,
with each bit corresponding to one value of 'code'.
> 1. uses type for something it was not designed for.
Yes; that's why I don't like it very much (it's a kludge).
> 2. is not too appealing. If we follow your way, we'll soon have people
> asking to combine events in complicated ways. With your method,
> interpretation of events depends on some context (the previous events),
> and that's hopefully not necessary.
Good point; I don't want to set a precedent for bad design.
> What is an instance ? As I understand it, it's just the number of an
> axis in the range [0..8]. If available axes are not enough, we can add
> new ones (REL_DIAL0 to REL_DIALn, with n almost as big as you want). We
> have plenty of room (16 bits on 32-bits intel cpus).
No, we can't, if we want to keep a fixed mapping from HID usage codes to
input_event.code values (of course, that is itself something that could be
changed, but there remains still the problem of using a bitmap to represent
expected events).
I can easily imagine other devices for which multiple instances of a single
usage are needed - say, an audio mixer with N "Slider" controls. Until now
I hoped that we could come up with a general way to handle such things,
instead of introducing special cases (REL_DIALx, REL_SLIDERx, REL_FOOx ...
for each.
> I see a 4th solution, perhaps useful for weird dial-boxes having many
> thousands of dials (is that possible ?): register as many input devices
> as necessary. I guess it would be possible to have one physical device
> seen as several input devices.
That may be possible (I'll have to see if it requires changes to the HID
driver), but would complicated life in user space.
Bye,
Jens.
--
mailto:[EMAIL PROTECTED] phone:+49-7031-464-7698 (TELNET 778-7698)
http://www.bawue.de/~jjk/ fax:+49-7031-464-7351
PGP: 06 04 1C 35 7B DC 1F 26 As the air to a bird, or the sea to a fish,
0x555DA8B5 BB A2 F0 66 77 75 E1 08 so is contempt to the contemptible. [Blake]
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel