InputK ii*+
(T=Z; Z=Y; Y=X;) X = (input ii switched on) ? TRUE : FALSE
This is a special input instruction implemented for SPLat boards with on-board Push button switches, such as the MMi99. It is also available on normal digital inputs on most boards.
InputK provides an "edge-triggered" input function. It will return a True result if input ii
has changed from off to on at any time since the last InputK was executed on the particular input. In terms of a Push button input, if the button is pressed momentarily, the first subsequent InputK will return a True value but any later InputK will not, until the button is released and pressed once more.
The result of the InputK is Pushed into X in Boolean form.
On boards that incorporate a beeper, the InputK instruction results in a short beep whenever it returns a true result if the input is defined in firmware as a button.
This instruction uses debounced inputs. (The high speed counting input may be used to capture faster events) Debounce adds a delay of 8 to 20mS to the input response, in order to reject contact bounce (chattering) in mechanical input switches.
If the InputK instruction is executed on an input that does not support it, the board treats it as a normal Input instruction.
* This instruction can also use the Index Register by adding i in front of the instruction.
+ From dialect 16 the address argument will be jndexed when executed inside a MultiTrack task and will be indexed if the instruction is preceded by the IasJ:
precode.
Dialect restriction. InputK is implemented only in dialects 3 or later.
See also InputMK, Output, Input, InputF, KBeepOn, KBeepOff WaitOnK GoIfInK