Smallish overhaul of Auto-Shift feature (#6067)

* Fix edge case when using One Shot Layer with Auto Shift, and it not triggering the cleanup
* Remove junk code (no longer used)
* Replace `(un)register_code` calls with `tap_code` where appropriate
* Fixed up Switch check to be more readable (less verbose)
* Simplified modifier check (if it comes back non-zero, there are mods)
* Add additional function calls for autoshift settings
* Made all variables static, since there are function calls to get their status
* Fixed up documentation
* Re-add special characters that were missed
* formatting pass
This commit is contained in:
Drashna Jaelre 2019-11-03 09:52:01 -08:00 committed by GitHub
parent 38353688f2
commit e9c44e396d
Failed to generate hash of commit
3 changed files with 44 additions and 105 deletions

View file

@ -51,12 +51,15 @@ By default, Auto Shift is disabled for any key press that is accompanied by one
modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
as Ctrl+Shift+A.
You can re-enable Auto Shift for modifiers by adding another rule to your `rules.mk`
You can re-enable Auto Shift for modifiers by adding a define to your `config.h`
AUTO_SHIFT_MODIFIERS = yes
```c
#define AUTO_SHIFT_MODIFIERS
```
In which case, Ctrl+A held past the `AUTO_SHIFT_TIMEOUT` will be sent as Ctrl+Shift+A
## Configuring Auto Shift
If desired, there is some configuration that can be done to change the
@ -65,15 +68,12 @@ behavior of Auto Shift. This is done by setting various variables the
A sample is
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
```c
#pragma once
#include "../../config.h"
#define AUTO_SHIFT_TIMEOUT 150
#define NO_AUTO_SHIFT_SPECIAL
#endif
#define AUTO_SHIFT_TIMEOUT 150
#define NO_AUTO_SHIFT_SPECIAL
```
### AUTO_SHIFT_TIMEOUT (Value in ms)