Last Update: May 31 2010 9:40AM
This enhances the joystick and mouse and keyboard functions and adds Combo handling
*Combo System is being debugged right now, keyboard combo stops working properly when no joystick is plugged, an interesting problem indeed.
Detects the joystick button and POV HAT (DPAD) pressed, down, held (for a period of time) and released
Detect double tap or any button/hat combination of sequenced input (eg combos)
Keyboard and Mouse
Detects the (all) mouse button and keyboard keys (including media buttons) pressed, down, held (for a period of time) and released
Detect double tap or any button/keys combination of sequenced input (eg combos)
Define joystick (game pad) button and DPAD combo sequence of any lenght
Define mouse and/or keyboard combo sequence of any lenght
Adjust the combo trigger and time out
Detect multiple combos combination, eg combo1 followed by combo2
Supports, via combo trigger timer, combos with similar sequences, like AA combo and AAB combo, typing AAB will not trigger AA combo.
Mouse/Keyboard (Read Object2)
lmouseSpacelmouse //shows conflict with double click;
Joystick (Read Object3)
*Some combos will trigger faster than others according to the method chosen
Object0 shows detection of all joystick interfaces and shows how to implement direction and dead zones
Object1 Shows the joystick button/hat state detection
Object2 Show the keyboard/Mouse state detection and Keyboard Combos
Object3 Show Joystick button/hat combos
*Keyboard/Mouse and joystick support are separate implementation though the interface is almost the same for both.
Added handler for sticky keys. For example, F24 on my laptop somtimes always return down, its a bug with my laptop, though it allowed me to handle the case where you may have faulty hardware (joystick and keyboard) with stuck keys, only affects combo system.
Added joySmoothAxis to smooth out the axis with a center dead zone and a edge dead zone. So that fidgity controller dont cause weird movement (center dead zone) or some axis mosition dont cause slower movement (edge dead zone) for example, smooth the axis value so that starting at axis value .3 to .7 it returns 0 to 1, where <.3 = 0, .3 to .7 = 0 to 1 and >.7 = 1
Added exclusion from Combo. So you can exclude keys, buttons from the system so it will not add the entry to the combo list, say if you want to move with the arrows while doing combos with wasd. Same with the joystick combo, to exclude the DPAD from the combo detection for example.
Edited by icuurd12b42, 31 May 2010 - 10:11 PM.