input_cmd_events: allow toggle modes to be listed

This extends `input <identifier> events toggle` to allow for an optional
list of modes to toggle through. If no event modes are listed, all
supported modes are cycled through (current behavior). If event modes
are listed, they will be cycled through, defaulting to the first mode
listed when the current mode is not in the list. This modes listed will
also not be checked to see if the device supports them and may fail.
This commit is contained in:
Brian Ashworth 2019-01-21 02:13:01 -05:00
parent 9df3a9136c
commit 91c1f44956
2 changed files with 65 additions and 14 deletions

View file

@ -82,12 +82,16 @@ The following commands may only be used in the configuration file.
*input* <identifier> dwt enabled|disabled
Enables or disables disable-while-typing for the specified input device.
*input* <identifier> events enabled|disabled|disabled\_on\_external\_mouse|toggle
*input* <identifier> events enabled|disabled|disabled\_on\_external\_mouse|toggle [<toggle-modes>]
Enables or disables send\_events for specified input device. Disabling
send\_events disables the input device. The _toggle_ option cannot be used
in the config. The order is enabled, disabled\_on\_external\_mouse,
disabled, (loop back to enabled). Any mode which is not supported by the
device will be skipped during the toggle.
send\_events disables the input device.
The _toggle_ option cannot be used in the config. If no toggle modes are
listed, all supported modes for the device will be toggled through in the
order: enabled, disabled\_on\_external\_mouse, disabled, (loop back). If
toggle modes are listed, they will be cycled through, defaulting to the
first mode listed if the current mode is not in the list. They will also
not be checked to see if they are supported for the device and may fail.
*input* <identifier> left\_handed enabled|disabled
Enables or disables left handed mode for specified input device.