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": {
"group": "quantum",
"key": "DT_PRNT"
"key": "QK_DYNAMIC_TAPPING_TERM_PRINT",
"aliases": [
"DT_PRNT"
]
},
"0x7C71": {
"group": "quantum",
"key": "DT_UP"
"key": "QK_DYNAMIC_TAPPING_TERM_UP",
"aliases": [
"DT_UP"
]
},
"0x7C72": {
"group": "quantum",
"key": "DT_DOWN"
"key": "QK_DYNAMIC_TAPPING_TERM_DOWN",
"aliases": [
"DT_DOWN"
]
},
"0x7C73": {

View File

@ -669,11 +669,11 @@ See also: [Mod-Tap](mod_tap.md)
See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term)
| Key | Description |
|-------------|------------------------------------------------------------------------------------------------------------------------|
| `DT_PRNT` | "Dynamic Tapping Term Print": 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) |
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
| Key | Aliases | Description |
|-------------------------------|---------|-------------------------------------------------------------------------------------------|
|`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
|`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases 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

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.
| Key | Description |
|-------------|------------------------------------------------------------------------------------------------------------------------|
| `DT_PRNT` | "Dynamic Tapping Term Print": 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) |
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
| Key | Aliases | Description |
|-------------------------------|---------|-------------------------------------------------------------------------------------------|
|`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
|`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases 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.

View File

@ -706,9 +706,9 @@ enum qk_keycode_defines {
QK_SECURE_UNLOCK = 0x7C61,
QK_SECURE_TOGGLE = 0x7C62,
QK_SECURE_REQUEST = 0x7C63,
DT_PRNT = 0x7C70,
DT_UP = 0x7C71,
DT_DOWN = 0x7C72,
QK_DYNAMIC_TAPPING_TERM_PRINT = 0x7C70,
QK_DYNAMIC_TAPPING_TERM_UP = 0x7C71,
QK_DYNAMIC_TAPPING_TERM_DOWN = 0x7C72,
QK_CAPS_WORD_TOGGLE = 0x7C73,
QK_AUTOCORRECT_ON = 0x7C74,
QK_AUTOCORRECT_OFF = 0x7C75,
@ -1088,6 +1088,9 @@ enum qk_keycode_defines {
SE_UNLK = QK_SECURE_UNLOCK,
SE_TOGG = QK_SECURE_TOGGLE,
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,
AC_ON = QK_AUTOCORRECT_ON,
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_RGB_KEYCODE(code) ((code) >= RGB_TOG && (code) <= RGB_MODE_TWINKLE)
#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) {
if (record->event.pressed) {
switch (keycode) {
case DT_PRNT:
case QK_DYNAMIC_TAPPING_TERM_PRINT:
tapping_term_report();
return false;
case DT_UP:
case QK_DYNAMIC_TAPPING_TERM_UP:
g_tapping_term += DYNAMIC_TAPPING_TERM_INCREMENT;
return false;
case DT_DOWN:
case QK_DYNAMIC_TAPPING_TERM_DOWN:
g_tapping_term -= DYNAMIC_TAPPING_TERM_INCREMENT;
return false;
}