- To toggle the plugin's state, call `AutoShift.toggle()`.
Note: Disabling the AutoShift plugin does not affect which `Key` categories it
will affect when it is re-enabled.
## Setting the AutoShift long-press delay
To set the length of time AutoShift will wait before adding the `shift` modifier
to the key's output, use `AutoShift.setTimeout(t)`, where `t` is a number of
milliseconds.
## Configuring which keys get auto-shifted
AutoShift provides a set of key categories that can be independently added or
removed from the set of keys that will be auto-shifted when long-pressed:
-`AutoShift.letterKeys()`: Letter keys
-`AutoShift.numberKeys()`: Number keys (number row, not numeric keypad)
-`AutoShift.symbolKeys()`: Other printable symbols
-`AutoShift.arrowKeys()`: Navigational arrow keys
-`AutoShift.functionKeys()`: All function keys (F1-F24)
-`AutoShift.printableKeys()`: Letters, numbers, and symbols
-`AutoShift.allKeys()`: All non-modifier USB Keyboard keys
These categories are restricted to USB Keyboard-type keys, and any modifier
flags attached to the key is ignored when determining if it will be
auto-shifted. Any of the above expressions can be used as the `category` parameter in the functions described below.
- To include a category in the set that will be auto-shifted, call `AutoShift.enable(category)`
- To remove a category from the set that will be auto-shifted, call `AutoShift.disable(category)`
- To set the full list of categories that will be auto-shifted, call `AutoShift.setEnabled(categories)`, where `categories` can be either a single category from the above list, or list of categories combined using the `|` (bitwise-or) operator (e.g. `AutoShift.setEnabled(AutoShift.letterKeys() | AutoShift.numberKeys())`).
## Advanced customization of which keys get auto-shifted
If the above categories are not sufficient for your auto-shifting needs, it is
possible to get even finer-grained control of which keys are affected by
AutoShift, by overriding the `isAutoShiftable()` method in your sketch. For
example, to make AutoShift only act on keys `A` and `Z`, include the following
code in your sketch:
```c++
bool AutoShift::isAutoShiftable(Key key) {
if (key == Key_A || key == key_Z)
return true;
return false;
}
```
As you can see, this method takes a `Key` as its input and returns either `true`
(for keys eligible to be auto-shifted) or `false` (for keys AutoShift will leave