[PD] labeling buttons for [hid]
hans at eds.org
Sun Nov 14 00:02:43 CET 2004
So I wanted to throw out an idea to see what people think. I am
working on a cross-platform scheme for naming the buttons on devices
like mice, joysticks, tablets, etc. Each OS has its own scheme, with
some similarities. But I am making a common scheme so that patches
that use [hid] will work on all platforms. Right now, I am wondering
how I should label buttons.
MacOS X HID Manager simply numbers the buttons, I think Windows does a
similar thing since both are based on the USB HID spec. The Linux
input event system uses button names, like btn_left, btn_middle (mice);
btn_trigger, btn_base (joysticks); btn_a, btn_select (gamepads);
btn_tool_pen, btn_stylus (tablets); with a different naming scheme for
each device type.
I started out just copying the Linux system outright for a number of
reasons, but now I am thinking that button numbers probably make a lot
more sense. Here are some advantages/disadvantages that I see:
more efficient to use floats rather than symbols
much easier to implement on MacOS X
patches written for buttons on one device would work for other
devices (i.e. a patch written
for a mouse could be triggered by the buttons of a joystick, tablet,
user has to test the device to find the numbering scheme, rather than
reading the label
slightly harder to implement on GNU/Linux
Any thoughts, comments, feedback, etc would be appreciated.
There is no way to peace, peace is the way.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 1681 bytes
Desc: not available
More information about the Pd-list