MODES, SWITCHES
These two sections, <MODES>
and <SWITCHES>
, both define booleans that can be set in the simkey-app
before compiling. They can be used to change the course the program takes through conditionals.
SWITCHES
can be defined and set later on in <FUNCS>
and <MACRO>
, but they will not be given as options to be set within the app. MODES
are constant throughout the program, and only one can be on, or TRUE
, at a time.
Here's an example of how they can be used (refer to this page for more information):
<VECTORS>
# Different delays for clicking #
$FAST_DELAY = 0,1
$MEDIUM_DELAY = 0,25
$SLOW_DELAY = 0,100
<MODES>
# Modes for which delay is used #
$FAST
$MEDIUM
$SLOW
<FUNCS>
# Function to set delay based on mode #
@setDelay {
@if $FAST {
@delay [$FAST_DELAY]
}
@elseif $MEDIUM {
@delay [$MEDIUM_DELAY]
}
@else {
@delay [$SLOW_DELAY]
}
}
<MACRO>
# Set delay and click #
@setDelay
[MB_LEFT]