[PD] labeling buttons for [hid]

Hans-Christoph Steiner 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:

button numbers:
		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.
										-A.J. Muste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1681 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20041113/4db5b4e9/attachment.bin>

More information about the Pd-list mailing list