Questions on warthog button press types
what exactly do the pulse, hold types do. I am thinking from a WM_KEYUP,WM_KEYDOWN perspective. I am trying to finish my profile and resolve some issues I believe I am seeing with accidently trigger things I didn’t want because two key combos may be happening simultaneously. For example I have mrm mode switch on sending an m and then I throw another switch and it sends shift plus anything else and bms thinks I pressed shift-m and toggles master arm to safe. I am trying to ensure that a button sends only 1 keyup/keydown combination not a continuous series of ups followed by a down.
From page 23 of the Target manual. Which is found in the Target GUI “How do I ?” drop down box
"The Type field defines the type of behaviour for the key combination:
Pulse simulates a brief (temporary) press on the keyboard, even if the button remains activated or in the
Hold simulates pressing and holding the keyboard keys until the button is released.
Press simulates a continuous press on the key combination, even if the joystick button is released.
Release releases a combination of keys that has been “pressed” before.
ok ty then there is a different reason then that master arm keeps turning to safe at some point.
I should have asked first. Are you using the scripting editor or the GUI ?
gui for the moment
Consider there are two possible physical events for a joystick button: OFF-ON and ON-OFF. These are the change state events and are possible sources for information to produce output.
Next consider there are two types of logical output for a control: DOWN and UP. A normal press of a finger on a keyboard is a DOWN event followed a short time later by an UP event.
MapKey() command maps the OFF-ON button event to produce some output.
MapKeyR() command maps the ON-OFF button event to produce some output.
“PULSE” produces a sequence of a DOWN event followed by an UP event.
“DOWN” produces a DOWN event.
“UP” produces an UP event.
" " produces different behavior depending if it is used with MapKey or MapKeyR.
This will cause the joystick button when pressed to hold down the ‘A’ button forever. Nothing happens on release.
This will cause the joystick button when released to hold down the ‘A’ button forever. Nothing happens on press.
This will cause the joystick button when pressed to release the ‘A’ button forever. Nothing happens on release.
This will cause the joystick button when released to release the ‘A’ button forever. Nothing happens on press.
When pressed, ‘A’ is pressed. When released, ‘A’ is released.
When pressed, nothing happens. When released, ‘A’ is pulsed.*
*Not inverted behavior as you might expect from the pattern.
When pressed, ‘A’ is pressed and then a short time later ‘A’ is released (aka pulsed). When released, nothing happens.
When pressed, nothing happens. When released, ‘A’ is pulsed.
The other thing to consider is how bms handles key presses too. For example does it poll per game loop checking which keys are down or is it event driven generating an event on either up or down. My money would be on polling per game loop. My thought is that using keys combos involving shift,ctrl, or alt might lead to confusing key combos if two are active at once. I unmapped all key presses involving master arm and I am no longer having my weapons go to safe in the middle of a knife fight. I think it best to simply map anything that uses multiple keys to a dx button to avoid getting your buttons crossed up. Now if I can learn to have better sa and stay above ir SAMs, I will avoid a lot of embarrassing sky diving trips.