[hatari-devel] Joystick Button 2 patch

Thomas Huth th.huth at gmx.de
Sat Feb 28 09:22:27 CET 2009


On Sat, 21 Feb 2009 16:13:55 +0200
Eero Tamminen <eerot at users.berlios.de> wrote:

> I was mostly thinking of replacing the spacebar thingy and what you
> added to the configuration with a per joystick setting like:
> "ButtonActions".
> 
> It could be a 16-bit value per joystick button where one byte would
> have bits for the:
> - 4 joystick directions
> - fire
> - shift/alt/control key modifiers
> and another byte would have a keycode to trigger.
> 
> Or maybe key modifiers should have byte of their own, then one could
> trigger also mouse button presses with any of the joysticks if needed.
> 
> This way one could tie buttons to about any input action (e.g. one
> button to left+up+fire, one to up, one to space, one to
> control+alt+del etc.).
> 
> The command line syntax could look like:
> *  --buttonactions<port> <inputs>
>    Trigger given input with buttons of joystick in given <port>.
>    See manual page for syntax on defining the inputs.

Sorry, but this sounds rather over-engeneered to me. Even I had to read
your text three times until I really understood it - I think the normal
user will be overextended by this. As long as it is not easy
configurable in the GUI, too, this won't help anybody but you who wrote
the code. And do we really really need fully configurable joystick
buttons anyway? There are hardly any complaints about this on the
mailing lists and forums...

> And config file could look like this:
> -------
> [Joystick3]
> ButtonActions = ffff,00ab,0120
> --------
> (I think it would be clearest to give the values in hexadecimal.)

Note that for this you would certainly have to extend the config file
parsing, too (it only supports one value per variable right now).

 Thomas



More information about the hatari-devel mailing list