Align dynamic tapping term keycode names (#18963)

* Align dynamic tapping term keycode names

* regen header
This commit is contained in:
Joel Challis 2022-11-05 16:58:30 +00:00 committed by GitHub
parent 5233c69bc6
commit fd4c3f46fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 19 deletions

View file

@ -411,15 +411,24 @@
"0x7C70": { "0x7C70": {
"group": "quantum", "group": "quantum",
"key": "DT_PRNT" "key": "QK_DYNAMIC_TAPPING_TERM_PRINT",
"aliases": [
"DT_PRNT"
]
}, },
"0x7C71": { "0x7C71": {
"group": "quantum", "group": "quantum",
"key": "DT_UP" "key": "QK_DYNAMIC_TAPPING_TERM_UP",
"aliases": [
"DT_UP"
]
}, },
"0x7C72": { "0x7C72": {
"group": "quantum", "group": "quantum",
"key": "DT_DOWN" "key": "QK_DYNAMIC_TAPPING_TERM_DOWN",
"aliases": [
"DT_DOWN"
]
}, },
"0x7C73": { "0x7C73": {

View file

@ -669,11 +669,11 @@ See also: [Mod-Tap](mod_tap.md)
See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term) See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term)
| Key | Description | | Key | Aliases | Description |
|-------------|------------------------------------------------------------------------------------------------------------------------| |-------------------------------|---------|-------------------------------------------------------------------------------------------|
| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | |`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_DOWN` |`DT_DOWN`| Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
## RGB Lighting :id=rgb-lighting ## RGB Lighting :id=rgb-lighting

View file

@ -42,11 +42,11 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
`DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly. `DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly.
| Key | Description | | Key | Aliases | Description |
|-------------|------------------------------------------------------------------------------------------------------------------------| |-------------------------------|---------|-------------------------------------------------------------------------------------------|
| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | |`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | |`QK_DYNAMIC_TAPPING_TERM_DOWN` |`DT_DOWN`| Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
Set the tapping term as usual with `#define TAPPING_TERM <value>` in `config.h` and add `DYNAMIC_TAPPING_TERM_ENABLE = yes` in `rules.mk`. Then, place the above three keys somewhere in your keymap and flash the new firmware onto your board. Set the tapping term as usual with `#define TAPPING_TERM <value>` in `config.h` and add `DYNAMIC_TAPPING_TERM_ENABLE = yes` in `rules.mk`. Then, place the above three keys somewhere in your keymap and flash the new firmware onto your board.

View file

@ -706,9 +706,9 @@ enum qk_keycode_defines {
QK_SECURE_UNLOCK = 0x7C61, QK_SECURE_UNLOCK = 0x7C61,
QK_SECURE_TOGGLE = 0x7C62, QK_SECURE_TOGGLE = 0x7C62,
QK_SECURE_REQUEST = 0x7C63, QK_SECURE_REQUEST = 0x7C63,
DT_PRNT = 0x7C70, QK_DYNAMIC_TAPPING_TERM_PRINT = 0x7C70,
DT_UP = 0x7C71, QK_DYNAMIC_TAPPING_TERM_UP = 0x7C71,
DT_DOWN = 0x7C72, QK_DYNAMIC_TAPPING_TERM_DOWN = 0x7C72,
QK_CAPS_WORD_TOGGLE = 0x7C73, QK_CAPS_WORD_TOGGLE = 0x7C73,
QK_AUTOCORRECT_ON = 0x7C74, QK_AUTOCORRECT_ON = 0x7C74,
QK_AUTOCORRECT_OFF = 0x7C75, QK_AUTOCORRECT_OFF = 0x7C75,
@ -1088,6 +1088,9 @@ enum qk_keycode_defines {
SE_UNLK = QK_SECURE_UNLOCK, SE_UNLK = QK_SECURE_UNLOCK,
SE_TOGG = QK_SECURE_TOGGLE, SE_TOGG = QK_SECURE_TOGGLE,
SE_REQ = QK_SECURE_REQUEST, SE_REQ = QK_SECURE_REQUEST,
DT_PRNT = QK_DYNAMIC_TAPPING_TERM_PRINT,
DT_UP = QK_DYNAMIC_TAPPING_TERM_UP,
DT_DOWN = QK_DYNAMIC_TAPPING_TERM_DOWN,
CW_TOGG = QK_CAPS_WORD_TOGGLE, CW_TOGG = QK_CAPS_WORD_TOGGLE,
AC_ON = QK_AUTOCORRECT_ON, AC_ON = QK_AUTOCORRECT_ON,
AC_OFF = QK_AUTOCORRECT_OFF, AC_OFF = QK_AUTOCORRECT_OFF,
@ -1142,3 +1145,4 @@ enum qk_keycode_defines {
#define IS_BACKLIGHT_KEYCODE(code) ((code) >= BL_ON && (code) <= BL_BRTG) #define IS_BACKLIGHT_KEYCODE(code) ((code) >= BL_ON && (code) <= BL_BRTG)
#define IS_RGB_KEYCODE(code) ((code) >= RGB_TOG && (code) <= RGB_MODE_TWINKLE) #define IS_RGB_KEYCODE(code) ((code) >= RGB_TOG && (code) <= RGB_MODE_TWINKLE)
#define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_AUTOCORRECT_TOGGLE) #define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_AUTOCORRECT_TOGGLE)

View file

@ -35,15 +35,15 @@ static void tapping_term_report(void) {
bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record) { bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) { if (record->event.pressed) {
switch (keycode) { switch (keycode) {
case DT_PRNT: case QK_DYNAMIC_TAPPING_TERM_PRINT:
tapping_term_report(); tapping_term_report();
return false; return false;
case DT_UP: case QK_DYNAMIC_TAPPING_TERM_UP:
g_tapping_term += DYNAMIC_TAPPING_TERM_INCREMENT; g_tapping_term += DYNAMIC_TAPPING_TERM_INCREMENT;
return false; return false;
case DT_DOWN: case QK_DYNAMIC_TAPPING_TERM_DOWN:
g_tapping_term -= DYNAMIC_TAPPING_TERM_INCREMENT; g_tapping_term -= DYNAMIC_TAPPING_TERM_INCREMENT;
return false; return false;
} }