|Format||BENABLE [X=Toggle] [Z=Enable_Byte] [F=Button_Function]|
|Remembered||Using SS Z|
|Format||[Addr#]BENABLE [X=Toggle] [Y?] [Z=Enable_Byte] [F=Button_Function]|
|Remembered||Using [addr#]SS Z|
Enables or disables button functions for the specified card and specified buttons, either all/none (X, or Toggle) or with finer granularity (Z, or Enable_byte). Toggle=0 disables all buttons and pulses; i.e. BE X=0 is equivalent to BE Z=0. Toggle=1 enables all buttons and pulses (default settings); i.e.
BE X=1 is equivalent to
BE Z=15. Querying X returns the same as querying Z. Specific buttons can be enabled/disabled by explicitly setting the
Enable_Byte. The bits are set to one
1 when enabled or zero
0 when disabled, and are defined as follows:
Enable_Byte is bit-mapped number that determines which buttons are enabled or disabled as tabulated below. Bit5 is a special case; it changes the behavior of the physical button to zero the Z axis only and has been removed from Tiger code after v3.20.
|5||Zero Z Only (removed from Tiger after v3.20)|
Button_Function is a positive integer code for the button function that will be executed. See documentation of BCUSTOM for a list of available button functions. This allows a button press to be simulated using a serial command. This is available from Tiger v3.19 onward and in middle of Whizkid v9.2l.
1BE Z=12 :A
BE Z=12 :A
0BE Y? query command provides a report of past button states. Every time one of the inputs is activated, the COMM card notes the activation by setting a bit in a status byte. That bit will remain set until the status byte is queried again on the COMM card with
0BE Y?. The result of the query will return the current status byte to the host, then clear the status byte (set all bits representing input sources to 0), thereby preparing the status byte for further button press detection. The format of the bits in the returned status byte is the same as the table above. A one
1 on the specified bit represents the input has been activated since the last query.
Starting with v3.21, a button that is held down during a serial query of button state will be reported as activated every query up through the one immediately following release. This can be used by high-level software to time button presses, e.g. if querying happens every second and the button is held down for 1.001 seconds then it will be reported as being held down twice. If the button is held down for 0.1 seconds then most of the time it will only be reported once, unless the query happens to occur during that 0.1 seconds in which case it will be reported twice.