Skip to content

Commit f2c98cb

Browse files
fauxparkptrxyz
authored andcommitted
Basic keycode overhaul (qmk#14726)
1 parent 297fac8 commit f2c98cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1135
-1081
lines changed

docs/config_options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ If you define these options you will enable the associated feature, which may in
206206
* `#define TAP_CODE_DELAY 100`
207207
* Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
208208
* `#define TAP_HOLD_CAPS_DELAY 80`
209-
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
209+
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPS_LOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
210210
* `#define KEY_OVERRIDE_REPEAT_DELAY 500`
211211
* Sets the key repeat interval for [key overrides](feature_key_overrides.md).
212212

docs/configurator_default_keymaps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Now that we have the commit hash, we need the keymap (edited for readability):
4646
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4747

4848
[0] = LAYOUT_all(
49-
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
49+
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS,
5050
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
5151
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
5252
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
@@ -74,7 +74,7 @@ The default keymap uses the `LAYOUT_all` macro, so that will be the value of the
7474
"layout": "LAYOUT_all",
7575
"layers": [
7676
[
77-
"KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_PAUS",
77+
"KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SCRL", "KC_PAUS",
7878
"KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP",
7979
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL", "KC_END", "KC_PGDN",
8080
"KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT",

docs/faq_keymap.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI
1919
Sometimes, for readability's sake, it's useful to define custom names for some keycodes. People often define custom names using `#define`. For example:
2020

2121
```c
22-
#define FN_CAPS LT(_FL, KC_CAPSLOCK)
22+
#define FN_CAPS LT(_FL, KC_CAPS)
2323
#define ALT_TAB LALT(KC_TAB)
2424
```
2525
@@ -38,16 +38,16 @@ As a quick fix try holding down `Space`+`Backspace` while you plug in your keybo
3838
3939
The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key.
4040
41-
## `KC_SYSREQ` Isn't Working
42-
Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
41+
## `KC_SYSTEM_REQUEST` Isn't Working
42+
Use keycode for Print Screen (`KC_PRINT_SCREEN`/`KC_PSCR`) instead of `KC_SYSTEM_REQUEST`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
4343
4444
See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
4545
* https://en.wikipedia.org/wiki/Magic_SysRq_key
4646
* https://en.wikipedia.org/wiki/System_request
4747
4848
## Power Keys Aren't Working
4949
50-
Somewhat confusingly, there are two "Power" keycodes in QMK: `KC_POWER` in the Keyboard/Keypad HID usage page, and `KC_SYSTEM_POWER` (or `KC_PWR`) in the Consumer page.
50+
Somewhat confusingly, there are two "Power" keycodes in QMK: `KC_KB_POWER` in the Keyboard/Keypad HID usage page, and `KC_SYSTEM_POWER` (or `KC_PWR`) in the Consumer page.
5151
5252
The former is only recognized on macOS, while the latter, `KC_SLEP` and `KC_WAKE` are supported by all three major operating systems, so it is recommended to use those instead. Under Windows, these keys take effect immediately, however on macOS they must be held down until a dialog appears.
5353
@@ -57,7 +57,7 @@ https://github.com/tmk/tmk_keyboard/issues/67
5757
5858
## Modifier/Layer Stuck
5959
Modifier keys or layers can be stuck unless layer switching is configured properly.
60-
For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
60+
For Modifier keys and layer actions you have to place `KC_TRNS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
6161
6262
* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
6363
* https://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
@@ -75,7 +75,7 @@ This feature is for *mechanical lock switch* like [this Alps one](https://deskth
7575

7676
After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead.
7777

78-
Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.***
78+
Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NUM` and `KC_SCRL`.***
7979

8080
## Input Special Characters Other Than ASCII like Cédille 'Ç'
8181

docs/feature_auto_shift.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
127127
# ifndef NO_AUTO_SHIFT_SPECIAL
128128
case KC_TAB:
129129
case KC_MINUS ... KC_SLASH:
130-
case KC_NONUS_BSLASH:
130+
case KC_NONUS_BACKSLASH:
131131
# endif
132132
return true;
133133
}

docs/feature_combo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ uint16_t get_combo_term(uint16_t index, combo_t *combo) {
173173
// i.e. the exact array of keys you defined for the combo.
174174
// This can be useful if your combos have a common key and you want to apply the
175175
// same combo term for all of them.
176-
if (combo->keys[0] == KC_ENTER) { // if first key in the array is KC_ENTER
176+
if (combo->keys[0] == KC_ENT) { // if first key in the array is Enter
177177
return 150;
178178
}
179179

docs/feature_grave_esc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ If you're using a 60% keyboard, or any other layout with no F-row, you will have
44

55
## Usage
66

7-
Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead.
7+
Replace the `KC_GRV` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead.
88

99
## What Your OS Sees
1010

docs/feature_haptic_feedback.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_en
184184
### NO_HAPTIC_MOD
185185
With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback:
186186

187-
* Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTRL`)
187+
* Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTL`)
188188
* `MO()` momentary keys. See also [Layers](feature_layers.md).
189189
* `LM()` momentary keys with mod active.
190190
* `LT()` layer tap keys, when held to activate a layer. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered.

docs/feature_key_overrides.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ For more customization possibilities, you may directly create a `key_override_t`
3939
This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized:
4040

4141
```c
42-
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE);
42+
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL);
4343

4444
// This globally defines all key overrides to be used
4545
const key_override_t **key_overrides = (const key_override_t *[]){
@@ -107,10 +107,10 @@ The [Grave Escape feature](feature_grave_esc.md) is limited in its configurabili
107107
108108
```c
109109
// Shift + esc = ~
110-
const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE));
110+
const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRV));
111111
112112
// GUI + esc = `
113-
const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE);
113+
const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRV);
114114
115115
const key_override_t **key_overrides = (const key_override_t *[]){
116116
&tilde_esc_override,

docs/feature_macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
118118
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
119119
switch (keycode) {
120120
case KC_A ... KC_F21: //notice how it skips over F22
121-
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys
121+
case KC_F23 ... KC_EXSL: //exsel is the last one before the modifier keys
122122
if (!record->event.pressed) {
123123
f22_tracker--;
124124
if (!f22_tracker) {

docs/feature_tap_dance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) {
299299
xtap_state.state = cur_dance(state);
300300
switch (xtap_state.state) {
301301
case TD_SINGLE_TAP: register_code(KC_X); break;
302-
case TD_SINGLE_HOLD: register_code(KC_LCTRL); break;
302+
case TD_SINGLE_HOLD: register_code(KC_LCTL); break;
303303
case TD_DOUBLE_TAP: register_code(KC_ESC); break;
304304
case TD_DOUBLE_HOLD: register_code(KC_LALT); break;
305305
// Last case is for fast typing. Assuming your key is `f`:
@@ -312,7 +312,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) {
312312
void x_reset(qk_tap_dance_state_t *state, void *user_data) {
313313
switch (xtap_state.state) {
314314
case TD_SINGLE_TAP: unregister_code(KC_X); break;
315-
case TD_SINGLE_HOLD: unregister_code(KC_LCTRL); break;
315+
case TD_SINGLE_HOLD: unregister_code(KC_LCTL); break;
316316
case TD_DOUBLE_TAP: unregister_code(KC_ESC); break;
317317
case TD_DOUBLE_HOLD: unregister_code(KC_LALT);
318318
case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X);

docs/feature_wpm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bool wpm_keycode_user(uint16_t keycode) {
3535
} else if (keycode > 0xFF) {
3636
keycode = 0;
3737
}
38-
if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) {
38+
if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLSH)) {
3939
return true;
4040
}
4141

0 commit comments

Comments
 (0)