1
0
Fork 0
forked from forks/qmk_firmware

Basic keycode overhaul (#14726)

This commit is contained in:
Ryan 2021-11-04 16:22:17 +11:00 committed by GitHub
parent b06d9d822c
commit f529580860
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 1135 additions and 1081 deletions

View file

@ -206,7 +206,7 @@ If you define these options you will enable the associated feature, which may in
* `#define TAP_CODE_DELAY 100` * `#define TAP_CODE_DELAY 100`
* 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. * 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.
* `#define TAP_HOLD_CAPS_DELAY 80` * `#define TAP_HOLD_CAPS_DELAY 80`
* 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. * 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.
* `#define KEY_OVERRIDE_REPEAT_DELAY 500` * `#define KEY_OVERRIDE_REPEAT_DELAY 500`
* Sets the key repeat interval for [key overrides](feature_key_overrides.md). * Sets the key repeat interval for [key overrides](feature_key_overrides.md).

View file

@ -46,7 +46,7 @@ Now that we have the commit hash, we need the keymap (edited for readability):
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( [0] = LAYOUT_all(
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, 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,
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, 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,
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, 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,
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, 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
"layout": "LAYOUT_all", "layout": "LAYOUT_all",
"layers": [ "layers": [
[ [
"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", "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",
"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", "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",
"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", "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",
"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", "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",

View file

@ -19,7 +19,7 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI
Sometimes, for readability's sake, it's useful to define custom names for some keycodes. People often define custom names using `#define`. For example: Sometimes, for readability's sake, it's useful to define custom names for some keycodes. People often define custom names using `#define`. For example:
```c ```c
#define FN_CAPS LT(_FL, KC_CAPSLOCK) #define FN_CAPS LT(_FL, KC_CAPS)
#define ALT_TAB LALT(KC_TAB) #define ALT_TAB LALT(KC_TAB)
``` ```
@ -38,8 +38,8 @@ As a quick fix try holding down `Space`+`Backspace` while you plug in your keybo
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. 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.
## `KC_SYSREQ` Isn't Working ## `KC_SYSTEM_REQUEST` Isn't Working
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'. 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'.
See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
* https://en.wikipedia.org/wiki/Magic_SysRq_key * https://en.wikipedia.org/wiki/Magic_SysRq_key
@ -47,7 +47,7 @@ See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
## Power Keys Aren't Working ## Power Keys Aren't Working
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. 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.
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. 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.
@ -57,7 +57,7 @@ https://github.com/tmk/tmk_keyboard/issues/67
## Modifier/Layer Stuck ## Modifier/Layer Stuck
Modifier keys or layers can be stuck unless layer switching is configured properly. Modifier keys or layers can be stuck unless layer switching is configured properly.
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. 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.
* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
* https://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 * 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
After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead. After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead.
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`.*** 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`.***
## Input Special Characters Other Than ASCII like Cédille 'Ç' ## Input Special Characters Other Than ASCII like Cédille 'Ç'

View file

@ -127,7 +127,7 @@ bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
# ifndef NO_AUTO_SHIFT_SPECIAL # ifndef NO_AUTO_SHIFT_SPECIAL
case KC_TAB: case KC_TAB:
case KC_MINUS ... KC_SLASH: case KC_MINUS ... KC_SLASH:
case KC_NONUS_BSLASH: case KC_NONUS_BACKSLASH:
# endif # endif
return true; return true;
} }

View file

@ -173,7 +173,7 @@ uint16_t get_combo_term(uint16_t index, combo_t *combo) {
// i.e. the exact array of keys you defined for the combo. // i.e. the exact array of keys you defined for the combo.
// This can be useful if your combos have a common key and you want to apply the // This can be useful if your combos have a common key and you want to apply the
// same combo term for all of them. // same combo term for all of them.
if (combo->keys[0] == KC_ENTER) { // if first key in the array is KC_ENTER if (combo->keys[0] == KC_ENT) { // if first key in the array is Enter
return 150; return 150;
} }

View file

@ -4,7 +4,7 @@ If you're using a 60% keyboard, or any other layout with no F-row, you will have
## Usage ## Usage
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. 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.
## What Your OS Sees ## What Your OS Sees

View file

@ -184,7 +184,7 @@ The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_en
### NO_HAPTIC_MOD ### NO_HAPTIC_MOD
With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback: With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback:
* Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTRL`) * Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTL`)
* `MO()` momentary keys. See also [Layers](feature_layers.md). * `MO()` momentary keys. See also [Layers](feature_layers.md).
* `LM()` momentary keys with mod active. * `LM()` momentary keys with mod active.
* `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. * `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.

View file

@ -39,7 +39,7 @@ For more customization possibilities, you may directly create a `key_override_t`
This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized:
```c ```c
const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE); const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL);
// This globally defines all key overrides to be used // This globally defines all key overrides to be used
const key_override_t **key_overrides = (const key_override_t *[]){ 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
```c ```c
// Shift + esc = ~ // Shift + esc = ~
const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE)); const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRV));
// GUI + esc = ` // GUI + esc = `
const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE); const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRV);
const key_override_t **key_overrides = (const key_override_t *[]){ const key_override_t **key_overrides = (const key_override_t *[]){
&tilde_esc_override, &tilde_esc_override,

View file

@ -118,7 +118,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void post_process_record_user(uint16_t keycode, keyrecord_t *record) { void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_A ... KC_F21: //notice how it skips over F22 case KC_A ... KC_F21: //notice how it skips over F22
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys case KC_F23 ... KC_EXSL: //exsel is the last one before the modifier keys
if (!record->event.pressed) { if (!record->event.pressed) {
f22_tracker--; f22_tracker--;
if (!f22_tracker) { if (!f22_tracker) {

View file

@ -299,7 +299,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) {
xtap_state.state = cur_dance(state); xtap_state.state = cur_dance(state);
switch (xtap_state.state) { switch (xtap_state.state) {
case TD_SINGLE_TAP: register_code(KC_X); break; case TD_SINGLE_TAP: register_code(KC_X); break;
case TD_SINGLE_HOLD: register_code(KC_LCTRL); break; case TD_SINGLE_HOLD: register_code(KC_LCTL); break;
case TD_DOUBLE_TAP: register_code(KC_ESC); break; case TD_DOUBLE_TAP: register_code(KC_ESC); break;
case TD_DOUBLE_HOLD: register_code(KC_LALT); break; case TD_DOUBLE_HOLD: register_code(KC_LALT); break;
// Last case is for fast typing. Assuming your key is `f`: // 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) {
void x_reset(qk_tap_dance_state_t *state, void *user_data) { void x_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (xtap_state.state) { switch (xtap_state.state) {
case TD_SINGLE_TAP: unregister_code(KC_X); break; case TD_SINGLE_TAP: unregister_code(KC_X); break;
case TD_SINGLE_HOLD: unregister_code(KC_LCTRL); break; case TD_SINGLE_HOLD: unregister_code(KC_LCTL); break;
case TD_DOUBLE_TAP: unregister_code(KC_ESC); break; case TD_DOUBLE_TAP: unregister_code(KC_ESC); break;
case TD_DOUBLE_HOLD: unregister_code(KC_LALT); case TD_DOUBLE_HOLD: unregister_code(KC_LALT);
case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X); case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X);

View file

@ -35,7 +35,7 @@ bool wpm_keycode_user(uint16_t keycode) {
} else if (keycode > 0xFF) { } else if (keycode > 0xFF) {
keycode = 0; keycode = 0;
} }
if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) { if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLSH)) {
return true; return true;
} }

View file

@ -8,205 +8,205 @@ This is a reference only. Each group of keys links to the page documenting their
See also: [Basic Keycodes](keycodes_basic.md) See also: [Basic Keycodes](keycodes_basic.md)
|Key |Aliases |Description |Windows |macOS |Linux<sup>1</sup>| |Key |Aliases |Description |Windows |macOS |Linux<sup>1</sup>|
|-----------------------|------------------------------|-----------------------------------------------|-------------|-------------|-----------------| |------------------------|-------------------------------|---------------------------------------|-------------|-------------|-----------------|
|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | |`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* |
|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key |*N/A* |*N/A* |*N/A* | |`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key|*N/A* |*N/A* |*N/A* |
|`KC_A` | |`a` and `A` |✔ |✔ |✔ | |`KC_A` | |`a` and `A` |✔ |✔ |✔ |
|`KC_B` | |`b` and `B` |✔ |✔ |✔ | |`KC_B` | |`b` and `B` |✔ |✔ |✔ |
|`KC_C` | |`c` and `C` |✔ |✔ |✔ | |`KC_C` | |`c` and `C` |✔ |✔ |✔ |
|`KC_D` | |`d` and `D` |✔ |✔ |✔ | |`KC_D` | |`d` and `D` |✔ |✔ |✔ |
|`KC_E` | |`e` and `E` |✔ |✔ |✔ | |`KC_E` | |`e` and `E` |✔ |✔ |✔ |
|`KC_F` | |`f` and `F` |✔ |✔ |✔ | |`KC_F` | |`f` and `F` |✔ |✔ |✔ |
|`KC_G` | |`g` and `G` |✔ |✔ |✔ | |`KC_G` | |`g` and `G` |✔ |✔ |✔ |
|`KC_H` | |`h` and `H` |✔ |✔ |✔ | |`KC_H` | |`h` and `H` |✔ |✔ |✔ |
|`KC_I` | |`i` and `I` |✔ |✔ |✔ | |`KC_I` | |`i` and `I` |✔ |✔ |✔ |
|`KC_J` | |`j` and `J` |✔ |✔ |✔ | |`KC_J` | |`j` and `J` |✔ |✔ |✔ |
|`KC_K` | |`k` and `K` |✔ |✔ |✔ | |`KC_K` | |`k` and `K` |✔ |✔ |✔ |
|`KC_L` | |`l` and `L` |✔ |✔ |✔ | |`KC_L` | |`l` and `L` |✔ |✔ |✔ |
|`KC_M` | |`m` and `M` |✔ |✔ |✔ | |`KC_M` | |`m` and `M` |✔ |✔ |✔ |
|`KC_N` | |`n` and `N` |✔ |✔ |✔ | |`KC_N` | |`n` and `N` |✔ |✔ |✔ |
|`KC_O` | |`o` and `O` |✔ |✔ |✔ | |`KC_O` | |`o` and `O` |✔ |✔ |✔ |
|`KC_P` | |`p` and `P` |✔ |✔ |✔ | |`KC_P` | |`p` and `P` |✔ |✔ |✔ |
|`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | |`KC_Q` | |`q` and `Q` |✔ |✔ |✔ |
|`KC_R` | |`r` and `R` |✔ |✔ |✔ | |`KC_R` | |`r` and `R` |✔ |✔ |✔ |
|`KC_S` | |`s` and `S` |✔ |✔ |✔ | |`KC_S` | |`s` and `S` |✔ |✔ |✔ |
|`KC_T` | |`t` and `T` |✔ |✔ |✔ | |`KC_T` | |`t` and `T` |✔ |✔ |✔ |
|`KC_U` | |`u` and `U` |✔ |✔ |✔ | |`KC_U` | |`u` and `U` |✔ |✔ |✔ |
|`KC_V` | |`v` and `V` |✔ |✔ |✔ | |`KC_V` | |`v` and `V` |✔ |✔ |✔ |
|`KC_W` | |`w` and `W` |✔ |✔ |✔ | |`KC_W` | |`w` and `W` |✔ |✔ |✔ |
|`KC_X` | |`x` and `X` |✔ |✔ |✔ | |`KC_X` | |`x` and `X` |✔ |✔ |✔ |
|`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | |`KC_Y` | |`y` and `Y` |✔ |✔ |✔ |
|`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | |`KC_Z` | |`z` and `Z` |✔ |✔ |✔ |
|`KC_1` | |`1` and `!` |✔ |✔ |✔ | |`KC_1` | |`1` and `!` |✔ |✔ |✔ |
|`KC_2` | |`2` and `@` |✔ |✔ |✔ | |`KC_2` | |`2` and `@` |✔ |✔ |✔ |
|`KC_3` | |`3` and `#` |✔ |✔ |✔ | |`KC_3` | |`3` and `#` |✔ |✔ |✔ |
|`KC_4` | |`4` and `$` |✔ |✔ |✔ | |`KC_4` | |`4` and `$` |✔ |✔ |✔ |
|`KC_5` | |`5` and `%` |✔ |✔ |✔ | |`KC_5` | |`5` and `%` |✔ |✔ |✔ |
|`KC_6` | |`6` and `^` |✔ |✔ |✔ | |`KC_6` | |`6` and `^` |✔ |✔ |✔ |
|`KC_7` | |`7` and `&` |✔ |✔ |✔ | |`KC_7` | |`7` and `&` |✔ |✔ |✔ |
|`KC_8` | |`8` and `*` |✔ |✔ |✔ | |`KC_8` | |`8` and `*` |✔ |✔ |✔ |
|`KC_9` | |`9` and `(` |✔ |✔ |✔ | |`KC_9` | |`9` and `(` |✔ |✔ |✔ |
|`KC_0` | |`0` and `)` |✔ |✔ |✔ | |`KC_0` | |`0` and `)` |✔ |✔ |✔ |
|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | |`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ |
|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | |`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ |
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | |`KC_BACKSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ |
|`KC_TAB` | |Tab |✔ |✔ |✔ | |`KC_TAB` | |Tab |✔ |✔ |✔ |
|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | |`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ |
|`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | |`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ |
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | |`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ |
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | |`KC_LEFT_BRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ |
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | |`KC_RIGHT_BRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ |
|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | |`KC_BACKSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ |
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ |
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | |`KC_SEMICOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ |
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ |
|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |<code>&#96;</code> and `~`, JIS Zenkaku/Hankaku|✔ |✔ |✔ | |`KC_GRAVE` |`KC_GRV` |<code>&#96;</code> and `~` |✔ |✔ |✔ |
|`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | |`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ |
|`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | |`KC_DOT` | |`.` and `>` |✔ |✔ |✔ |
|`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | |`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ |
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ | |`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock |✔ |✔ |✔ |
|`KC_F1` | |F1 |✔ |✔ |✔ | |`KC_F1` | |F1 |✔ |✔ |✔ |
|`KC_F2` | |F2 |✔ |✔ |✔ | |`KC_F2` | |F2 |✔ |✔ |✔ |
|`KC_F3` | |F3 |✔ |✔ |✔ | |`KC_F3` | |F3 |✔ |✔ |✔ |
|`KC_F4` | |F4 |✔ |✔ |✔ | |`KC_F4` | |F4 |✔ |✔ |✔ |
|`KC_F5` | |F5 |✔ |✔ |✔ | |`KC_F5` | |F5 |✔ |✔ |✔ |
|`KC_F6` | |F6 |✔ |✔ |✔ | |`KC_F6` | |F6 |✔ |✔ |✔ |
|`KC_F7` | |F7 |✔ |✔ |✔ | |`KC_F7` | |F7 |✔ |✔ |✔ |
|`KC_F8` | |F8 |✔ |✔ |✔ | |`KC_F8` | |F8 |✔ |✔ |✔ |
|`KC_F9` | |F9 |✔ |✔ |✔ | |`KC_F9` | |F9 |✔ |✔ |✔ |
|`KC_F10` | |F10 |✔ |✔ |✔ | |`KC_F10` | |F10 |✔ |✔ |✔ |
|`KC_F11` | |F11 |✔ |✔ |✔ | |`KC_F11` | |F11 |✔ |✔ |✔ |
|`KC_F12` | |F12 |✔ |✔ |✔ | |`KC_F12` | |F12 |✔ |✔ |✔ |
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ | |`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ |
|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔<sup>2</sup>|✔ | |`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔<sup>2</sup>|✔ |
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |✔ |✔<sup>2</sup>|✔ | |`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU` |Pause, Brightness Up (macOS) |✔ |✔<sup>2</sup>|✔ |
|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | |`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ |
|`KC_HOME` | |Home |✔ |✔ |✔ | |`KC_HOME` | |Home |✔ |✔ |✔ |
|`KC_PGUP` | |Page Up |✔ |✔ |✔ | |`KC_PAGE_UP` |`KC_PGUP` |Page Up |✔ |✔ |✔ |
|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | |`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ |
|`KC_END` | |End |✔ |✔ |✔ | |`KC_END` | |End |✔ |✔ |✔ |
|`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | |`KC_PAGE_DOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ |
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | |`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ |
|`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | |`KC_LEFT` | |Left Arrow |✔ |✔ |✔ |
|`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | |`KC_DOWN` | |Down Arrow |✔ |✔ |✔ |
|`KC_UP` | |Up Arrow |✔ |✔ |✔ | |`KC_UP` | |Up Arrow |✔ |✔ |✔ |
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |✔ |✔ |✔ | |`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear |✔ |✔ |✔ |
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | |`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ |
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | |`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ |
|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | |`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ |
|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | |`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ |
|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | |`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ |
|`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | |`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ |
|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | |`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ |
|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | |`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ |
|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | |`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ |
|`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | |`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ |
|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | |`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ |
|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | |`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ |
|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | |`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ |
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | |`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ |
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | |`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ |
|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | |`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ |
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | |`KC_NONUS_BACKSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ |
|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | |`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ |
|`KC_POWER` | |System Power | |✔<sup>3</sup>|✔ | |`KC_KB_POWER` | |System Power | |✔<sup>3</sup>|✔ |
|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | |`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ |
|`KC_F13` | |F13 |✔ |✔ |✔ | |`KC_F13` | |F13 |✔ |✔ |✔ |
|`KC_F14` | |F14 |✔ |✔ |✔ | |`KC_F14` | |F14 |✔ |✔ |✔ |
|`KC_F15` | |F15 |✔ |✔ |✔ | |`KC_F15` | |F15 |✔ |✔ |✔ |
|`KC_F16` | |F16 |✔ |✔ |✔ | |`KC_F16` | |F16 |✔ |✔ |✔ |
|`KC_F17` | |F17 |✔ |✔ |✔ | |`KC_F17` | |F17 |✔ |✔ |✔ |
|`KC_F18` | |F18 |✔ |✔ |✔ | |`KC_F18` | |F18 |✔ |✔ |✔ |
|`KC_F19` | |F19 |✔ |✔ |✔ | |`KC_F19` | |F19 |✔ |✔ |✔ |
|`KC_F20` | |F20 |✔ | |✔ | |`KC_F20` | |F20 |✔ | |✔ |
|`KC_F21` | |F21 |✔ | |✔ | |`KC_F21` | |F21 |✔ | |✔ |
|`KC_F22` | |F22 |✔ | |✔ | |`KC_F22` | |F22 |✔ | |✔ |
|`KC_F23` | |F23 |✔ | |✔ | |`KC_F23` | |F23 |✔ | |✔ |
|`KC_F24` | |F24 |✔ | |✔ | |`KC_F24` | |F24 |✔ | |✔ |
|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | |`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ |
|`KC_HELP` | |Help | | |✔ | |`KC_HELP` | |Help | | |✔ |
|`KC_MENU` | |Menu | | |✔ | |`KC_MENU` | |Menu | | |✔ |
|`KC_SELECT` |`KC_SLCT` |Select | | |✔ | |`KC_SELECT` |`KC_SLCT` |Select | | |✔ |
|`KC_STOP` | |Stop | | |✔ | |`KC_STOP` | |Stop | | |✔ |
|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | |`KC_AGAIN` |`KC_AGIN` |Again | | |✔ |
|`KC_UNDO` | |Undo | | |✔ | |`KC_UNDO` | |Undo | | |✔ |
|`KC_CUT` | |Cut | | |✔ | |`KC_CUT` | |Cut | | |✔ |
|`KC_COPY` | |Copy | | |✔ | |`KC_COPY` | |Copy | | |✔ |
|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | |`KC_PASTE` |`KC_PSTE` |Paste | | |✔ |
|`KC_FIND` | |Find | | |✔ | |`KC_FIND` | |Find | | |✔ |
|`KC__MUTE` | |Mute | |✔ |✔ | |`KC_KB_MUTE` | |Mute | |✔ |✔ |
|`KC__VOLUP` | |Volume Up | |✔ |✔ | |`KC_KB_VOLUME_UP` | |Volume Up | |✔ |✔ |
|`KC__VOLDOWN` | |Volume Down | |✔ |✔ | |`KC_KB_VOLUME_DOWN` | |Volume Down | |✔ |✔ |
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | |`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | |
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | |`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock |✔ |✔ | |
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | |`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock |✔ |✔ | |
|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | |`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ |
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | |`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | |
|`KC_INT1` |`KC_RO` |JIS `\` and `_` |✔ | |✔ | |`KC_INTERNATIONAL_1` |`KC_INT1` |International 1 |✔ | |✔ |
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |✔ | |✔ | |`KC_INTERNATIONAL_2` |`KC_INT2` |International 2 |✔ | |✔ |
|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` |✔ | |✔ | |`KC_INTERNATIONAL_3` |`KC_INT3` |International 3 |✔ | |✔ |
|`KC_INT4` |`KC_HENK` |JIS Henkan |✔ | |✔ | |`KC_INTERNATIONAL_4` |`KC_INT4` |International 4 |✔ | |✔ |
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |✔ | |✔ | |`KC_INTERNATIONAL_5` |`KC_INT5` |International 5 |✔ | |✔ |
|`KC_INT6` | |JIS Numpad `,` | | |✔ | |`KC_INTERNATIONAL_6` |`KC_INT6` |International 6 | | |✔ |
|`KC_INT7` | |International 7 | | | | |`KC_INTERNATIONAL_7` |`KC_INT7` |International 7 | | | |
|`KC_INT8` | |International 8 | | | | |`KC_INTERNATIONAL_8` |`KC_INT8` |International 8 | | | |
|`KC_INT9` | |International 9 | | | | |`KC_INTERNATIONAL_9` |`KC_INT9` |International 9 | | | |
|`KC_LANG1` |`KC_HAEN` |Hangul/English | | |✔ | |`KC_LANGUAGE_1` |`KC_LNG1` |Language 1 | | |✔ |
|`KC_LANG2` |`KC_HANJ` |Hanja | | |✔ | |`KC_LANGUAGE_2` |`KC_LNG2` |Language 2 | | |✔ |
|`KC_LANG3` | |JIS Katakana | | |✔ | |`KC_LANGUAGE_3` |`KC_LNG3` |Language 3 | | |✔ |
|`KC_LANG4` | |JIS Hiragana | | |✔ | |`KC_LANGUAGE_4` |`KC_LNG4` |Language 4 | | |✔ |
|`KC_LANG5` | |JIS Zenkaku/Hankaku | | |✔ | |`KC_LANGUAGE_5` |`KC_LNG5` |Language 5 | | |✔ |
|`KC_LANG6` | |Language 6 | | | | |`KC_LANGUAGE_6` |`KC_LNG6` |Language 6 | | | |
|`KC_LANG7` | |Language 7 | | | | |`KC_LANGUAGE_7` |`KC_LNG7` |Language 7 | | | |
|`KC_LANG8` | |Language 8 | | | | |`KC_LANGUAGE_8` |`KC_LNG8` |Language 8 | | | |
|`KC_LANG9` | |Language 9 | | | | |`KC_LANGUAGE_9` |`KC_LNG9` |Language 9 | | | |
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | | |`KC_ALTERNATE_ERASE` |`KC_ERAS` |Alternate Erase | | | |
|`KC_SYSREQ` | |SysReq/Attention | | | | |`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention | | | |
|`KC_CANCEL` | |Cancel | | | | |`KC_CANCEL` |`KC_CNCL` |Cancel | | | |
|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | |`KC_CLEAR` |`KC_CLR` |Clear | | |✔ |
|`KC_PRIOR` | |Prior | | | | |`KC_PRIOR` |`KC_PRIR` |Prior | | | |
|`KC_RETURN` | |Return | | | | |`KC_RETURN` |`KC_RETN` |Return | | | |
|`KC_SEPARATOR` | |Separator | | | | |`KC_SEPARATOR` |`KC_SEPR` |Separator | | | |
|`KC_OUT` | |Out | | | | |`KC_OUT` | |Out | | | |
|`KC_OPER` | |Oper | | | | |`KC_OPER` | |Oper | | | |
|`KC_CLEAR_AGAIN` | |Clear/Again | | | | |`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again | | | |
|`KC_CRSEL` | |CrSel/Props | | | | |`KC_CRSEL` |`KC_CRSL` |CrSel/Props | | | |
|`KC_EXSEL` | |ExSel | | | | |`KC_EXSEL` |`KC_EXSL` |ExSel | | | |
|`KC_LCTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | |`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ |
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | |`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ |
|`KC_LALT` |`KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | |`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ |
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | |`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|`KC_RCTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | |`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ |
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | |`KC_RIGHT_SHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ |
|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) |✔ |✔ |✔ | |`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |✔ |✔ |✔ |
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | |`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ | |`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ |
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ | |`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ |
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ | |`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ |
|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | |`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ |
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔<sup>4</sup>|✔ | |`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔<sup>4</sup>|✔ |
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔<sup>4</sup>|✔ | |`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔<sup>4</sup>|✔ |
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔<sup>5</sup>|✔ | |`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔<sup>5</sup>|✔ |
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔<sup>5</sup>|✔ | |`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔<sup>5</sup>|✔ |
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | |`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ |
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | |`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ |
|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | |`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ |
|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | |`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ |
|`KC_MAIL` | |Launch Mail |✔ | |✔ | |`KC_MAIL` | |Launch Mail |✔ | |✔ |
|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | |`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ |
|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | |`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ |
|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | |`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ |
|`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | |`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ |
|`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | |`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ |
|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | |`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ |
|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | |`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ |
|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | |`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ |
|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | |`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ |
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track |✔ |✔<sup>5</sup>|✔ | |`KC_MEDIA_FAST_FORWARD` |`KC_MFFD` |Next Track |✔ |✔<sup>5</sup>|✔ |
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ | |`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ |
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | |`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ |
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | |`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ |
<sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/> <sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/>
<sup>2. Treated as F13-F15.</sup><br/> <sup>2. Treated as F13-F15.</sup><br/>

View file

@ -74,118 +74,118 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
## Punctuation ## Punctuation
|Key |Aliases |Description | |Key |Aliases |Description |
|-----------------|-------------------|-----------------------------------------------| |--------------------|---------|--------------------------|
|`KC_ENTER` |`KC_ENT` |Return (Enter) | |`KC_ENTER` |`KC_ENT` |Return (Enter) |
|`KC_ESCAPE` |`KC_ESC` |Escape | |`KC_ESCAPE` |`KC_ESC` |Escape |
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) | |`KC_BACKSPACE` |`KC_BSPC`|Delete (Backspace) |
|`KC_TAB` | |Tab | |`KC_TAB` | |Tab |
|`KC_SPACE` |`KC_SPC` |Spacebar | |`KC_SPACE` |`KC_SPC` |Spacebar |
|`KC_MINUS` |`KC_MINS` |`-` and `_` | |`KC_MINUS` |`KC_MINS`|`-` and `_` |
|`KC_EQUAL` |`KC_EQL` |`=` and `+` | |`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | |`KC_LEFT_BRACKET` |`KC_LBRC`|`[` and `{` |
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | |`KC_RIGHT_BRACKET` |`KC_RBRC`|`]` and `}` |
|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | |`KC_BACKSLASH` |`KC_BSLS`|`\` and `\|` |
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | |`KC_NONUS_HASH` |`KC_NUHS`|Non-US `#` and `~` |
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | |`KC_SEMICOLON` |`KC_SCLN`|`;` and `:` |
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | |`KC_QUOTE` |`KC_QUOT`|`'` and `"` |
|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK`|<code>&#96;</code> and `~`, JIS Zenkaku/Hankaku| |`KC_GRAVE` |`KC_GRV` |<code>&#96;</code> and `~`|
|`KC_COMMA` |`KC_COMM` |`,` and `<` | |`KC_COMMA` |`KC_COMM`|`,` and `<` |
|`KC_DOT` | |`.` and `>` | |`KC_DOT` | |`.` and `>` |
|`KC_SLASH` |`KC_SLSH` |`/` and `?` | |`KC_SLASH` |`KC_SLSH`|`/` and `?` |
|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and `\|` | |`KC_NONUS_BACKSLASH`|`KC_NUBS`|Non-US `\` and `\|` |
## Lock Keys ## Lock Keys
|Key |Aliases |Description | |Key |Aliases |Description |
|-------------------|--------------------|------------------------------------| |------------------------|--------------------|------------------------------------|
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock | |`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock |
|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| |`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)|
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | |`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear |
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | |`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock |
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | |`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock |
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock | |`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock |
## Modifiers ## Modifiers
|Key |Aliases |Description | |Key |Aliases |Description |
|-----------|--------------------|------------------------------------| |----------------|-------------------------------|------------------------------------|
|`KC_LCTRL` |`KC_LCTL` |Left Control | |`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |
|`KC_LSHIFT`|`KC_LSFT` |Left Shift | |`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |
|`KC_LALT` |`KC_LOPT` |Left Alt (Option) | |`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | |`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|`KC_RCTRL` |`KC_RCTL` |Right Control | |`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |
|`KC_RSHIFT`|`KC_RSFT` |Right Shift | |`KC_RIGHT_SHIFT`|`KC_RSFT` |Right Shift |
|`KC_RALT` |`KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | |`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| |`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
## International ## International
|Key |Aliases |Description | |Key |Aliases |Description |
|----------|---------|---------------------| |--------------------|---------|---------------------|
|`KC_INT1` |`KC_RO` |JIS `\` and `_` | |`KC_INTERNATIONAL_1`|`KC_INT1`|JIS `\` and `_` |
|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana| |`KC_INTERNATIONAL_2`|`KC_INT2`|JIS Katakana/Hiragana|
|`KC_INT3` |`KC_JYEN`|JIS `¥` and `\|` | |`KC_INTERNATIONAL_3`|`KC_INT3`|JIS `¥` and `\|` |
|`KC_INT4` |`KC_HENK`|JIS Henkan | |`KC_INTERNATIONAL_4`|`KC_INT4`|JIS Henkan |
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | |`KC_INTERNATIONAL_5`|`KC_INT5`|JIS Muhenkan |
|`KC_INT6` | |JIS Numpad `,` | |`KC_INTERNATIONAL_6`|`KC_INT6`|JIS Numpad `,` |
|`KC_INT7` | |International 7 | |`KC_INTERNATIONAL_7`|`KC_INT7`|International 7 |
|`KC_INT8` | |International 8 | |`KC_INTERNATIONAL_8`|`KC_INT8`|International 8 |
|`KC_INT9` | |International 9 | |`KC_INTERNATIONAL_9`|`KC_INT9`|International 9 |
|`KC_LANG1`|`KC_HAEN`|Hangul/English | |`KC_LANGUAGE_1` |`KC_LNG1`|Hangul/English |
|`KC_LANG2`|`KC_HANJ`|Hanja | |`KC_LANGUAGE_2` |`KC_LNG2`|Hanja |
|`KC_LANG3`| |JIS Katakana | |`KC_LANGUAGE_3` |`KC_LNG3`|JIS Katakana |
|`KC_LANG4`| |JIS Hiragana | |`KC_LANGUAGE_4` |`KC_LNG4`|JIS Hiragana |
|`KC_LANG5`| |JIS Zenkaku/Hankaku | |`KC_LANGUAGE_5` |`KC_LNG5`|JIS Zenkaku/Hankaku |
|`KC_LANG6`| |Language 6 | |`KC_LANGUAGE_6` |`KC_LNG6`|Language 6 |
|`KC_LANG7`| |Language 7 | |`KC_LANGUAGE_7` |`KC_LNG7`|Language 7 |
|`KC_LANG8`| |Language 8 | |`KC_LANGUAGE_8` |`KC_LNG8`|Language 8 |
|`KC_LANG9`| |Language 9 | |`KC_LANGUAGE_9` |`KC_LNG9`|Language 9 |
## Commands ## Commands
|Key |Aliases |Description | |Key |Aliases |Description |
|------------------|------------------------------|--------------------------------------| |--------------------|------------------------------|--------------------------------------|
|`KC_PSCREEN` |`KC_PSCR` |Print Screen | |`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen |
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | |`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |
|`KC_INSERT` |`KC_INS` |Insert | |`KC_INSERT` |`KC_INS` |Insert |
|`KC_HOME` | |Home | |`KC_HOME` | |Home |
|`KC_PGUP` | |Page Up | |`KC_PAGE_UP` |`KC_PGUP` |Page Up |
|`KC_DELETE` |`KC_DEL` |Forward Delete | |`KC_DELETE` |`KC_DEL` |Forward Delete |
|`KC_END` | |End | |`KC_END` | |End |
|`KC_PGDOWN` |`KC_PGDN` |Page Down | |`KC_PAGE_DOWN` |`KC_PGDN` |Page Down |
|`KC_RIGHT` |`KC_RGHT` |Right Arrow | |`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|`KC_LEFT` | |Left Arrow | |`KC_LEFT` | |Left Arrow |
|`KC_DOWN` | |Down Arrow | |`KC_DOWN` | |Down Arrow |
|`KC_UP` | |Up Arrow | |`KC_UP` | |Up Arrow |
|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)| |`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)|
|`KC_POWER` | |System Power | |`KC_KB_POWER` | |System Power |
|`KC_EXECUTE` |`KC_EXEC` |Execute | |`KC_EXECUTE` |`KC_EXEC` |Execute |
|`KC_HELP` | |Help | |`KC_HELP` | |Help |
|`KC_MENU` | |Menu | |`KC_MENU` | |Menu |
|`KC_SELECT` |`KC_SLCT` |Select | |`KC_SELECT` |`KC_SLCT` |Select |
|`KC_STOP` | |Stop | |`KC_STOP` | |Stop |
|`KC_AGAIN` |`KC_AGIN` |Again | |`KC_AGAIN` |`KC_AGIN` |Again |
|`KC_UNDO` | |Undo | |`KC_UNDO` | |Undo |
|`KC_CUT` | |Cut | |`KC_CUT` | |Cut |
|`KC_COPY` | |Copy | |`KC_COPY` | |Copy |
|`KC_PASTE` |`KC_PSTE` |Paste | |`KC_PASTE` |`KC_PSTE` |Paste |
|`KC_FIND` | |Find | |`KC_FIND` | |Find |
|`KC__MUTE` | |Mute | |`KC_KB_MUTE` | |Mute |
|`KC__VOLUP` | |Volume Up | |`KC_KB_VOLUME_UP` | |Volume Up |
|`KC__VOLDOWN` | |Volume Down | |`KC_KB_VOLUME_DOWN` | |Volume Down |
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | |`KC_ALTERNATE_ERASE`|`KC_ERAS` |Alternate Erase |
|`KC_SYSREQ` | |SysReq/Attention | |`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention |
|`KC_CANCEL` | |Cancel | |`KC_CANCEL` |`KC_CNCL` |Cancel |
|`KC_CLEAR` |`KC_CLR` |Clear | |`KC_CLEAR` |`KC_CLR` |Clear |
|`KC_PRIOR` | |Prior | |`KC_PRIOR` |`KC_PRIR` |Prior |
|`KC_RETURN` | |Return | |`KC_RETURN` |`KC_RETN` |Return |
|`KC_SEPARATOR` | |Separator | |`KC_SEPARATOR` |`KC_SEPR` |Separator |
|`KC_OUT` | |Out | |`KC_OUT` | |Out |
|`KC_OPER` | |Oper | |`KC_OPER` | |Oper |
|`KC_CLEAR_AGAIN` | |Clear/Again | |`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again |
|`KC_CRSEL` | |CrSel/Props | |`KC_CRSEL` |`KC_CRSL` |CrSel/Props |
|`KC_EXSEL` | |ExSel | |`KC_EXSEL` |`KC_EXSL` |ExSel |
## Media Keys ## Media Keys

View file

@ -105,7 +105,7 @@ At the top of the file you'll find this:
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Helpful defines // Helpful defines
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define GRAVE_MODS (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* You can use _______ in place for KC_TRNS (transparent) * * You can use _______ in place for KC_TRNS (transparent) *
@ -164,7 +164,7 @@ Our function layer is, from a code point of view, no different from the base lay
[_FL] = LAYOUT( [_FL] = LAYOUT(
KC_GRV, 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_DEL, BL_STEP, \ KC_GRV, 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_DEL, BL_STEP, \
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SCRL, KC_PAUS, _______, _______, _______, _______, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
_______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END),

View file

@ -168,7 +168,7 @@ k33 | {"label":"Enter", "x":3, "y":3, "h":2}
k40 | {"label":"0", "x":0, "y":4, "w":2} k40 | {"label":"0", "x":0, "y":4, "w":2}
k42 | {"label":".", "x":2, "y":4} k42 | {"label":".", "x":2, "y":4}
When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NLCK` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file. When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NUM` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file.
## Issues and Hazards ## Issues and Hazards

View file

@ -247,7 +247,7 @@ To enable `retro tapping`, add the following to your `config.h`:
Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term. Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term.
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. For instance, holding and releasing `LT(2, KC_SPC)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPC` instead.
For more granular control of this feature, you can add the following to your `config.h`: For more granular control of this feature, you can add the following to your `config.h`:
@ -260,7 +260,7 @@ You can then add the following function to your keymap:
```c ```c
bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case LT(2, KC_SPACE): case LT(2, KC_SPC):
return true; return true;
default: default:
return false; return false;

View file

@ -66,10 +66,10 @@ At the keyboard level we define a C macro (typically named `LAYOUT()`) which map
k30, k31, k32, k33, \ k30, k31, k32, k33, \
k40, k42 \ k40, k42 \
) { \ ) { \
{ k00, k01, k02, k03, }, \ { k00, k01, k02, k03 }, \
{ k10, k11, k12, k13, }, \ { k10, k11, k12, k13 }, \
{ k20, k21, k22, KC_NO, }, \ { k20, k21, k22, KC_NO }, \
{ k30, k31, k32, k33, }, \ { k30, k31, k32, k33 }, \
{ k40, KC_NO, k42, KC_NO } \ { k40, KC_NO, k42, KC_NO } \
} }
``` ```
@ -82,14 +82,15 @@ You can also use this macro to handle unusual matrix layouts, for example the [C
At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this: At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this:
``` ```c
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( [0] = LAYOUT(
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS, \ KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, \ KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3, KC_PENT, \ KC_P1, KC_P2, KC_P3, KC_PENT,
KC_P0, KC_PDOT) KC_P0, KC_PDOT
)
} }
``` ```
@ -123,7 +124,7 @@ And when our current scan completes it will look like this:
} }
``` ```
Comparing against our keymap we can see that the pressed key is KC_NLCK. From here we dispatch to the `process_record` set of functions. Comparing against our keymap we can see that the pressed key is `KC_NUM`. From here we dispatch to the `process_record` set of functions.
<!-- FIXME: Magic happens between here and process_record --> <!-- FIXME: Magic happens between here and process_record -->

View file

@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[1] = LAYOUT_60_hhkb( [1] = LAYOUT_60_hhkb(
KC_PWR, 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_INS, KC_DEL, KC_PWR, 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_INS, KC_DEL,
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, _______, _______,
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
_______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______,
_______, _______, _______, _______, _______ _______, _______, _______, _______, _______

View file

@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[1] = LAYOUT_64_ansi( [1] = LAYOUT_64_ansi(
KC_GRV, 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_DEL, KC_GRV, 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_DEL,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END

View file

@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[1] = LAYOUT_64_iso( [1] = LAYOUT_64_iso(
KC_GRV, 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_DEL, KC_GRV, 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_DEL,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END

View file

@ -33,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
[0] = LAYOUT_96_ansi( [0] = LAYOUT_96_ansi(
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, KC_VOLD, KC_VOLU, KC_MUTE, 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, KC_VOLD, KC_VOLU, KC_MUTE,
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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS,
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_P7, KC_P8, KC_P9, KC_PPLS, 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_P7, KC_P8, KC_P9, KC_PPLS,
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_ENT, KC_P4, KC_P5, KC_P6, 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_ENT, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,

View file

@ -33,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
[0] = LAYOUT_96_iso( [0] = LAYOUT_96_iso(
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, KC_VOLD, KC_VOLU, KC_MUTE, 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, KC_VOLD, KC_VOLU, KC_MUTE,
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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_NUM, KC_PSLS, KC_PAST, KC_PMNS,
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_P7, KC_P8, KC_P9, KC_PPLS, 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_P7, KC_P8, KC_P9, KC_PPLS,
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, KC_P4, KC_P5, KC_P6, 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, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,

View file

@ -18,9 +18,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
[0] = LAYOUT_fullsize_ansi( [0] = LAYOUT_fullsize_ansi(
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, 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,
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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
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, KC_P7, KC_P8, KC_P9, KC_PPLS, 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, KC_P7, KC_P8, KC_P9, KC_PPLS,
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_ENT, KC_P4, KC_P5, KC_P6, 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_ENT, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,

View file

@ -18,9 +18,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
[0] = LAYOUT_fullsize_iso( [0] = LAYOUT_fullsize_iso(
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, 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,
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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
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, KC_P4, KC_P5, KC_P6, 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, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,

View file

@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[0] = LAYOUT_numpad_6x4( [0] = LAYOUT_numpad_6x4(
KC_ESC, KC_TAB, MO(1), KC_BSPC, KC_ESC, KC_TAB, MO(1), KC_BSPC,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_P1, KC_P2, KC_P3,

View file

@ -33,12 +33,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
[0] = LAYOUT_numpad_6x5( [0] = LAYOUT_numpad_6x5(
KC_GRAVE, KC_ESC, KC_TAB, MO(1), KC_BSPC, KC_GRV, KC_ESC, KC_TAB, MO(1), KC_BSPC,
KC_COMMA, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_COMM, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_LGUI, KC_P7, KC_P8, KC_P9, KC_LGUI, KC_P7, KC_P8, KC_P9,
KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_LSHIFT, KC_P1, KC_P2, KC_P3, KC_LSFT, KC_P1, KC_P2, KC_P3,
KC_LCTRL, KC_P0, KC_PDOT, KC_PENT KC_LCTL, KC_P0, KC_PDOT, KC_PENT
), ),
/* /*

View file

@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[0] = LAYOUT_ortho_6x4( [0] = LAYOUT_ortho_6x4(
KC_ESC, KC_TAB, MO(1), KC_BSPC, KC_ESC, KC_TAB, MO(1), KC_BSPC,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_PERC, KC_P4, KC_P5, KC_P6, KC_PERC,
KC_P1, KC_P2, KC_P3, KC_EQL, KC_P1, KC_P2, KC_P3, KC_EQL,

View file

@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
[0] = LAYOUT_tkl_ansi( [0] = LAYOUT_tkl_ansi(
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, 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,
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_INS, KC_HOME, KC_PGUP, 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_INS, KC_HOME, KC_PGUP,
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, 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,

View file

@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
[0] = LAYOUT_tkl_iso( [0] = LAYOUT_tkl_iso(
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, 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,
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_INS, KC_HOME, KC_PGUP, 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_INS, KC_HOME, KC_PGUP,
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_DEL, KC_END, KC_PGDN, 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_DEL, KC_END, KC_PGDN,

View file

@ -277,8 +277,8 @@ void process_action(keyrecord_t *record, action_t action) {
if (event.pressed) { if (event.pressed) {
if (mods) { if (mods) {
if (IS_MOD(action.key.code) || action.key.code == KC_NO) { if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
// e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. // e.g. LSFT(KC_LEFT_GUI): we don't want the LSFT to be weak as it would make it useless.
// This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). // This also makes LSFT(KC_LEFT_GUI) behave exactly the same as LGUI(KC_LEFT_SHIFT).
// Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO).
add_mods(mods); add_mods(mods);
} else { } else {
@ -410,7 +410,7 @@ void process_action(keyrecord_t *record, action_t action) {
} else { } else {
if (tap_count > 0) { if (tap_count > 0) {
dprint("MODS_TAP: Tap: unregister_code\n"); dprint("MODS_TAP: Tap: unregister_code\n");
if (action.layer_tap.code == KC_CAPS) { if (action.layer_tap.code == KC_CAPS_LOCK) {
wait_ms(TAP_HOLD_CAPS_DELAY); wait_ms(TAP_HOLD_CAPS_DELAY);
} else { } else {
wait_ms(TAP_CODE_DELAY); wait_ms(TAP_CODE_DELAY);
@ -609,7 +609,7 @@ void process_action(keyrecord_t *record, action_t action) {
} else { } else {
if (tap_count > 0) { if (tap_count > 0) {
dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n");
if (action.layer_tap.code == KC_CAPS) { if (action.layer_tap.code == KC_CAPS_LOCK) {
wait_ms(TAP_HOLD_CAPS_DELAY); wait_ms(TAP_HOLD_CAPS_DELAY);
} else { } else {
wait_ms(TAP_CODE_DELAY); wait_ms(TAP_CODE_DELAY);
@ -786,37 +786,37 @@ void register_code(uint8_t code) {
return; return;
} }
#ifdef LOCKING_SUPPORT_ENABLE #ifdef LOCKING_SUPPORT_ENABLE
else if (KC_LOCKING_CAPS == code) { else if (KC_LOCKING_CAPS_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE # ifdef LOCKING_RESYNC_ENABLE
// Resync: ignore if caps lock already is on // Resync: ignore if caps lock already is on
if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) return; if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) return;
# endif # endif
add_key(KC_CAPSLOCK); add_key(KC_CAPS_LOCK);
send_keyboard_report(); send_keyboard_report();
wait_ms(100); wait_ms(100);
del_key(KC_CAPSLOCK); del_key(KC_CAPS_LOCK);
send_keyboard_report(); send_keyboard_report();
} }
else if (KC_LOCKING_NUM == code) { else if (KC_LOCKING_NUM_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE # ifdef LOCKING_RESYNC_ENABLE
if (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) return; if (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) return;
# endif # endif
add_key(KC_NUMLOCK); add_key(KC_NUM_LOCK);
send_keyboard_report(); send_keyboard_report();
wait_ms(100); wait_ms(100);
del_key(KC_NUMLOCK); del_key(KC_NUM_LOCK);
send_keyboard_report(); send_keyboard_report();
} }
else if (KC_LOCKING_SCROLL == code) { else if (KC_LOCKING_SCROLL_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE # ifdef LOCKING_RESYNC_ENABLE
if (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) return; if (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) return;
# endif # endif
add_key(KC_SCROLLLOCK); add_key(KC_SCROLL_LOCK);
send_keyboard_report(); send_keyboard_report();
wait_ms(100); wait_ms(100);
del_key(KC_SCROLLLOCK); del_key(KC_SCROLL_LOCK);
send_keyboard_report(); send_keyboard_report();
} }
#endif #endif
@ -882,34 +882,34 @@ void unregister_code(uint8_t code) {
return; return;
} }
#ifdef LOCKING_SUPPORT_ENABLE #ifdef LOCKING_SUPPORT_ENABLE
else if (KC_LOCKING_CAPS == code) { else if (KC_LOCKING_CAPS_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE # ifdef LOCKING_RESYNC_ENABLE
// Resync: ignore if caps lock already is off // Resync: ignore if caps lock already is off
if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) return; if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) return;
# endif # endif
add_key(KC_CAPSLOCK); add_key(KC_CAPS_LOCK);
send_keyboard_report(); send_keyboard_report();
del_key(KC_CAPSLOCK); del_key(KC_CAPS_LOCK);
send_keyboard_report(); send_keyboard_report();
} }
else if (KC_LOCKING_NUM == code) { else if (KC_LOCKING_NUM_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE # ifdef LOCKING_RESYNC_ENABLE
if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) return; if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) return;
# endif # endif
add_key(KC_NUMLOCK); add_key(KC_NUM_LOCK);
send_keyboard_report(); send_keyboard_report();
del_key(KC_NUMLOCK); del_key(KC_NUM_LOCK);
send_keyboard_report(); send_keyboard_report();
} }
else if (KC_LOCKING_SCROLL == code) { else if (KC_LOCKING_SCROLL_LOCK == code) {
# ifdef LOCKING_RESYNC_ENABLE # ifdef LOCKING_RESYNC_ENABLE
if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) return; if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) return;
# endif # endif
add_key(KC_SCROLLLOCK); add_key(KC_SCROLL_LOCK);
send_keyboard_report(); send_keyboard_report();
del_key(KC_SCROLLLOCK); del_key(KC_SCROLL_LOCK);
send_keyboard_report(); send_keyboard_report();
} }
#endif #endif
@ -952,9 +952,9 @@ void tap_code_delay(uint8_t code, uint16_t delay) {
/** \brief Tap a keycode with the default delay. /** \brief Tap a keycode with the default delay.
* *
* \param code The basic keycode to tap. If `code` is `KC_CAPS`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined. * \param code The basic keycode to tap. If `code` is `KC_CAPS_LOCK`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined.
*/ */
void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); } void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS_LOCK ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); }
/** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. /** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately.
* *
@ -1078,7 +1078,7 @@ bool is_tap_action(action_t action) {
case ACT_LAYER_TAP: case ACT_LAYER_TAP:
case ACT_LAYER_TAP_EXT: case ACT_LAYER_TAP_EXT:
switch (action.layer_tap.code) { switch (action.layer_tap.code) {
case KC_NO ... KC_RGUI: case KC_NO ... KC_RIGHT_GUI:
case OP_TAP_TOGGLE: case OP_TAP_TOGGLE:
case OP_ONESHOT: case OP_ONESHOT:
return true; return true;
@ -1086,7 +1086,7 @@ bool is_tap_action(action_t action) {
return false; return false;
case ACT_SWAP_HANDS: case ACT_SWAP_HANDS:
switch (action.swap.code) { switch (action.swap.code) {
case KC_NO ... KC_RGUI: case KC_NO ... KC_RIGHT_GUI:
case OP_SH_TAP_TOGGLE: case OP_SH_TAP_TOGGLE:
return true; return true;
} }

View file

@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED) #define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED)
#define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) #define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF)
#define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL) #define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL)
#define IS_MOD(code) (KC_LCTRL <= (code) && (code) <= KC_RGUI) #define IS_MOD(code) (KC_LEFT_CTRL <= (code) && (code) <= KC_RIGHT_GUI)
#define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) #define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF))
#define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE) #define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE)
@ -46,10 +46,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MOD_BIT(code) (1 << MOD_INDEX(code)) #define MOD_BIT(code) (1 << MOD_INDEX(code))
#define MOD_INDEX(code) ((code)&0x07) #define MOD_INDEX(code) ((code)&0x07)
#define MOD_MASK_CTRL (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) #define MOD_MASK_CTRL (MOD_BIT(KC_LEFT_CTRL) | MOD_BIT(KC_RIGHT_CTRL))
#define MOD_MASK_SHIFT (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) #define MOD_MASK_SHIFT (MOD_BIT(KC_LEFT_SHIFT) | MOD_BIT(KC_RIGHT_SHIFT))
#define MOD_MASK_ALT (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) #define MOD_MASK_ALT (MOD_BIT(KC_LEFT_ALT) | MOD_BIT(KC_RIGHT_ALT))
#define MOD_MASK_GUI (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) #define MOD_MASK_GUI (MOD_BIT(KC_LEFT_GUI) | MOD_BIT(KC_RIGHT_GUI))
#define MOD_MASK_CS (MOD_MASK_CTRL | MOD_MASK_SHIFT) #define MOD_MASK_CS (MOD_MASK_CTRL | MOD_MASK_SHIFT)
#define MOD_MASK_CA (MOD_MASK_CTRL | MOD_MASK_ALT) #define MOD_MASK_CA (MOD_MASK_CTRL | MOD_MASK_ALT)
#define MOD_MASK_CG (MOD_MASK_CTRL | MOD_MASK_GUI) #define MOD_MASK_CG (MOD_MASK_CTRL | MOD_MASK_GUI)
@ -67,6 +67,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FN_MIN KC_FN0 #define FN_MIN KC_FN0
#define FN_MAX KC_FN31 #define FN_MAX KC_FN31
// clang-format off
/* /*
* Short names for ease of definition of keymap * Short names for ease of definition of keymap
*/ */
@ -75,47 +77,55 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KC_TRNS KC_TRANSPARENT #define KC_TRNS KC_TRANSPARENT
/* Punctuation */ /* Punctuation */
#define KC_ENT KC_ENTER #define KC_ENT KC_ENTER
#define KC_ESC KC_ESCAPE #define KC_ESC KC_ESCAPE
#define KC_BSPC KC_BSPACE #define KC_BSPC KC_BACKSPACE
#define KC_SPC KC_SPACE #define KC_SPC KC_SPACE
#define KC_MINS KC_MINUS #define KC_MINS KC_MINUS
#define KC_EQL KC_EQUAL #define KC_EQL KC_EQUAL
#define KC_LBRC KC_LBRACKET #define KC_LBRC KC_LEFT_BRACKET
#define KC_RBRC KC_RBRACKET #define KC_RBRC KC_RIGHT_BRACKET
#define KC_BSLS KC_BSLASH #define KC_BSLS KC_BACKSLASH
#define KC_NUHS KC_NONUS_HASH #define KC_NUHS KC_NONUS_HASH
#define KC_SCLN KC_SCOLON #define KC_SCLN KC_SEMICOLON
#define KC_QUOT KC_QUOTE #define KC_QUOT KC_QUOTE
#define KC_GRV KC_GRAVE #define KC_GRV KC_GRAVE
#define KC_COMM KC_COMMA #define KC_COMM KC_COMMA
#define KC_SLSH KC_SLASH #define KC_SLSH KC_SLASH
#define KC_NUBS KC_NONUS_BSLASH #define KC_NUBS KC_NONUS_BACKSLASH
/* Lock Keys */ /* Lock Keys */
#define KC_CLCK KC_CAPSLOCK #define KC_CAPS KC_CAPS_LOCK
#define KC_CAPS KC_CAPSLOCK #define KC_SCRL KC_SCROLL_LOCK
#define KC_SLCK KC_SCROLLLOCK #define KC_NUM KC_NUM_LOCK
#define KC_NLCK KC_NUMLOCK #define KC_LCAP KC_LOCKING_CAPS_LOCK
#define KC_LCAP KC_LOCKING_CAPS #define KC_LNUM KC_LOCKING_NUM_LOCK
#define KC_LNUM KC_LOCKING_NUM #define KC_LSCR KC_LOCKING_SCROLL_LOCK
#define KC_LSCR KC_LOCKING_SCROLL
/* Commands */ /* Commands */
#define KC_PSCR KC_PSCREEN #define KC_PSCR KC_PRINT_SCREEN
#define KC_PAUS KC_PAUSE #define KC_PAUS KC_PAUSE
#define KC_BRK KC_PAUSE #define KC_BRK KC_PAUSE
#define KC_INS KC_INSERT #define KC_INS KC_INSERT
#define KC_DEL KC_DELETE #define KC_PGUP KC_PAGE_UP
#define KC_PGDN KC_PGDOWN #define KC_DEL KC_DELETE
#define KC_PGDN KC_PAGE_DOWN
#define KC_RGHT KC_RIGHT #define KC_RGHT KC_RIGHT
#define KC_APP KC_APPLICATION #define KC_APP KC_APPLICATION
#define KC_EXEC KC_EXECUTE #define KC_EXEC KC_EXECUTE
#define KC_SLCT KC_SELECT #define KC_SLCT KC_SELECT
#define KC_AGIN KC_AGAIN #define KC_AGIN KC_AGAIN
#define KC_PSTE KC_PASTE #define KC_PSTE KC_PASTE
#define KC_ERAS KC_ALT_ERASE #define KC_ERAS KC_ALTERNATE_ERASE
#define KC_CLR KC_CLEAR #define KC_SYRQ KC_SYSTEM_REQUEST
#define KC_CNCL KC_CANCEL
#define KC_CLR KC_CLEAR
#define KC_PRIR KC_PRIOR
#define KC_RETN KC_RETURN
#define KC_SEPR KC_SEPARATOR
#define KC_CLAG KC_CLEAR_AGAIN
#define KC_CRSL KC_CRSEL
#define KC_EXSL KC_EXSEL
/* Keypad */ /* Keypad */
#define KC_PSLS KC_KP_SLASH #define KC_PSLS KC_KP_SLASH
@ -123,47 +133,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KC_PMNS KC_KP_MINUS #define KC_PMNS KC_KP_MINUS
#define KC_PPLS KC_KP_PLUS #define KC_PPLS KC_KP_PLUS
#define KC_PENT KC_KP_ENTER #define KC_PENT KC_KP_ENTER
#define KC_P1 KC_KP_1 #define KC_P1 KC_KP_1
#define KC_P2 KC_KP_2 #define KC_P2 KC_KP_2
#define KC_P3 KC_KP_3 #define KC_P3 KC_KP_3
#define KC_P4 KC_KP_4 #define KC_P4 KC_KP_4
#define KC_P5 KC_KP_5 #define KC_P5 KC_KP_5
#define KC_P6 KC_KP_6 #define KC_P6 KC_KP_6
#define KC_P7 KC_KP_7 #define KC_P7 KC_KP_7
#define KC_P8 KC_KP_8 #define KC_P8 KC_KP_8
#define KC_P9 KC_KP_9 #define KC_P9 KC_KP_9
#define KC_P0 KC_KP_0 #define KC_P0 KC_KP_0
#define KC_PDOT KC_KP_DOT #define KC_PDOT KC_KP_DOT
#define KC_PEQL KC_KP_EQUAL #define KC_PEQL KC_KP_EQUAL
#define KC_PCMM KC_KP_COMMA #define KC_PCMM KC_KP_COMMA
/* Japanese specific */ /* Language Specific */
#define KC_ZKHK KC_GRAVE #define KC_INT1 KC_INTERNATIONAL_1
#define KC_RO KC_INT1 #define KC_INT2 KC_INTERNATIONAL_2
#define KC_KANA KC_INT2 #define KC_INT3 KC_INTERNATIONAL_3
#define KC_JYEN KC_INT3 #define KC_INT4 KC_INTERNATIONAL_4
#define KC_HENK KC_INT4 #define KC_INT5 KC_INTERNATIONAL_5
#define KC_MHEN KC_INT5 #define KC_INT6 KC_INTERNATIONAL_6
#define KC_INT7 KC_INTERNATIONAL_7
/* Korean specific */ #define KC_INT8 KC_INTERNATIONAL_8
#define KC_HAEN KC_LANG1 #define KC_INT9 KC_INTERNATIONAL_9
#define KC_HANJ KC_LANG2 #define KC_LNG1 KC_LANGUAGE_1
#define KC_LNG2 KC_LANGUAGE_2
#define KC_LNG3 KC_LANGUAGE_3
#define KC_LNG4 KC_LANGUAGE_4
#define KC_LNG5 KC_LANGUAGE_5
#define KC_LNG6 KC_LANGUAGE_6
#define KC_LNG7 KC_LANGUAGE_7
#define KC_LNG8 KC_LANGUAGE_8
#define KC_LNG9 KC_LANGUAGE_9
/* Modifiers */ /* Modifiers */
#define KC_LCTL KC_LCTRL #define KC_LCTL KC_LEFT_CTRL
#define KC_LSFT KC_LSHIFT #define KC_LSFT KC_LEFT_SHIFT
#define KC_LOPT KC_LALT #define KC_LALT KC_LEFT_ALT
#define KC_LCMD KC_LGUI #define KC_LOPT KC_LEFT_ALT
#define KC_LWIN KC_LGUI #define KC_LGUI KC_LEFT_GUI
#define KC_RCTL KC_RCTRL #define KC_LCMD KC_LEFT_GUI
#define KC_RSFT KC_RSHIFT #define KC_LWIN KC_LEFT_GUI
#define KC_ALGR KC_RALT #define KC_RCTL KC_RIGHT_CTRL
#define KC_ROPT KC_RALT #define KC_RSFT KC_RIGHT_SHIFT
#define KC_RCMD KC_RGUI #define KC_RALT KC_RIGHT_ALT
#define KC_RWIN KC_RGUI #define KC_ALGR KC_RIGHT_ALT
#define KC_ROPT KC_RIGHT_ALT
#define KC_RGUI KC_RIGHT_GUI
#define KC_RCMD KC_RIGHT_GUI
#define KC_RWIN KC_RIGHT_GUI
/* Generic Desktop Page (0x01) */ /* Generic Desktop Page (0x01) */
#define KC_PWR KC_SYSTEM_POWER #define KC_PWR KC_SYSTEM_POWER
#define KC_SLEP KC_SYSTEM_SLEEP #define KC_SLEP KC_SYSTEM_SLEEP
#define KC_WAKE KC_SYSTEM_WAKE #define KC_WAKE KC_SYSTEM_WAKE
@ -193,7 +215,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* System Specific */ /* System Specific */
#define KC_BRMU KC_PAUSE #define KC_BRMU KC_PAUSE
#define KC_BRMD KC_SCROLLLOCK #define KC_BRMD KC_SCROLL_LOCK
/* Mouse Keys */ /* Mouse Keys */
#define KC_MS_U KC_MS_UP #define KC_MS_U KC_MS_UP
@ -216,6 +238,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KC_ACL1 KC_MS_ACCEL1 #define KC_ACL1 KC_MS_ACCEL1
#define KC_ACL2 KC_MS_ACCEL2 #define KC_ACL2 KC_MS_ACCEL2
// clang-format on
/* Keyboard/Keypad Page (0x07) */ /* Keyboard/Keypad Page (0x07) */
enum hid_keyboard_keypad_usage { enum hid_keyboard_keypad_usage {
KC_NO = 0x00, KC_NO = 0x00,
@ -260,22 +284,22 @@ enum hid_keyboard_keypad_usage {
KC_0, KC_0,
KC_ENTER, KC_ENTER,
KC_ESCAPE, KC_ESCAPE,
KC_BSPACE, KC_BACKSPACE,
KC_TAB, KC_TAB,
KC_SPACE, KC_SPACE,
KC_MINUS, KC_MINUS,
KC_EQUAL, KC_EQUAL,
KC_LBRACKET, KC_LEFT_BRACKET,
KC_RBRACKET, // 0x30 KC_RIGHT_BRACKET, // 0x30
KC_BSLASH, KC_BACKSLASH,
KC_NONUS_HASH, KC_NONUS_HASH,
KC_SCOLON, KC_SEMICOLON,
KC_QUOTE, KC_QUOTE,
KC_GRAVE, KC_GRAVE,
KC_COMMA, KC_COMMA,
KC_DOT, KC_DOT,
KC_SLASH, KC_SLASH,
KC_CAPSLOCK, KC_CAPS_LOCK,
KC_F1, KC_F1,
KC_F2, KC_F2,
KC_F3, KC_F3,
@ -288,20 +312,20 @@ enum hid_keyboard_keypad_usage {
KC_F10, KC_F10,
KC_F11, KC_F11,
KC_F12, KC_F12,
KC_PSCREEN, KC_PRINT_SCREEN,
KC_SCROLLLOCK, KC_SCROLL_LOCK,
KC_PAUSE, KC_PAUSE,
KC_INSERT, KC_INSERT,
KC_HOME, KC_HOME,
KC_PGUP, KC_PAGE_UP,
KC_DELETE, KC_DELETE,
KC_END, KC_END,
KC_PGDOWN, KC_PAGE_DOWN,
KC_RIGHT, KC_RIGHT,
KC_LEFT, // 0x50 KC_LEFT, // 0x50
KC_DOWN, KC_DOWN,
KC_UP, KC_UP,
KC_NUMLOCK, KC_NUM_LOCK,
KC_KP_SLASH, KC_KP_SLASH,
KC_KP_ASTERISK, KC_KP_ASTERISK,
KC_KP_MINUS, KC_KP_MINUS,
@ -318,9 +342,9 @@ enum hid_keyboard_keypad_usage {
KC_KP_9, KC_KP_9,
KC_KP_0, KC_KP_0,
KC_KP_DOT, KC_KP_DOT,
KC_NONUS_BSLASH, KC_NONUS_BACKSLASH,
KC_APPLICATION, KC_APPLICATION,
KC_POWER, KC_KB_POWER,
KC_KP_EQUAL, KC_KP_EQUAL,
KC_F13, KC_F13,
KC_F14, KC_F14,
@ -345,34 +369,34 @@ enum hid_keyboard_keypad_usage {
KC_COPY, KC_COPY,
KC_PASTE, KC_PASTE,
KC_FIND, KC_FIND,
KC__MUTE, KC_KB_MUTE,
KC__VOLUP, // 0x80 KC_KB_VOLUME_UP, // 0x80
KC__VOLDOWN, KC_KB_VOLUME_DOWN,
KC_LOCKING_CAPS, KC_LOCKING_CAPS_LOCK,
KC_LOCKING_NUM, KC_LOCKING_NUM_LOCK,
KC_LOCKING_SCROLL, KC_LOCKING_SCROLL_LOCK,
KC_KP_COMMA, KC_KP_COMMA,
KC_KP_EQUAL_AS400, KC_KP_EQUAL_AS400,
KC_INT1, KC_INTERNATIONAL_1,
KC_INT2, KC_INTERNATIONAL_2,
KC_INT3, KC_INTERNATIONAL_3,
KC_INT4, KC_INTERNATIONAL_4,
KC_INT5, KC_INTERNATIONAL_5,
KC_INT6, KC_INTERNATIONAL_6,
KC_INT7, KC_INTERNATIONAL_7,
KC_INT8, KC_INTERNATIONAL_8,
KC_INT9, KC_INTERNATIONAL_9,
KC_LANG1, // 0x90 KC_LANGUAGE_1, // 0x90
KC_LANG2, KC_LANGUAGE_2,
KC_LANG3, KC_LANGUAGE_3,
KC_LANG4, KC_LANGUAGE_4,
KC_LANG5, KC_LANGUAGE_5,
KC_LANG6, KC_LANGUAGE_6,
KC_LANG7, KC_LANGUAGE_7,
KC_LANG8, KC_LANGUAGE_8,
KC_LANG9, KC_LANGUAGE_9,
KC_ALT_ERASE, KC_ALTERNATE_ERASE,
KC_SYSREQ, KC_SYSTEM_REQUEST,
KC_CANCEL, KC_CANCEL,
KC_CLEAR, KC_CLEAR,
KC_PRIOR, KC_PRIOR,
@ -397,12 +421,12 @@ enum hid_keyboard_keypad_usage {
KC_DECIMAL_SEPARATOR, KC_DECIMAL_SEPARATOR,
KC_CURRENCY_UNIT, KC_CURRENCY_UNIT,
KC_CURRENCY_SUB_UNIT, KC_CURRENCY_SUB_UNIT,
KC_KP_LPAREN, KC_KP_LEFT_PARENTHESIS,
KC_KP_RPAREN, KC_KP_RIGHT_PARENTHESIS,
KC_KP_LCBRACKET, KC_KP_LEFT_BRACE,
KC_KP_RCBRACKET, KC_KP_RIGHT_BRACE,
KC_KP_TAB, KC_KP_TAB,
KC_KP_BSPACE, KC_KP_BACKSPACE,
KC_KP_A, KC_KP_A,
KC_KP_B, KC_KP_B,
KC_KP_C, KC_KP_C,
@ -411,17 +435,17 @@ enum hid_keyboard_keypad_usage {
KC_KP_F, KC_KP_F,
KC_KP_XOR, KC_KP_XOR,
KC_KP_HAT, KC_KP_HAT,
KC_KP_PERC, KC_KP_PERCENT,
KC_KP_LT, KC_KP_LESS_THAN,
KC_KP_GT, KC_KP_GREATER_THAN,
KC_KP_AND, KC_KP_AND,
KC_KP_LAZYAND, KC_KP_LAZY_AND,
KC_KP_OR, KC_KP_OR,
KC_KP_LAZYOR, KC_KP_LAZY_OR,
KC_KP_COLON, KC_KP_COLON,
KC_KP_HASH, KC_KP_HASH,
KC_KP_SPACE, KC_KP_SPACE,
KC_KP_ATMARK, KC_KP_AT,
KC_KP_EXCLAMATION, KC_KP_EXCLAMATION,
KC_KP_MEM_STORE, //0xD0 KC_KP_MEM_STORE, //0xD0
KC_KP_MEM_RECALL, KC_KP_MEM_RECALL,
@ -440,14 +464,14 @@ enum hid_keyboard_keypad_usage {
#endif #endif
/* Modifiers */ /* Modifiers */
KC_LCTRL = 0xE0, KC_LEFT_CTRL = 0xE0,
KC_LSHIFT, KC_LEFT_SHIFT,
KC_LALT, KC_LEFT_ALT,
KC_LGUI, KC_LEFT_GUI,
KC_RCTRL, KC_RIGHT_CTRL,
KC_RSHIFT, KC_RIGHT_SHIFT,
KC_RALT, KC_RIGHT_ALT,
KC_RGUI KC_RIGHT_GUI
// ********************************************** // **********************************************
// * 0xF0-0xFF are unallocated in the HID spec. * // * 0xF0-0xFF are unallocated in the HID spec. *
@ -558,3 +582,5 @@ enum mouse_keys {
KC_MS_ACCEL1, KC_MS_ACCEL1,
KC_MS_ACCEL2 // 0xFF KC_MS_ACCEL2 // 0xFF
}; };
#include "keycode_legacy.h"

View file

@ -25,89 +25,89 @@ extern keymap_config_t keymap_config;
*/ */
uint16_t keycode_config(uint16_t keycode) { uint16_t keycode_config(uint16_t keycode) {
switch (keycode) { switch (keycode) {
case KC_CAPSLOCK: case KC_CAPS_LOCK:
case KC_LOCKING_CAPS: case KC_LOCKING_CAPS_LOCK:
if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) { if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) {
return KC_LCTL; return KC_LEFT_CTRL;
} }
return keycode; return keycode;
case KC_LCTL: case KC_LEFT_CTRL:
if (keymap_config.swap_control_capslock) { if (keymap_config.swap_control_capslock) {
return KC_CAPSLOCK; return KC_CAPS_LOCK;
} }
if (keymap_config.swap_lctl_lgui) { if (keymap_config.swap_lctl_lgui) {
if (keymap_config.no_gui) { if (keymap_config.no_gui) {
return KC_NO; return KC_NO;
} }
return KC_LGUI; return KC_LEFT_GUI;
} }
return KC_LCTL; return KC_LEFT_CTRL;
case KC_LALT: case KC_LEFT_ALT:
if (keymap_config.swap_lalt_lgui) { if (keymap_config.swap_lalt_lgui) {
if (keymap_config.no_gui) { if (keymap_config.no_gui) {
return KC_NO; return KC_NO;
} }
return KC_LGUI; return KC_LEFT_GUI;
} }
return KC_LALT; return KC_LEFT_ALT;
case KC_LGUI: case KC_LEFT_GUI:
if (keymap_config.swap_lalt_lgui) { if (keymap_config.swap_lalt_lgui) {
return KC_LALT; return KC_LEFT_ALT;
} }
if (keymap_config.swap_lctl_lgui) { if (keymap_config.swap_lctl_lgui) {
return KC_LCTRL; return KC_LEFT_CTRL;
} }
if (keymap_config.no_gui) { if (keymap_config.no_gui) {
return KC_NO; return KC_NO;
} }
return KC_LGUI; return KC_LEFT_GUI;
case KC_RCTL: case KC_RIGHT_CTRL:
if (keymap_config.swap_rctl_rgui) { if (keymap_config.swap_rctl_rgui) {
if (keymap_config.no_gui) { if (keymap_config.no_gui) {
return KC_NO; return KC_NO;
} }
return KC_RGUI; return KC_RIGHT_GUI;
} }
return KC_RCTL; return KC_RIGHT_CTRL;
case KC_RALT: case KC_RIGHT_ALT:
if (keymap_config.swap_ralt_rgui) { if (keymap_config.swap_ralt_rgui) {
if (keymap_config.no_gui) { if (keymap_config.no_gui) {
return KC_NO; return KC_NO;
} }
return KC_RGUI; return KC_RIGHT_GUI;
} }
return KC_RALT; return KC_RIGHT_ALT;
case KC_RGUI: case KC_RIGHT_GUI:
if (keymap_config.swap_ralt_rgui) { if (keymap_config.swap_ralt_rgui) {
return KC_RALT; return KC_RIGHT_ALT;
} }
if (keymap_config.swap_rctl_rgui) { if (keymap_config.swap_rctl_rgui) {
return KC_RCTL; return KC_RIGHT_CTRL;
} }
if (keymap_config.no_gui) { if (keymap_config.no_gui) {
return KC_NO; return KC_NO;
} }
return KC_RGUI; return KC_RIGHT_GUI;
case KC_GRAVE: case KC_GRAVE:
if (keymap_config.swap_grave_esc) { if (keymap_config.swap_grave_esc) {
return KC_ESC; return KC_ESCAPE;
} }
return KC_GRAVE; return KC_GRAVE;
case KC_ESC: case KC_ESCAPE:
if (keymap_config.swap_grave_esc) { if (keymap_config.swap_grave_esc) {
return KC_GRAVE; return KC_GRAVE;
} }
return KC_ESC; return KC_ESCAPE;
case KC_BSLASH: case KC_BACKSLASH:
if (keymap_config.swap_backslash_backspace) { if (keymap_config.swap_backslash_backspace) {
return KC_BSPACE; return KC_BACKSPACE;
} }
return KC_BSLASH; return KC_BACKSLASH;
case KC_BSPACE: case KC_BACKSPACE:
if (keymap_config.swap_backslash_backspace) { if (keymap_config.swap_backslash_backspace) {
return KC_BSLASH; return KC_BACKSLASH;
} }
return KC_BSPACE; return KC_BACKSPACE;
default: default:
return keycode; return keycode;
} }

53
quantum/keycode_legacy.h Normal file
View file

@ -0,0 +1,53 @@
#pragma once
// clang-format off
// These keycode names have been deprecated
#define KC_BSPACE KC_BACKSPACE
#define KC_LBRACKET KC_LEFT_BRACKET
#define KC_RBRACKET KC_RIGHT_BRACKET
#define KC_BSLASH KC_BACKSLASH
#define KC_SCOLON KC_SEMICOLON
#define KC_CAPSLOCK KC_CAPS_LOCK
#define KC_PSCREEN KC_PRINT_SCREEN
#define KC_SCROLLLOCK KC_SCROLL_LOCK
#define KC_PGDOWN KC_PAGE_DOWN
#define KC_NUMLOCK KC_NUM_LOCK
#define KC_NONUS_BSLASH KC_NONUS_BACKSLASH
#define KC_POWER KC_KB_POWER
#define KC__MUTE KC_KB_MUTE
#define KC__VOLUP KC_KB_VOLUME_UP
#define KC__VOLDOWN KC_KB_VOLUME_DOWN
#define KC_LOCKING_CAPS KC_LOCKING_CAPS_LOCK
#define KC_LOCKING_NUM KC_LOCKING_NUM_LOCK
#define KC_LOCKING_SCROLL KC_LOCKING_SCROLL_LOCK
#define KC_LANG1 KC_LANGUAGE_1
#define KC_LANG2 KC_LANGUAGE_2
#define KC_LANG3 KC_LANGUAGE_3
#define KC_LANG4 KC_LANGUAGE_4
#define KC_LANG5 KC_LANGUAGE_5
#define KC_LANG6 KC_LANGUAGE_6
#define KC_LANG7 KC_LANGUAGE_7
#define KC_LANG8 KC_LANGUAGE_8
#define KC_LANG9 KC_LANGUAGE_9
#define KC_ALT_ERASE KC_ALTERNATE_ERASE
#define KC_SYSREQ KC_SYSTEM_REQUEST
#define KC_LCTRL KC_LEFT_CTRL
#define KC_LSHIFT KC_LEFT_SHIFT
#define KC_RCTRL KC_RIGHT_CTRL
#define KC_RSHIFT KC_RIGHT_SHIFT
#define KC_ZKHK KC_GRAVE
#define KC_RO KC_INTERNATIONAL_1
#define KC_KANA KC_INTERNATIONAL_2
#define KC_JYEN KC_INTERNATIONAL_3
#define KC_HENK KC_INTERNATIONAL_4
#define KC_MHEN KC_INTERNATIONAL_5
#define KC_HAEN KC_LANGUAGE_1
#define KC_HANJ KC_LANGUAGE_2
#define KC_CLCK KC_CAPS_LOCK
#define KC_SLCK KC_SCROLL_LOCK
#define KC_NLCK KC_NUM_LOCK

View file

@ -56,7 +56,7 @@ action_t action_for_keycode(uint16_t keycode) {
switch (keycode) { switch (keycode) {
case KC_A ... KC_EXSEL: case KC_A ... KC_EXSEL:
case KC_LCTRL ... KC_RGUI: case KC_LEFT_CTRL ... KC_RIGHT_GUI:
action.code = ACTION_KEY(keycode); action.code = ACTION_KEY(keycode);
break; break;
#ifdef EXTRAKEY_ENABLE #ifdef EXTRAKEY_ENABLE
@ -72,7 +72,7 @@ action_t action_for_keycode(uint16_t keycode) {
action.code = ACTION_MOUSEKEY(keycode); action.code = ACTION_MOUSEKEY(keycode);
break; break;
#endif #endif
case KC_TRNS: case KC_TRANSPARENT:
action.code = ACTION_TRANSPARENT; action.code = ACTION_TRANSPARENT;
break; break;
case QK_MODS ... QK_MODS_MAX:; case QK_MODS ... QK_MODS_MAX:;

View file

@ -85,8 +85,8 @@
#define KR_DOT KC_DOT // . #define KR_DOT KC_DOT // .
#define KR_SLSH KC_SLSH // / #define KR_SLSH KC_SLSH // /
// Row 5 // Row 5
#define KR_HANJ KC_LANG2 // Hanja (한자) #define KR_HANJ KC_LNG2 // Hanja (한자)
#define KR_HAEN KC_LANG1 // Han ↔ Yeong (한 ↔ 영) #define KR_HAEN KC_LNG1 // Han ↔ Yeong (한 ↔ 영)
/* Shifted symbols /* Shifted symbols
* *

View file

@ -67,7 +67,7 @@ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record)
register_code(autoshift_lastkey); register_code(autoshift_lastkey);
} else { } else {
// Simulate pressing the shift key. // Simulate pressing the shift key.
add_weak_mods(MOD_BIT(KC_LSFT)); add_weak_mods(MOD_BIT(KC_LEFT_SHIFT));
register_code(autoshift_lastkey); register_code(autoshift_lastkey);
} }
return false; return false;
@ -108,7 +108,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) {
autoshift_flags.lastshifted = false; autoshift_flags.lastshifted = false;
} else { } else {
// Simulate pressing the shift key. // Simulate pressing the shift key.
add_weak_mods(MOD_BIT(KC_LSFT)); add_weak_mods(MOD_BIT(KC_LEFT_SHIFT));
register_code(autoshift_lastkey); register_code(autoshift_lastkey);
autoshift_flags.lastshifted = true; autoshift_flags.lastshifted = true;
# if defined(AUTO_SHIFT_REPEAT) && !defined(AUTO_SHIFT_NO_AUTO_REPEAT) # if defined(AUTO_SHIFT_REPEAT) && !defined(AUTO_SHIFT_NO_AUTO_REPEAT)
@ -123,7 +123,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) {
wait_ms(TAP_CODE_DELAY); wait_ms(TAP_CODE_DELAY);
# endif # endif
unregister_code(autoshift_lastkey); unregister_code(autoshift_lastkey);
del_weak_mods(MOD_BIT(KC_LSFT)); del_weak_mods(MOD_BIT(KC_LEFT_SHIFT));
} else { } else {
// Release after keyrepeat. // Release after keyrepeat.
unregister_code(keycode); unregister_code(keycode);
@ -131,7 +131,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) {
// This will only fire when the key was the last auto-shiftable // This will only fire when the key was the last auto-shiftable
// pressed. That prevents aaaaBBBB then releasing a from unshifting // pressed. That prevents aaaaBBBB then releasing a from unshifting
// later Bs (if B wasn't auto-shiftable). // later Bs (if B wasn't auto-shiftable).
del_weak_mods(MOD_BIT(KC_LSFT)); del_weak_mods(MOD_BIT(KC_LEFT_SHIFT));
} }
} }
send_keyboard_report(); // del_weak_mods doesn't send one. send_keyboard_report(); // del_weak_mods doesn't send one.
@ -157,14 +157,14 @@ void autoshift_matrix_scan(void) {
void autoshift_toggle(void) { void autoshift_toggle(void) {
autoshift_flags.enabled = !autoshift_flags.enabled; autoshift_flags.enabled = !autoshift_flags.enabled;
del_weak_mods(MOD_BIT(KC_LSFT)); del_weak_mods(MOD_BIT(KC_LEFT_SHIFT));
} }
void autoshift_enable(void) { autoshift_flags.enabled = true; } void autoshift_enable(void) { autoshift_flags.enabled = true; }
void autoshift_disable(void) { void autoshift_disable(void) {
autoshift_flags.enabled = false; autoshift_flags.enabled = false;
del_weak_mods(MOD_BIT(KC_LSFT)); del_weak_mods(MOD_BIT(KC_LEFT_SHIFT));
} }
# ifndef AUTO_SHIFT_NO_SETUP # ifndef AUTO_SHIFT_NO_SETUP
@ -195,7 +195,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
autoshift_end(KC_NO, now, false); autoshift_end(KC_NO, now, false);
} }
// For pressing another key while keyrepeating shifted autoshift. // For pressing another key while keyrepeating shifted autoshift.
del_weak_mods(MOD_BIT(KC_LSFT)); del_weak_mods(MOD_BIT(KC_LEFT_SHIFT));
switch (keycode) { switch (keycode) {
case KC_ASTG: case KC_ASTG:
@ -244,7 +244,7 @@ __attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *r
# ifndef NO_AUTO_SHIFT_SPECIAL # ifndef NO_AUTO_SHIFT_SPECIAL
case KC_TAB: case KC_TAB:
case KC_MINUS ... KC_SLASH: case KC_MINUS ... KC_SLASH:
case KC_NONUS_BSLASH: case KC_NONUS_BACKSLASH:
# endif # endif
return true; return true;
} }

View file

@ -31,7 +31,7 @@ __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
if (record->tap.count == 0) return false; if (record->tap.count == 0) return false;
break; break;
case KC_LCTRL ... KC_RGUI: case KC_LEFT_CTRL ... KC_RIGHT_GUI:
case QK_MOMENTARY ... QK_MOMENTARY_MAX: case QK_MOMENTARY ... QK_MOMENTARY_MAX:
case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: case QK_LAYER_MOD ... QK_LAYER_MOD_MAX:
#endif #endif
@ -44,34 +44,34 @@ __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t
#ifdef NO_HAPTIC_PUNCTUATION #ifdef NO_HAPTIC_PUNCTUATION
case KC_ENTER: case KC_ENTER:
case KC_ESCAPE: case KC_ESCAPE:
case KC_BSPACE: case KC_BACKSPACE:
case KC_SPACE: case KC_SPACE:
case KC_MINUS: case KC_MINUS:
case KC_EQUAL: case KC_EQUAL:
case KC_LBRACKET: case KC_LEFT_BRACKET:
case KC_RBRACKET: case KC_RIGHT_BRACKET:
case KC_BSLASH: case KC_BACKSLASH:
case KC_NONUS_HASH: case KC_NONUS_HASH:
case KC_SCOLON: case KC_SEMICOLON:
case KC_QUOTE: case KC_QUOTE:
case KC_GRAVE: case KC_GRAVE:
case KC_COMMA: case KC_COMMA:
case KC_SLASH: case KC_SLASH:
case KC_DOT: case KC_DOT:
case KC_NONUS_BSLASH: case KC_NONUS_BACKSLASH:
#endif #endif
#ifdef NO_HAPTIC_LOCKKEYS #ifdef NO_HAPTIC_LOCKKEYS
case KC_CAPSLOCK: case KC_CAPS_LOCK:
case KC_SCROLLLOCK: case KC_SCROLL_LOCK:
case KC_NUMLOCK: case KC_NUM_LOCK:
#endif #endif
#ifdef NO_HAPTIC_NAV #ifdef NO_HAPTIC_NAV
case KC_PSCREEN: case KC_PRINT_SCREEN:
case KC_PAUSE: case KC_PAUSE:
case KC_INSERT: case KC_INSERT:
case KC_DELETE: case KC_DELETE:
case KC_PGDOWN: case KC_PAGE_DOWN:
case KC_PGUP: case KC_PAGE_UP:
case KC_LEFT: case KC_LEFT:
case KC_UP: case KC_UP:
case KC_RIGHT: case KC_RIGHT:

View file

@ -146,7 +146,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
if (music_activated || midi_activated) { if (music_activated || midi_activated) {
if (record->event.pressed) { if (record->event.pressed) {
if (keycode == KC_LCTL) { // Start recording if (keycode == KC_LEFT_CTRL) { // Start recording
music_all_notes_off(); music_all_notes_off();
music_sequence_recording = true; music_sequence_recording = true;
music_sequence_recorded = false; music_sequence_recorded = false;
@ -155,7 +155,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
return false; return false;
} }
if (keycode == KC_LALT) { // Stop recording/playing if (keycode == KC_LEFT_ALT) { // Stop recording/playing
music_all_notes_off(); music_all_notes_off();
if (music_sequence_recording) { // was recording if (music_sequence_recording) { // was recording
music_sequence_recorded = true; music_sequence_recorded = true;
@ -165,7 +165,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
return false; return false;
} }
if (keycode == KC_LGUI && music_sequence_recorded) { // Start playing if (keycode == KC_LEFT_GUI && music_sequence_recorded) { // Start playing
music_all_notes_off(); music_all_notes_off();
music_sequence_recording = false; music_sequence_recording = false;
music_sequence_playing = true; music_sequence_playing = true;

View file

@ -31,7 +31,7 @@ uint8_t shifted_numbers[10] = {0x21, 0x40, 0x23, 0x24, 0x25, 0x5E, 0x26, 0x2A, 0
// uint8_t keycode_to_ascii[0xFF][2]; // uint8_t keycode_to_ascii[0xFF][2];
// keycode_to_ascii[KC_MINS] = {0x2D, 0x5F}; // keycode_to_ascii[KC_MINUS] = {0x2D, 0x5F};
void print_char(char c) { void print_char(char c) {
USB_Disable(); USB_Disable();
@ -90,8 +90,8 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
case KC_PIPE: case KC_PIPE:
case KC_TILD: case KC_TILD:
keycode &= 0xFF; keycode &= 0xFF;
case KC_LSFT: case KC_LEFT_SHIFT:
case KC_RSFT: case KC_RIGHT_SHIFT:
if (record->event.pressed) { if (record->event.pressed) {
character_shift++; character_shift++;
} else { } else {
@ -107,13 +107,13 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
print_box_string("This is a line of text!"); print_box_string("This is a line of text!");
} }
return false; return false;
case KC_ESC: case KC_ESCAPE:
if (record->event.pressed) { if (record->event.pressed) {
print_char(0x1B); print_char(0x1B);
} }
return false; return false;
break; break;
case KC_SPC: case KC_SPACE:
if (record->event.pressed) { if (record->event.pressed) {
print_char(0x20); print_char(0x20);
} }
@ -139,7 +139,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_ENT: case KC_ENTER:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x0C); print_char(0x0C);
@ -149,7 +149,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_BSPC: case KC_BACKSPACE:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x18); print_char(0x18);
@ -169,7 +169,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_COMM: case KC_COMMA:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x3C); print_char(0x3C);
@ -179,7 +179,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_SLSH: case KC_SLASH:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x3F); print_char(0x3F);
@ -189,7 +189,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_QUOT: case KC_QUOTE:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x22); print_char(0x22);
@ -199,7 +199,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_GRV: case KC_GRAVE:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7E); print_char(0x7E);
@ -209,7 +209,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_MINS: case KC_MINUS:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x5F); print_char(0x5F);
@ -219,7 +219,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_EQL: case KC_EQUAL:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x2B); print_char(0x2B);
@ -229,7 +229,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_LBRC: case KC_LEFT_BRACKET:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7B); print_char(0x7B);
@ -239,7 +239,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_RBRC: case KC_RIGHT_BRACKET:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7D); print_char(0x7D);
@ -249,7 +249,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_BSLS: case KC_BACKSLASH:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7C); print_char(0x7C);

View file

@ -45,7 +45,7 @@ uint8_t shifted_numbers[10] = {0x21, 0x40, 0x23, 0x24, 0x25, 0x5E, 0x26, 0x2A, 0
// uint8_t keycode_to_ascii[0xFF][2]; // uint8_t keycode_to_ascii[0xFF][2];
// keycode_to_ascii[KC_MINS] = {0x2D, 0x5F}; // keycode_to_ascii[KC_MINUS] = {0x2D, 0x5F};
void print_char(char c) { void print_char(char c) {
uint8_t b = 8; uint8_t b = 8;
@ -84,8 +84,8 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
case KC_PIPE: case KC_PIPE:
case KC_TILD: case KC_TILD:
keycode &= 0xFF; keycode &= 0xFF;
case KC_LSFT: case KC_LEFT_SHIFT:
case KC_RSFT: case KC_RIGHT_SHIFT:
if (record->event.pressed) { if (record->event.pressed) {
character_shift++; character_shift++;
} else { } else {
@ -101,13 +101,13 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
print_string("This is a line of text!\n\n\n"); print_string("This is a line of text!\n\n\n");
} }
return false; return false;
case KC_ESC: case KC_ESCAPE:
if (record->event.pressed) { if (record->event.pressed) {
print_char(0x1B); print_char(0x1B);
} }
return false; return false;
break; break;
case KC_SPC: case KC_SPACE:
if (record->event.pressed) { if (record->event.pressed) {
print_char(0x20); print_char(0x20);
} }
@ -133,7 +133,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_ENT: case KC_ENTER:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x0C); print_char(0x0C);
@ -143,7 +143,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_BSPC: case KC_BACKSPACE:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x18); print_char(0x18);
@ -163,7 +163,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_COMM: case KC_COMMA:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x3C); print_char(0x3C);
@ -173,7 +173,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_SLSH: case KC_SLASH:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x3F); print_char(0x3F);
@ -183,7 +183,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_QUOT: case KC_QUOTE:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x22); print_char(0x22);
@ -193,7 +193,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_GRV: case KC_GRAVE:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7E); print_char(0x7E);
@ -203,7 +203,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_MINS: case KC_MINUS:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x5F); print_char(0x5F);
@ -213,7 +213,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_EQL: case KC_EQUAL:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x2B); print_char(0x2B);
@ -223,7 +223,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_LBRC: case KC_LEFT_BRACKET:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7B); print_char(0x7B);
@ -233,7 +233,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_RBRC: case KC_RIGHT_BRACKET:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7D); print_char(0x7D);
@ -243,7 +243,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case KC_BSLS: case KC_BACKSLASH:
if (record->event.pressed) { if (record->event.pressed) {
if (character_shift) { if (character_shift) {
print_char(0x7C); print_char(0x7C);

View file

@ -27,53 +27,53 @@
// Shift / Enter setup // Shift / Enter setup
#ifndef SFTENT_KEY #ifndef SFTENT_KEY
# define SFTENT_KEY KC_ENT # define SFTENT_KEY KC_ENTER
#endif #endif
#ifdef DISABLE_SPACE_CADET_MODIFIER #ifdef DISABLE_SPACE_CADET_MODIFIER
# ifndef LSPO_MOD # ifndef LSPO_MOD
# define LSPO_MOD KC_TRNS # define LSPO_MOD KC_TRANSPARENT
# endif # endif
# ifndef RSPC_MOD # ifndef RSPC_MOD
# define RSPC_MOD KC_TRNS # define RSPC_MOD KC_TRANSPARENT
# endif # endif
#else #else
# ifndef LSPO_MOD # ifndef LSPO_MOD
# define LSPO_MOD KC_LSFT # define LSPO_MOD KC_LEFT_SHIFT
# endif # endif
# ifndef RSPC_MOD # ifndef RSPC_MOD
# define RSPC_MOD KC_RSFT # define RSPC_MOD KC_RIGHT_SHIFT
# endif # endif
#endif #endif
// ********************************************************** // **********************************************************
// Shift / paren setup // Shift / paren setup
#ifndef LSPO_KEYS #ifndef LSPO_KEYS
# define LSPO_KEYS KC_LSFT, LSPO_MOD, LSPO_KEY # define LSPO_KEYS KC_LEFT_SHIFT, LSPO_MOD, LSPO_KEY
#endif #endif
#ifndef RSPC_KEYS #ifndef RSPC_KEYS
# define RSPC_KEYS KC_RSFT, RSPC_MOD, RSPC_KEY # define RSPC_KEYS KC_RIGHT_SHIFT, RSPC_MOD, RSPC_KEY
#endif #endif
// Control / paren setup // Control / paren setup
#ifndef LCPO_KEYS #ifndef LCPO_KEYS
# define LCPO_KEYS KC_LCTL, KC_LSFT, KC_9 # define LCPO_KEYS KC_LEFT_CTRL, KC_LEFT_SHIFT, KC_9
#endif #endif
#ifndef RCPC_KEYS #ifndef RCPC_KEYS
# define RCPC_KEYS KC_RCTL, KC_RSFT, KC_0 # define RCPC_KEYS KC_RIGHT_CTRL, KC_RIGHT_SHIFT, KC_0
#endif #endif
// Alt / paren setup // Alt / paren setup
#ifndef LAPO_KEYS #ifndef LAPO_KEYS
# define LAPO_KEYS KC_LALT, KC_LSFT, KC_9 # define LAPO_KEYS KC_LEFT_ALT, KC_LEFT_SHIFT, KC_9
#endif #endif
#ifndef RAPC_KEYS #ifndef RAPC_KEYS
# define RAPC_KEYS KC_RALT, KC_RSFT, KC_0 # define RAPC_KEYS KC_RIGHT_ALT, KC_RIGHT_SHIFT, KC_0
#endif #endif
// Shift / Enter setup // Shift / Enter setup
#ifndef SFTENT_KEYS #ifndef SFTENT_KEYS
# define SFTENT_KEYS KC_RSFT, KC_TRNS, SFTENT_KEY # define SFTENT_KEYS KC_RIGHT_SHIFT, KC_TRANSPARENT, SFTENT_KEY
#endif #endif
static uint8_t sc_last = 0; static uint8_t sc_last = 0;

View file

@ -257,12 +257,12 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
process_terminal_command(); process_terminal_command();
return false; return false;
break; break;
case KC_ESC: case KC_ESCAPE:
SEND_STRING("\n"); SEND_STRING("\n");
enable_terminal(); enable_terminal();
return false; return false;
break; break;
case KC_BSPC: case KC_BACKSPACE:
str_len = strlen(buffer); str_len = strlen(buffer);
if (str_len > 0) { if (str_len > 0) {
buffer[str_len - 1] = 0; buffer[str_len - 1] = 0;
@ -284,7 +284,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
str_len = strlen(buffer); str_len = strlen(buffer);
for (int i = 0; i < str_len; ++i) { for (int i = 0; i < str_len; ++i) {
send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already
// process_terminal(KC_BSPC,record); // process_terminal(KC_BACKSPACE,record);
} }
strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 80); strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 80);
@ -299,7 +299,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
str_len = strlen(buffer); str_len = strlen(buffer);
for (int i = 0; i < str_len; ++i) { for (int i = 0; i < str_len; ++i) {
send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already
// process_terminal(KC_BSPC,record); // process_terminal(KC_BACKSPACE,record);
} }
strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 79); strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 79);
@ -311,7 +311,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
default: default:
if (keycode <= 58) { if (keycode <= 58) {
char_to_add = 0; char_to_add = 0;
if (get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) { if (get_mods() & (MOD_BIT(KC_LEFT_SHIFT) | MOD_BIT(KC_RIGHT_SHIFT))) {
char_to_add = shifted_keycode_to_ascii_lut[keycode]; char_to_add = shifted_keycode_to_ascii_lut[keycode];
} else if (get_mods() == 0) { } else if (get_mods() == 0) {
char_to_add = keycode_to_ascii_lut[keycode]; char_to_add = keycode_to_ascii_lut[keycode];

View file

@ -46,7 +46,7 @@ static bool is_uni_seq(char *seq) {
return false; return false;
} }
} }
return qk_ucis_state.codes[i] == KC_ENT || qk_ucis_state.codes[i] == KC_SPC; return qk_ucis_state.codes[i] == KC_ENTER || qk_ucis_state.codes[i] == KC_SPACE;
} }
__attribute__((weak)) void qk_ucis_symbol_fallback(void) { __attribute__((weak)) void qk_ucis_symbol_fallback(void) {
@ -72,7 +72,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
bool special = keycode == KC_SPC || keycode == KC_ENT || keycode == KC_ESC || keycode == KC_BSPC; bool special = keycode == KC_SPACE || keycode == KC_ENTER || keycode == KC_ESCAPE || keycode == KC_BACKSPACE;
if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) {
return false; return false;
} }
@ -81,7 +81,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) {
qk_ucis_state.count++; qk_ucis_state.count++;
switch (keycode) { switch (keycode) {
case KC_BSPC: case KC_BACKSPACE:
if (qk_ucis_state.count >= 2) { if (qk_ucis_state.count >= 2) {
qk_ucis_state.count -= 2; qk_ucis_state.count -= 2;
return true; return true;
@ -90,16 +90,16 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) {
return false; return false;
} }
case KC_SPC: case KC_SPACE:
case KC_ENT: case KC_ENTER:
case KC_ESC: case KC_ESCAPE:
for (uint8_t i = 0; i < qk_ucis_state.count; i++) { for (uint8_t i = 0; i < qk_ucis_state.count; i++) {
register_code(KC_BSPC); register_code(KC_BACKSPACE);
unregister_code(KC_BSPC); unregister_code(KC_BACKSPACE);
wait_ms(UNICODE_TYPE_DELAY); wait_ms(UNICODE_TYPE_DELAY);
} }
if (keycode == KC_ESC) { if (keycode == KC_ESCAPE) {
qk_ucis_state.in_progress = false; qk_ucis_state.in_progress = false;
qk_ucis_cancel(); qk_ucis_cancel();
return false; return false;

View file

@ -87,7 +87,7 @@ __attribute__((weak)) void unicode_input_start(void) {
// UNICODE_KEY_LNX (which is usually Ctrl-Shift-U) might not work // UNICODE_KEY_LNX (which is usually Ctrl-Shift-U) might not work
// correctly in the shifted case. // correctly in the shifted case.
if (unicode_config.input_mode == UC_LNX && unicode_saved_caps_lock) { if (unicode_config.input_mode == UC_LNX && unicode_saved_caps_lock) {
tap_code(KC_CAPSLOCK); tap_code(KC_CAPS_LOCK);
} }
unicode_saved_mods = get_mods(); // Save current mods unicode_saved_mods = get_mods(); // Save current mods
@ -103,9 +103,9 @@ __attribute__((weak)) void unicode_input_start(void) {
case UC_WIN: case UC_WIN:
// For increased reliability, use numpad keys for inputting digits // For increased reliability, use numpad keys for inputting digits
if (!unicode_saved_num_lock) { if (!unicode_saved_num_lock) {
tap_code(KC_NUMLOCK); tap_code(KC_NUM_LOCK);
} }
register_code(KC_LALT); register_code(KC_LEFT_ALT);
tap_code(KC_KP_PLUS); tap_code(KC_KP_PLUS);
break; break;
case UC_WINC: case UC_WINC:
@ -125,13 +125,13 @@ __attribute__((weak)) void unicode_input_finish(void) {
case UC_LNX: case UC_LNX:
tap_code(KC_SPACE); tap_code(KC_SPACE);
if (unicode_saved_caps_lock) { if (unicode_saved_caps_lock) {
tap_code(KC_CAPSLOCK); tap_code(KC_CAPS_LOCK);
} }
break; break;
case UC_WIN: case UC_WIN:
unregister_code(KC_LALT); unregister_code(KC_LEFT_ALT);
if (!unicode_saved_num_lock) { if (!unicode_saved_num_lock) {
tap_code(KC_NUMLOCK); tap_code(KC_NUM_LOCK);
} }
break; break;
case UC_WINC: case UC_WINC:
@ -150,16 +150,16 @@ __attribute__((weak)) void unicode_input_cancel(void) {
case UC_LNX: case UC_LNX:
tap_code(KC_ESCAPE); tap_code(KC_ESCAPE);
if (unicode_saved_caps_lock) { if (unicode_saved_caps_lock) {
tap_code(KC_CAPSLOCK); tap_code(KC_CAPS_LOCK);
} }
break; break;
case UC_WINC: case UC_WINC:
tap_code(KC_ESCAPE); tap_code(KC_ESCAPE);
break; break;
case UC_WIN: case UC_WIN:
unregister_code(KC_LALT); unregister_code(KC_LEFT_ALT);
if (!unicode_saved_num_lock) { if (!unicode_saved_num_lock) {
tap_code(KC_NUMLOCK); tap_code(KC_NUM_LOCK);
} }
break; break;
} }

View file

@ -24,13 +24,13 @@
// Keycodes used for starting Unicode input on different platforms // Keycodes used for starting Unicode input on different platforms
#ifndef UNICODE_KEY_MAC #ifndef UNICODE_KEY_MAC
# define UNICODE_KEY_MAC KC_LALT # define UNICODE_KEY_MAC KC_LEFT_ALT
#endif #endif
#ifndef UNICODE_KEY_LNX #ifndef UNICODE_KEY_LNX
# define UNICODE_KEY_LNX LCTL(LSFT(KC_U)) # define UNICODE_KEY_LNX LCTL(LSFT(KC_U))
#endif #endif
#ifndef UNICODE_KEY_WINC #ifndef UNICODE_KEY_WINC
# define UNICODE_KEY_WINC KC_RALT # define UNICODE_KEY_WINC KC_RIGHT_ALT
#endif #endif
// Comma-delimited, ordered list of input modes selected for use (e.g. in cycle) // Comma-delimited, ordered list of input modes selected for use (e.g. in cycle)

View file

@ -62,15 +62,15 @@ uint8_t extract_mod_bits(uint16_t code) {
uint8_t mods_to_send = 0; uint8_t mods_to_send = 0;
if (code & QK_RMODS_MIN) { // Right mod flag is set if (code & QK_RMODS_MIN) { // Right mod flag is set
if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RCTL); if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RIGHT_CTRL);
if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RSFT); if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RIGHT_SHIFT);
if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RALT); if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RIGHT_ALT);
if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RGUI); if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RIGHT_GUI);
} else { } else {
if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LCTL); if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LEFT_CTRL);
if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LSFT); if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LEFT_SHIFT);
if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LALT); if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LEFT_ALT);
if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LGUI); if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LEFT_GUI);
} }
return mods_to_send; return mods_to_send;

View file

@ -19,7 +19,7 @@
#include "sequencer.h" #include "sequencer.h"
// Fillers to make layering more clear // Fillers to make layering more clear
#define _______ KC_TRNS #define _______ KC_TRANSPARENT
#define XXXXXXX KC_NO #define XXXXXXX KC_NO
enum quantum_keycodes { enum quantum_keycodes {
@ -599,69 +599,67 @@ enum quantum_keycodes {
#define MOD_MEH 0x7 #define MOD_MEH 0x7
// US ANSI shifted keycode aliases // US ANSI shifted keycode aliases
#define KC_TILD LSFT(KC_GRV) // ~ #define KC_TILDE LSFT(KC_GRAVE) // ~
#define KC_TILDE KC_TILD #define KC_TILD KC_TILDE
#define KC_EXLM LSFT(KC_1) // ! #define KC_EXCLAIM LSFT(KC_1) // !
#define KC_EXCLAIM KC_EXLM #define KC_EXLM KC_EXCLAIM
#define KC_AT LSFT(KC_2) // @ #define KC_AT LSFT(KC_2) // @
#define KC_HASH LSFT(KC_3) // # #define KC_HASH LSFT(KC_3) // #
#define KC_DLR LSFT(KC_4) // $ #define KC_DOLLAR LSFT(KC_4) // $
#define KC_DOLLAR KC_DLR #define KC_DLR KC_DOLLAR
#define KC_PERC LSFT(KC_5) // % #define KC_PERCENT LSFT(KC_5) // %
#define KC_PERCENT KC_PERC #define KC_PERC KC_PERCENT
#define KC_CIRC LSFT(KC_6) // ^ #define KC_CIRCUMFLEX LSFT(KC_6) // ^
#define KC_CIRCUMFLEX KC_CIRC #define KC_CIRC KC_CIRCUMFLEX
#define KC_AMPR LSFT(KC_7) // & #define KC_AMPERSAND LSFT(KC_7) // &
#define KC_AMPERSAND KC_AMPR #define KC_AMPR KC_AMPERSAND
#define KC_ASTR LSFT(KC_8) // * #define KC_ASTERISK LSFT(KC_8) // *
#define KC_ASTERISK KC_ASTR #define KC_ASTR KC_ASTERISK
#define KC_LPRN LSFT(KC_9) // ( #define KC_LEFT_PAREN LSFT(KC_9) // (
#define KC_LEFT_PAREN KC_LPRN #define KC_LPRN KC_LEFT_PAREN
#define KC_RPRN LSFT(KC_0) // ) #define KC_RIGHT_PAREN LSFT(KC_0) // )
#define KC_RIGHT_PAREN KC_RPRN #define KC_RPRN KC_RIGHT_PAREN
#define KC_UNDS LSFT(KC_MINS) // _ #define KC_UNDERSCORE LSFT(KC_MINUS) // _
#define KC_UNDERSCORE KC_UNDS #define KC_UNDS KC_UNDERSCORE
#define KC_PLUS LSFT(KC_EQL) // + #define KC_PLUS LSFT(KC_EQUAL) // +
#define KC_LCBR LSFT(KC_LBRC) // { #define KC_LEFT_CURLY_BRACE LSFT(KC_LEFT_BRACKET) // {
#define KC_LEFT_CURLY_BRACE KC_LCBR #define KC_LCBR KC_LEFT_CURLY_BRACE
#define KC_RCBR LSFT(KC_RBRC) // } #define KC_RIGHT_CURLY_BRACE LSFT(KC_RIGHT_BRACKET) // }
#define KC_RIGHT_CURLY_BRACE KC_RCBR #define KC_RCBR KC_RIGHT_CURLY_BRACE
#define KC_LABK LSFT(KC_COMM) // < #define KC_LEFT_ANGLE_BRACKET LSFT(KC_COMMA) // <
#define KC_LEFT_ANGLE_BRACKET KC_LABK #define KC_LABK KC_LEFT_ANGLE_BRACKET
#define KC_LT KC_LEFT_ANGLE_BRACKET
#define KC_RABK LSFT(KC_DOT) // > #define KC_RIGHT_ANGLE_BRACKET LSFT(KC_DOT) // >
#define KC_RIGHT_ANGLE_BRACKET KC_RABK #define KC_RABK KC_RIGHT_ANGLE_BRACKET
#define KC_GT KC_RIGHT_ANGLE_BRACKET
#define KC_COLN LSFT(KC_SCLN) // : #define KC_COLON LSFT(KC_SEMICOLON) // :
#define KC_COLON KC_COLN #define KC_COLN KC_COLON
#define KC_PIPE LSFT(KC_BSLS) // | #define KC_PIPE LSFT(KC_BACKSLASH) // |
#define KC_LT LSFT(KC_COMM) // < #define KC_QUESTION LSFT(KC_SLASH) // ?
#define KC_QUES KC_QUESTION
#define KC_GT LSFT(KC_DOT) // > #define KC_DOUBLE_QUOTE LSFT(KC_QUOTE) // "
#define KC_DQUO KC_DOUBLE_QUOTE
#define KC_QUES LSFT(KC_SLSH) // ? #define KC_DQT KC_DOUBLE_QUOTE
#define KC_QUESTION KC_QUES
#define KC_DQT LSFT(KC_QUOT) // "
#define KC_DOUBLE_QUOTE KC_DQT
#define KC_DQUO KC_DQT
#define KC_DELT KC_DELETE // Del key (four letter code) #define KC_DELT KC_DELETE // Del key (four letter code)

View file

@ -5,362 +5,338 @@
#ifndef VIA_HAS_BROKEN_KEYCODES #ifndef VIA_HAS_BROKEN_KEYCODES
_Static_assert(KC_NO == 0, ""); // clang-format off
_Static_assert(KC_TRNS == 1, "");
_Static_assert(KC_A == 0x04, ""); _Static_assert(KC_NO == 0x0000, "");
_Static_assert(KC_B == 0x05, ""); _Static_assert(KC_TRANSPARENT == 0x0001, "");
_Static_assert(KC_C == 0x06, "");
_Static_assert(KC_D == 0x07, "");
_Static_assert(KC_E == 0x08, "");
_Static_assert(KC_F == 0x09, "");
_Static_assert(KC_G == 0x0A, "");
_Static_assert(KC_H == 0x0B, "");
_Static_assert(KC_I == 0x0C, "");
_Static_assert(KC_J == 0x0D, "");
_Static_assert(KC_K == 0x0E, "");
_Static_assert(KC_L == 0x0F, "");
_Static_assert(KC_M == 0x10, "");
_Static_assert(KC_N == 0x11, "");
_Static_assert(KC_O == 0x12, "");
_Static_assert(KC_P == 0x13, "");
_Static_assert(KC_Q == 0x14, "");
_Static_assert(KC_R == 0x15, "");
_Static_assert(KC_S == 0x16, "");
_Static_assert(KC_T == 0x17, "");
_Static_assert(KC_U == 0x18, "");
_Static_assert(KC_V == 0x19, "");
_Static_assert(KC_W == 0x1A, "");
_Static_assert(KC_X == 0x1B, "");
_Static_assert(KC_Y == 0x1C, "");
_Static_assert(KC_Z == 0x1D, "");
_Static_assert(KC_1 == 0x1E, "");
_Static_assert(KC_2 == 0x1F, "");
_Static_assert(KC_3 == 0x20, "");
_Static_assert(KC_4 == 0x21, "");
_Static_assert(KC_5 == 0x22, "");
_Static_assert(KC_6 == 0x23, "");
_Static_assert(KC_7 == 0x24, "");
_Static_assert(KC_8 == 0x25, "");
_Static_assert(KC_9 == 0x26, "");
_Static_assert(KC_0 == 0x27, "");
_Static_assert(KC_ENTER == 0x28, "");
_Static_assert(KC_ESCAPE == 0x29, "");
_Static_assert(KC_BSPACE == 0x2A, "");
_Static_assert(KC_TAB == 0x2B, "");
_Static_assert(KC_SPACE == 0x2C, "");
_Static_assert(KC_MINUS == 0x2D, "");
_Static_assert(KC_EQUAL == 0x2E, "");
_Static_assert(KC_LBRACKET == 0x2F, "");
_Static_assert(KC_RBRACKET == 0x30, "");
_Static_assert(KC_BSLASH == 0x31, "");
_Static_assert(KC_SCOLON == 0x33, "");
_Static_assert(KC_QUOTE == 0x34, "");
_Static_assert(KC_GRAVE == 0x35, "");
_Static_assert(KC_COMMA == 0x36, "");
_Static_assert(KC_DOT == 0x37, "");
_Static_assert(KC_SLASH == 0x38, "");
_Static_assert(KC_CAPSLOCK == 0x39, "");
_Static_assert(KC_F1 == 0x3A, "");
_Static_assert(KC_F2 == 0x3B, "");
_Static_assert(KC_F3 == 0x3C, "");
_Static_assert(KC_F4 == 0x3D, "");
_Static_assert(KC_F5 == 0x3E, "");
_Static_assert(KC_F6 == 0x3F, "");
_Static_assert(KC_F7 == 0x40, "");
_Static_assert(KC_F8 == 0x41, "");
_Static_assert(KC_F9 == 0x42, "");
_Static_assert(KC_F10 == 0x43, "");
_Static_assert(KC_F11 == 0x44, "");
_Static_assert(KC_F12 == 0x45, "");
_Static_assert(KC_PSCREEN == 0x46, "");
_Static_assert(KC_SCROLLLOCK == 0x47, "");
_Static_assert(KC_PAUSE == 0x48, "");
_Static_assert(KC_INSERT == 0x49, "");
_Static_assert(KC_HOME == 0x4A, "");
_Static_assert(KC_PGUP == 0x4B, "");
_Static_assert(KC_DELETE == 0x4C, "");
_Static_assert(KC_END == 0x4D, "");
_Static_assert(KC_PGDOWN == 0x4E, "");
_Static_assert(KC_RIGHT == 0x4F, "");
_Static_assert(KC_LEFT == 0x50, "");
_Static_assert(KC_DOWN == 0x51, "");
_Static_assert(KC_UP == 0x52, "");
_Static_assert(KC_NUMLOCK == 0x53, "");
_Static_assert(KC_KP_SLASH == 0x54, "");
_Static_assert(KC_KP_ASTERISK == 0x55, "");
_Static_assert(KC_KP_MINUS == 0x56, "");
_Static_assert(KC_KP_PLUS == 0x57, "");
_Static_assert(KC_KP_ENTER == 0x58, "");
_Static_assert(KC_KP_1 == 0x59, "");
_Static_assert(KC_KP_2 == 0x5A, "");
_Static_assert(KC_KP_3 == 0x5B, "");
_Static_assert(KC_KP_4 == 0x5C, "");
_Static_assert(KC_KP_5 == 0x5D, "");
_Static_assert(KC_KP_6 == 0x5E, "");
_Static_assert(KC_KP_7 == 0x5F, "");
_Static_assert(KC_KP_8 == 0x60, "");
_Static_assert(KC_KP_9 == 0x61, "");
_Static_assert(KC_KP_0 == 0x62, "");
_Static_assert(KC_KP_DOT == 0x63, "");
_Static_assert(KC_APPLICATION == 0x65, "");
_Static_assert(KC_KP_EQUAL == 0x67, "");
_Static_assert(KC_KP_COMMA == 0x85, "");
_Static_assert(KC_LCTRL == 0xE0, "");
_Static_assert(KC_LSHIFT == 0xE1, "");
_Static_assert(KC_LALT == 0xE2, "");
_Static_assert(KC_LGUI == 0xE3, "");
_Static_assert(KC_RCTRL == 0xE4, "");
_Static_assert(KC_RSHIFT == 0xE5, "");
_Static_assert(KC_RALT == 0xE6, "");
_Static_assert(KC_RGUI == 0xE7, "");
_Static_assert(KC_TILD == 0x235, ""); _Static_assert(KC_A == 0x0004, "");
_Static_assert(KC_EXLM == 0x21E, ""); _Static_assert(KC_B == 0x0005, "");
_Static_assert(KC_AT == 0x21F, ""); _Static_assert(KC_C == 0x0006, "");
_Static_assert(KC_HASH == 0x220, ""); _Static_assert(KC_D == 0x0007, "");
_Static_assert(KC_DLR == 0x221, ""); _Static_assert(KC_E == 0x0008, "");
_Static_assert(KC_PERC == 0x222, ""); _Static_assert(KC_F == 0x0009, "");
_Static_assert(KC_CIRC == 0x223, ""); _Static_assert(KC_G == 0x000A, "");
_Static_assert(KC_AMPR == 0x224, ""); _Static_assert(KC_H == 0x000B, "");
_Static_assert(KC_ASTR == 0x225, ""); _Static_assert(KC_I == 0x000C, "");
_Static_assert(KC_LPRN == 0x226, ""); _Static_assert(KC_J == 0x000D, "");
_Static_assert(KC_RPRN == 0x227, ""); _Static_assert(KC_K == 0x000E, "");
_Static_assert(KC_UNDS == 0x22D, ""); _Static_assert(KC_L == 0x000F, "");
_Static_assert(KC_PLUS == 0x22E, ""); _Static_assert(KC_M == 0x0010, "");
_Static_assert(KC_LCBR == 0x22F, ""); _Static_assert(KC_N == 0x0011, "");
_Static_assert(KC_RCBR == 0x230, ""); _Static_assert(KC_O == 0x0012, "");
_Static_assert(KC_LT == 0x236, ""); _Static_assert(KC_P == 0x0013, "");
_Static_assert(KC_GT == 0x237, ""); _Static_assert(KC_Q == 0x0014, "");
_Static_assert(KC_COLN == 0x233, ""); _Static_assert(KC_R == 0x0015, "");
_Static_assert(KC_PIPE == 0x231, ""); _Static_assert(KC_S == 0x0016, "");
_Static_assert(KC_QUES == 0x238, ""); _Static_assert(KC_T == 0x0017, "");
_Static_assert(KC_DQUO == 0x234, ""); _Static_assert(KC_U == 0x0018, "");
_Static_assert(KC_V == 0x0019, "");
_Static_assert(KC_W == 0x001A, "");
_Static_assert(KC_X == 0x001B, "");
_Static_assert(KC_Y == 0x001C, "");
_Static_assert(KC_Z == 0x001D, "");
_Static_assert(KC_1 == 0x001E, "");
_Static_assert(KC_2 == 0x001F, "");
_Static_assert(KC_3 == 0x0020, "");
_Static_assert(KC_4 == 0x0021, "");
_Static_assert(KC_5 == 0x0022, "");
_Static_assert(KC_6 == 0x0023, "");
_Static_assert(KC_7 == 0x0024, "");
_Static_assert(KC_8 == 0x0025, "");
_Static_assert(KC_9 == 0x0026, "");
_Static_assert(KC_0 == 0x0027, "");
_Static_assert(KC_ENTER == 0x0028, "");
_Static_assert(KC_ESCAPE == 0x0029, "");
_Static_assert(KC_BACKSPACE == 0x002A, "");
_Static_assert(KC_TAB == 0x002B, "");
_Static_assert(KC_SPACE == 0x002C, "");
_Static_assert(KC_MINUS == 0x002D, "");
_Static_assert(KC_EQUAL == 0x002E, "");
_Static_assert(KC_LEFT_BRACKET == 0x002F, "");
_Static_assert(KC_RIGHT_BRACKET == 0x0030, "");
_Static_assert(KC_BACKSLASH == 0x0031, "");
_Static_assert(KC_NONUS_HASH == 0x0032, "");
_Static_assert(KC_SEMICOLON == 0x0033, "");
_Static_assert(KC_QUOTE == 0x0034, "");
_Static_assert(KC_GRAVE == 0x0035, "");
_Static_assert(KC_COMMA == 0x0036, "");
_Static_assert(KC_DOT == 0x0037, "");
_Static_assert(KC_SLASH == 0x0038, "");
_Static_assert(KC_CAPS_LOCK == 0x0039, "");
_Static_assert(KC_F1 == 0x003A, "");
_Static_assert(KC_F2 == 0x003B, "");
_Static_assert(KC_F3 == 0x003C, "");
_Static_assert(KC_F4 == 0x003D, "");
_Static_assert(KC_F5 == 0x003E, "");
_Static_assert(KC_F6 == 0x003F, "");
_Static_assert(KC_F7 == 0x0040, "");
_Static_assert(KC_F8 == 0x0041, "");
_Static_assert(KC_F9 == 0x0042, "");
_Static_assert(KC_F10 == 0x0043, "");
_Static_assert(KC_F11 == 0x0044, "");
_Static_assert(KC_F12 == 0x0045, "");
_Static_assert(KC_PRINT_SCREEN == 0x0046, "");
_Static_assert(KC_SCROLL_LOCK == 0x0047, "");
_Static_assert(KC_PAUSE == 0x0048, "");
_Static_assert(KC_INSERT == 0x0049, "");
_Static_assert(KC_HOME == 0x004A, "");
_Static_assert(KC_PAGE_UP == 0x004B, "");
_Static_assert(KC_DELETE == 0x004C, "");
_Static_assert(KC_END == 0x004D, "");
_Static_assert(KC_PAGE_DOWN == 0x004E, "");
_Static_assert(KC_RIGHT == 0x004F, "");
_Static_assert(KC_LEFT == 0x0050, "");
_Static_assert(KC_DOWN == 0x0051, "");
_Static_assert(KC_UP == 0x0052, "");
_Static_assert(KC_NUM_LOCK == 0x0053, "");
_Static_assert(KC_KP_SLASH == 0x0054, "");
_Static_assert(KC_KP_ASTERISK == 0x0055, "");
_Static_assert(KC_KP_MINUS == 0x0056, "");
_Static_assert(KC_KP_PLUS == 0x0057, "");
_Static_assert(KC_KP_ENTER == 0x0058, "");
_Static_assert(KC_KP_1 == 0x0059, "");
_Static_assert(KC_KP_2 == 0x005A, "");
_Static_assert(KC_KP_3 == 0x005B, "");
_Static_assert(KC_KP_4 == 0x005C, "");
_Static_assert(KC_KP_5 == 0x005D, "");
_Static_assert(KC_KP_6 == 0x005E, "");
_Static_assert(KC_KP_7 == 0x005F, "");
_Static_assert(KC_KP_8 == 0x0060, "");
_Static_assert(KC_KP_9 == 0x0061, "");
_Static_assert(KC_KP_0 == 0x0062, "");
_Static_assert(KC_KP_DOT == 0x0063, "");
_Static_assert(KC_NONUS_BACKSLASH == 0x0064, "");
_Static_assert(KC_APPLICATION == 0x0065, "");
_Static_assert(KC_KB_POWER == 0x0066, "");
_Static_assert(KC_KP_EQUAL == 0x0067, "");
_Static_assert(KC_F13 == 0x0068, "");
_Static_assert(KC_F14 == 0x0069, "");
_Static_assert(KC_F15 == 0x006A, "");
_Static_assert(KC_F16 == 0x006B, "");
_Static_assert(KC_F17 == 0x006C, "");
_Static_assert(KC_F18 == 0x006D, "");
_Static_assert(KC_F19 == 0x006E, "");
_Static_assert(KC_F20 == 0x006F, "");
_Static_assert(KC_F21 == 0x0070, "");
_Static_assert(KC_F22 == 0x0071, "");
_Static_assert(KC_F23 == 0x0072, "");
_Static_assert(KC_F24 == 0x0073, "");
_Static_assert(KC_EXECUTE == 0x0074, "");
_Static_assert(KC_HELP == 0x0075, "");
_Static_assert(KC_MENU == 0x0076, "");
_Static_assert(KC_SELECT == 0x0077, "");
_Static_assert(KC_STOP == 0x0078, "");
_Static_assert(KC_AGAIN == 0x0079, "");
_Static_assert(KC_UNDO == 0x007A, "");
_Static_assert(KC_CUT == 0x007B, "");
_Static_assert(KC_COPY == 0x007C, "");
_Static_assert(KC_PASTE == 0x007D, "");
_Static_assert(KC_FIND == 0x007E, "");
_Static_assert(KC_NONUS_HASH == 0x32, ""); _Static_assert(KC_LOCKING_CAPS_LOCK == 0x0082, "");
_Static_assert(KC_NONUS_BSLASH == 0x64, ""); _Static_assert(KC_LOCKING_NUM_LOCK == 0x0083, "");
_Static_assert(KC_RO == 0x87, ""); _Static_assert(KC_LOCKING_SCROLL_LOCK == 0x0084, "");
_Static_assert(KC_KANA == 0x88, ""); _Static_assert(KC_KP_COMMA == 0x0085, "");
_Static_assert(KC_JYEN == 0x89, ""); _Static_assert(KC_KP_EQUAL_AS400 == 0x0086, "");
_Static_assert(KC_HENK == 0x8A, ""); _Static_assert(KC_INTERNATIONAL_1 == 0x0087, "");
_Static_assert(KC_MHEN == 0x8B, ""); _Static_assert(KC_INTERNATIONAL_2 == 0x0088, "");
_Static_assert(KC_LANG1 == 0x90, ""); _Static_assert(KC_INTERNATIONAL_3 == 0x0089, "");
_Static_assert(KC_LANG2 == 0x91, ""); _Static_assert(KC_INTERNATIONAL_4 == 0x008A, "");
_Static_assert(KC_INTERNATIONAL_5 == 0x008B, "");
_Static_assert(KC_INTERNATIONAL_6 == 0x008C, "");
_Static_assert(KC_INTERNATIONAL_7 == 0x008D, "");
_Static_assert(KC_INTERNATIONAL_8 == 0x008E, "");
_Static_assert(KC_INTERNATIONAL_9 == 0x008F, "");
_Static_assert(KC_LANGUAGE_1 == 0x0090, "");
_Static_assert(KC_LANGUAGE_2 == 0x0091, "");
_Static_assert(KC_LANGUAGE_3 == 0x0092, "");
_Static_assert(KC_LANGUAGE_4 == 0x0093, "");
_Static_assert(KC_LANGUAGE_5 == 0x0094, "");
_Static_assert(KC_LANGUAGE_6 == 0x0095, "");
_Static_assert(KC_LANGUAGE_7 == 0x0096, "");
_Static_assert(KC_LANGUAGE_8 == 0x0097, "");
_Static_assert(KC_LANGUAGE_9 == 0x0098, "");
_Static_assert(KC_ALTERNATE_ERASE == 0x0099, "");
_Static_assert(KC_SYSTEM_REQUEST == 0x009A, "");
_Static_assert(KC_CANCEL == 0x009B, "");
_Static_assert(KC_CLEAR == 0x009C, "");
_Static_assert(KC_PRIOR == 0x009D, "");
_Static_assert(KC_GESC == 0x5C16, ""); _Static_assert(KC_OUT == 0x00A0, "");
_Static_assert(KC_LSPO == 0x5CD7, ""); _Static_assert(KC_OPER == 0x00A1, "");
_Static_assert(KC_RSPC == 0x5CD8, ""); _Static_assert(KC_CLEAR_AGAIN == 0x00A2, "");
_Static_assert(KC_LCPO == 0x5CF3, ""); _Static_assert(KC_CRSEL == 0x00A3, "");
_Static_assert(KC_RCPC == 0x5CF4, ""); _Static_assert(KC_EXSEL == 0x00A4, "");
_Static_assert(KC_LAPO == 0x5CF5, "");
_Static_assert(KC_RAPC == 0x5CF6, "");
_Static_assert(KC_SFTENT == 0x5CD9, "");
_Static_assert(BL_TOGG == 23743, ""); _Static_assert(KC_PWR == 0x00A5, "");
_Static_assert(BL_STEP == 23744, ""); _Static_assert(KC_SLEP == 0x00A6, "");
_Static_assert(BL_BRTG == 23745, ""); _Static_assert(KC_WAKE == 0x00A7, "");
_Static_assert(BL_ON == 23739, ""); _Static_assert(KC_MUTE == 0x00A8, "");
_Static_assert(BL_OFF == 23740, ""); _Static_assert(KC_VOLU == 0x00A9, "");
_Static_assert(BL_INC == 23742, ""); _Static_assert(KC_VOLD == 0x00AA, "");
_Static_assert(BL_DEC == 23741, ""); _Static_assert(KC_MNXT == 0x00AB, "");
_Static_assert(RGB_TOG == 23746, ""); _Static_assert(KC_MPRV == 0x00AC, "");
_Static_assert(RGB_MOD == 23747, ""); _Static_assert(KC_MSTP == 0x00AD, "");
_Static_assert(RGB_RMOD == 23748, ""); _Static_assert(KC_MPLY == 0x00AE, "");
_Static_assert(RGB_HUI == 23749, ""); _Static_assert(KC_MSEL == 0x00AF, "");
_Static_assert(RGB_HUD == 23750, ""); _Static_assert(KC_EJCT == 0x00B0, "");
_Static_assert(RGB_SAI == 23751, ""); _Static_assert(KC_MAIL == 0x00B1, "");
_Static_assert(RGB_SAD == 23752, ""); _Static_assert(KC_CALC == 0x00B2, "");
_Static_assert(RGB_VAI == 23753, ""); _Static_assert(KC_MYCM == 0x00B3, "");
_Static_assert(RGB_VAD == 23754, ""); _Static_assert(KC_WSCH == 0x00B4, "");
_Static_assert(RGB_SPI == 23755, ""); _Static_assert(KC_WHOM == 0x00B5, "");
_Static_assert(RGB_SPD == 23756, ""); _Static_assert(KC_WBAK == 0x00B6, "");
_Static_assert(RGB_M_P == 23757, ""); _Static_assert(KC_WFWD == 0x00B7, "");
_Static_assert(RGB_M_B == 23758, ""); _Static_assert(KC_WSTP == 0x00B8, "");
_Static_assert(RGB_M_R == 23759, ""); _Static_assert(KC_WREF == 0x00B9, "");
_Static_assert(RGB_M_SW == 23760, ""); _Static_assert(KC_WFAV == 0x00BA, "");
_Static_assert(RGB_M_SN == 23761, ""); _Static_assert(KC_MFFD == 0x00BB, "");
_Static_assert(RGB_M_K == 23762, ""); _Static_assert(KC_MRWD == 0x00BC, "");
_Static_assert(RGB_M_X == 23763, ""); _Static_assert(KC_BRIU == 0x00BD, "");
_Static_assert(RGB_M_G == 23764, ""); _Static_assert(KC_BRID == 0x00BE, "");
_Static_assert(RGB_M_T == 23765, "");
_Static_assert(KC_F13 == 104, ""); _Static_assert(KC_LEFT_CTRL == 0x00E0, "");
_Static_assert(KC_F14 == 105, ""); _Static_assert(KC_LEFT_SHIFT == 0x00E1, "");
_Static_assert(KC_F15 == 106, ""); _Static_assert(KC_LEFT_ALT == 0x00E2, "");
_Static_assert(KC_F16 == 107, ""); _Static_assert(KC_LEFT_GUI == 0x00E3, "");
_Static_assert(KC_F17 == 108, ""); _Static_assert(KC_RIGHT_CTRL == 0x00E4, "");
_Static_assert(KC_F18 == 109, ""); _Static_assert(KC_RIGHT_SHIFT == 0x00E5, "");
_Static_assert(KC_F19 == 110, ""); _Static_assert(KC_RIGHT_ALT == 0x00E6, "");
_Static_assert(KC_F20 == 111, ""); _Static_assert(KC_RIGHT_GUI == 0x00E7, "");
_Static_assert(KC_F21 == 112, "");
_Static_assert(KC_F22 == 113, "");
_Static_assert(KC_F23 == 114, "");
_Static_assert(KC_F24 == 115, "");
_Static_assert(KC_PWR == 165, "");
_Static_assert(KC_SLEP == 166, "");
_Static_assert(KC_WAKE == 167, "");
_Static_assert(KC_EXEC == 116, "");
_Static_assert(KC_HELP == 117, "");
_Static_assert(KC_SLCT == 119, "");
_Static_assert(KC_STOP == 120, "");
_Static_assert(KC_AGIN == 121, "");
_Static_assert(KC_UNDO == 122, "");
_Static_assert(KC_CUT == 123, "");
_Static_assert(KC_COPY == 124, "");
_Static_assert(KC_PSTE == 125, "");
_Static_assert(KC_FIND == 126, "");
_Static_assert(KC_CALC == 178, "");
_Static_assert(KC_MAIL == 177, "");
_Static_assert(KC_MSEL == 175, "");
_Static_assert(KC_MYCM == 179, "");
_Static_assert(KC_WSCH == 180, "");
_Static_assert(KC_WHOM == 181, "");
_Static_assert(KC_WBAK == 182, "");
_Static_assert(KC_WFWD == 183, "");
_Static_assert(KC_WSTP == 184, "");
_Static_assert(KC_WREF == 185, "");
_Static_assert(KC_WFAV == 186, "");
_Static_assert(KC_BRIU == 189, "");
_Static_assert(KC_BRID == 190, "");
_Static_assert(KC_MPRV == 172, "");
_Static_assert(KC_MNXT == 171, "");
_Static_assert(KC_MUTE == 168, "");
_Static_assert(KC_VOLD == 170, "");
_Static_assert(KC_VOLU == 169, "");
_Static_assert(KC_MSTP == 173, "");
_Static_assert(KC_MPLY == 174, "");
_Static_assert(KC_MRWD == 188, "");
_Static_assert(KC_MFFD == 187, "");
_Static_assert(KC_EJCT == 176, "");
_Static_assert(KC_MS_U == 240, "");
_Static_assert(KC_MS_D == 241, "");
_Static_assert(KC_MS_L == 242, "");
_Static_assert(KC_MS_R == 243, "");
_Static_assert(KC_BTN1 == 244, "");
_Static_assert(KC_BTN2 == 245, "");
_Static_assert(KC_BTN3 == 246, "");
_Static_assert(KC_BTN4 == 247, "");
_Static_assert(KC_BTN5 == 248, "");
_Static_assert(KC_WH_U == 249, "");
_Static_assert(KC_WH_D == 250, "");
_Static_assert(KC_WH_L == 251, "");
_Static_assert(KC_WH_R == 252, "");
_Static_assert(KC_ACL0 == 253, "");
_Static_assert(KC_ACL1 == 254, "");
_Static_assert(KC_ACL2 == 255, "");
_Static_assert(KC_LCAP == 130, "");
_Static_assert(KC_LNUM == 131, "");
_Static_assert(KC_LSCR == 132, "");
_Static_assert(FN_MO13 == 0x5F10, ""); _Static_assert(KC_MS_U == 0x00F0, "");
_Static_assert(FN_MO23 == 0x5F11, ""); _Static_assert(KC_MS_D == 0x00F1, "");
_Static_assert(KC_MS_L == 0x00F2, "");
_Static_assert(KC_MS_R == 0x00F3, "");
_Static_assert(KC_BTN1 == 0x00F4, "");
_Static_assert(KC_BTN2 == 0x00F5, "");
_Static_assert(KC_BTN3 == 0x00F6, "");
_Static_assert(KC_BTN4 == 0x00F7, "");
_Static_assert(KC_BTN5 == 0x00F8, "");
_Static_assert(KC_WH_U == 0x00F9, "");
_Static_assert(KC_WH_D == 0x00FA, "");
_Static_assert(KC_WH_L == 0x00FB, "");
_Static_assert(KC_WH_R == 0x00FC, "");
_Static_assert(KC_ACL0 == 0x00FD, "");
_Static_assert(KC_ACL1 == 0x00FE, "");
_Static_assert(KC_ACL2 == 0x00FF, "");
_Static_assert(MACRO00 == 0x5F12, ""); _Static_assert(KC_EXLM == 0x021E, "");
_Static_assert(MACRO01 == 0x5F13, ""); _Static_assert(KC_AT == 0x021F, "");
_Static_assert(MACRO02 == 0x5F14, ""); _Static_assert(KC_HASH == 0x0220, "");
_Static_assert(MACRO03 == 0x5F15, ""); _Static_assert(KC_DLR == 0x0221, "");
_Static_assert(MACRO04 == 0x5F16, ""); _Static_assert(KC_PERC == 0x0222, "");
_Static_assert(MACRO05 == 0x5F17, ""); _Static_assert(KC_CIRC == 0x0223, "");
_Static_assert(MACRO06 == 0x5F18, ""); _Static_assert(KC_AMPR == 0x0224, "");
_Static_assert(MACRO07 == 0x5F19, ""); _Static_assert(KC_ASTR == 0x0225, "");
_Static_assert(MACRO08 == 0x5F1A, ""); _Static_assert(KC_LPRN == 0x0226, "");
_Static_assert(MACRO09 == 0x5F1B, ""); _Static_assert(KC_RPRN == 0x0227, "");
_Static_assert(MACRO10 == 0x5F1C, ""); _Static_assert(KC_UNDS == 0x022D, "");
_Static_assert(MACRO11 == 0x5F1D, ""); _Static_assert(KC_PLUS == 0x022E, "");
_Static_assert(MACRO12 == 0x5F1E, ""); _Static_assert(KC_LCBR == 0x022F, "");
_Static_assert(MACRO13 == 0x5F1F, ""); _Static_assert(KC_RCBR == 0x0230, "");
_Static_assert(MACRO14 == 0x5F20, ""); _Static_assert(KC_PIPE == 0x0231, "");
_Static_assert(MACRO15 == 0x5F21, ""); _Static_assert(KC_COLN == 0x0233, "");
_Static_assert(KC_DQUO == 0x0234, "");
_Static_assert(KC_TILD == 0x0235, "");
_Static_assert(KC_LT == 0x0236, "");
_Static_assert(KC_GT == 0x0237, "");
_Static_assert(KC_QUES == 0x0238, "");
_Static_assert(USER00 == 0x5F80, ""); _Static_assert(RESET == 0x5C00, "");
_Static_assert(USER01 == 0x5F81, ""); _Static_assert(DEBUG == 0x5C01, "");
_Static_assert(USER02 == 0x5F82, "");
_Static_assert(USER03 == 0x5F83, "");
_Static_assert(USER04 == 0x5F84, "");
_Static_assert(USER05 == 0x5F85, "");
_Static_assert(USER06 == 0x5F86, "");
_Static_assert(USER07 == 0x5F87, "");
_Static_assert(USER08 == 0x5F88, "");
_Static_assert(USER09 == 0x5F89, "");
_Static_assert(USER10 == 0x5F8A, "");
_Static_assert(USER11 == 0x5F8B, "");
_Static_assert(USER12 == 0x5F8C, "");
_Static_assert(USER13 == 0x5F8D, "");
_Static_assert(USER14 == 0x5F8E, "");
_Static_assert(USER15 == 0x5F8F, "");
_Static_assert(KC_POWER == 102, ""); _Static_assert(MAGIC_TOGGLE_NKRO == 0x5C14, "");
_Static_assert(KC_MENU == 118, "");
_Static_assert(KC_KP_EQUAL_AS400 == 134, ""); _Static_assert(KC_GESC == 0x5C16, "");
_Static_assert(KC_INT6 == 140, "");
_Static_assert(KC_INT7 == 141, ""); _Static_assert(AU_ON == 0x5C1D, "");
_Static_assert(KC_INT8 == 142, ""); _Static_assert(AU_OFF == 0x5C1E, "");
_Static_assert(KC_INT9 == 143, ""); _Static_assert(AU_TOG == 0x5C1F, "");
_Static_assert(KC_LANG3 == 146, "");
_Static_assert(KC_LANG4 == 147, ""); _Static_assert(CLICKY_TOGGLE == 0x5C20, "");
_Static_assert(KC_LANG5 == 148, ""); _Static_assert(CLICKY_ENABLE == 0x5C21, "");
_Static_assert(KC_LANG6 == 149, ""); _Static_assert(CLICKY_DISABLE == 0x5C22, "");
_Static_assert(KC_LANG7 == 150, ""); _Static_assert(CLICKY_UP == 0x5C23, "");
_Static_assert(KC_LANG8 == 151, ""); _Static_assert(CLICKY_DOWN == 0x5C24, "");
_Static_assert(KC_LANG9 == 152, ""); _Static_assert(CLICKY_RESET == 0x5C25, "");
_Static_assert(KC_ERAS == 153, ""); _Static_assert(MU_ON == 0x5C26, "");
_Static_assert(KC_SYSREQ == 154, ""); _Static_assert(MU_OFF == 0x5C27, "");
_Static_assert(KC_CANCEL == 155, ""); _Static_assert(MU_TOG == 0x5C28, "");
_Static_assert(KC_CLEAR == 156, ""); _Static_assert(MU_MOD == 0x5C29, "");
_Static_assert(KC_CLR == 156, "");
_Static_assert(KC_PRIOR == 157, ""); _Static_assert(BL_ON == 0x5CBB, "");
_Static_assert(KC_OUT == 160, ""); _Static_assert(BL_OFF == 0x5CBC, "");
_Static_assert(KC_OPER == 161, ""); _Static_assert(BL_DEC == 0x5CBD, "");
_Static_assert(KC_CLEAR_AGAIN == 162, ""); _Static_assert(BL_INC == 0x5CBE, "");
_Static_assert(KC_CRSEL == 163, ""); _Static_assert(BL_TOGG == 0x5CBF, "");
_Static_assert(KC_EXSEL == 164, ""); _Static_assert(BL_STEP == 0x5CC0, "");
_Static_assert(KC_FN0 == 192, ""); _Static_assert(BL_BRTG == 0x5CC1, "");
_Static_assert(KC_FN1 == 193, ""); _Static_assert(RGB_TOG == 0x5CC2, "");
_Static_assert(KC_FN2 == 194, ""); _Static_assert(RGB_MOD == 0x5CC3, "");
_Static_assert(KC_FN3 == 195, ""); _Static_assert(RGB_RMOD == 0x5CC4, "");
_Static_assert(KC_FN4 == 196, ""); _Static_assert(RGB_HUI == 0x5CC5, "");
_Static_assert(KC_FN5 == 197, ""); _Static_assert(RGB_HUD == 0x5CC6, "");
_Static_assert(KC_FN6 == 198, ""); _Static_assert(RGB_SAI == 0x5CC7, "");
_Static_assert(KC_FN7 == 199, ""); _Static_assert(RGB_SAD == 0x5CC8, "");
_Static_assert(KC_FN8 == 200, ""); _Static_assert(RGB_VAI == 0x5CC9, "");
_Static_assert(KC_FN9 == 201, ""); _Static_assert(RGB_VAD == 0x5CCA, "");
_Static_assert(KC_FN10 == 202, ""); _Static_assert(RGB_SPI == 0x5CCB, "");
_Static_assert(KC_FN11 == 203, ""); _Static_assert(RGB_SPD == 0x5CCC, "");
_Static_assert(KC_FN12 == 204, ""); _Static_assert(RGB_M_P == 0x5CCD, "");
_Static_assert(KC_FN13 == 205, ""); _Static_assert(RGB_M_B == 0x5CCE, "");
_Static_assert(KC_FN14 == 206, ""); _Static_assert(RGB_M_R == 0x5CCF, "");
_Static_assert(KC_FN15 == 207, ""); _Static_assert(RGB_M_SW == 0x5CD0, "");
_Static_assert(KC_FN16 == 208, ""); _Static_assert(RGB_M_SN == 0x5CD1, "");
_Static_assert(KC_FN17 == 209, ""); _Static_assert(RGB_M_K == 0x5CD2, "");
_Static_assert(KC_FN18 == 210, ""); _Static_assert(RGB_M_X == 0x5CD3, "");
_Static_assert(KC_FN19 == 211, ""); _Static_assert(RGB_M_G == 0x5CD4, "");
_Static_assert(KC_FN20 == 212, ""); _Static_assert(RGB_M_T == 0x5CD5, "");
_Static_assert(KC_FN21 == 213, "");
_Static_assert(KC_FN22 == 214, ""); _Static_assert(KC_LSPO == 0x5CD7, "");
_Static_assert(KC_FN23 == 215, ""); _Static_assert(KC_RSPC == 0x5CD8, "");
_Static_assert(KC_FN24 == 216, ""); _Static_assert(KC_SFTENT == 0x5CD9, "");
_Static_assert(KC_FN25 == 217, "");
_Static_assert(KC_FN26 == 218, ""); _Static_assert(KC_LCPO == 0x5CF3, "");
_Static_assert(KC_FN27 == 219, ""); _Static_assert(KC_RCPC == 0x5CF4, "");
_Static_assert(KC_FN28 == 220, ""); _Static_assert(KC_LAPO == 0x5CF5, "");
_Static_assert(KC_FN29 == 221, ""); _Static_assert(KC_RAPC == 0x5CF6, "");
_Static_assert(KC_FN30 == 222, "");
_Static_assert(KC_FN31 == 223, ""); _Static_assert(FN_MO13 == 0x5F10, "");
_Static_assert(RESET == 23552, ""); _Static_assert(FN_MO23 == 0x5F11, "");
_Static_assert(DEBUG == 23553, ""); _Static_assert(MACRO00 == 0x5F12, "");
_Static_assert(MAGIC_TOGGLE_NKRO == 23572, ""); _Static_assert(MACRO01 == 0x5F13, "");
_Static_assert(AU_ON == 23581, ""); _Static_assert(MACRO02 == 0x5F14, "");
_Static_assert(AU_OFF == 23582, ""); _Static_assert(MACRO03 == 0x5F15, "");
_Static_assert(AU_TOG == 23583, ""); _Static_assert(MACRO04 == 0x5F16, "");
_Static_assert(CLICKY_TOGGLE == 23584, ""); _Static_assert(MACRO05 == 0x5F17, "");
_Static_assert(CLICKY_ENABLE == 23585, ""); _Static_assert(MACRO06 == 0x5F18, "");
_Static_assert(CLICKY_DISABLE == 23586, ""); _Static_assert(MACRO07 == 0x5F19, "");
_Static_assert(CLICKY_UP == 23587, ""); _Static_assert(MACRO08 == 0x5F1A, "");
_Static_assert(CLICKY_DOWN == 23588, ""); _Static_assert(MACRO09 == 0x5F1B, "");
_Static_assert(CLICKY_RESET == 23589, ""); _Static_assert(MACRO10 == 0x5F1C, "");
_Static_assert(MU_ON == 23590, ""); _Static_assert(MACRO11 == 0x5F1D, "");
_Static_assert(MU_OFF == 23591, ""); _Static_assert(MACRO12 == 0x5F1E, "");
_Static_assert(MU_TOG == 23592, ""); _Static_assert(MACRO13 == 0x5F1F, "");
_Static_assert(MU_MOD == 23593, ""); _Static_assert(MACRO14 == 0x5F20, "");
_Static_assert(MACRO15 == 0x5F21, "");
_Static_assert(USER00 == 0x5F80, "");
_Static_assert(USER01 == 0x5F81, "");
_Static_assert(USER02 == 0x5F82, "");
_Static_assert(USER03 == 0x5F83, "");
_Static_assert(USER04 == 0x5F84, "");
_Static_assert(USER05 == 0x5F85, "");
_Static_assert(USER06 == 0x5F86, "");
_Static_assert(USER07 == 0x5F87, "");
_Static_assert(USER08 == 0x5F88, "");
_Static_assert(USER09 == 0x5F89, "");
_Static_assert(USER10 == 0x5F8A, "");
_Static_assert(USER11 == 0x5F8B, "");
_Static_assert(USER12 == 0x5F8C, "");
_Static_assert(USER13 == 0x5F8D, "");
_Static_assert(USER14 == 0x5F8E, "");
_Static_assert(USER15 == 0x5F8F, "");
#endif #endif

View file

@ -56,7 +56,7 @@ __attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
} else if (keycode > 0xFF) { } else if (keycode > 0xFF) {
keycode = 0; keycode = 0;
} }
if (keycode == KC_DEL || keycode == KC_BSPC) { if (keycode == KC_DELETE || keycode == KC_BACKSPACE) {
if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) || weak_modded) { if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) || weak_modded) {
return WPM_ESTIMATED_WORD_SIZE; return WPM_ESTIMATED_WORD_SIZE;
} else { } else {

View file

@ -73,10 +73,10 @@ TEST_F(KeyPress, LeftShiftIsReportedCorrectly) {
// See issue #1476 for more information // See issue #1476 for more information
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A)));
keyboard_task(); keyboard_task();
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_LEFT_SHIFT)));
keyboard_task(); keyboard_task();
release_key(0, 0); release_key(0, 0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
keyboard_task(); keyboard_task();
release_key(3, 0); release_key(3, 0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
@ -89,9 +89,9 @@ TEST_F(KeyPress, PressLeftShiftAndControl) {
press_key(5, 0); press_key(5, 0);
// Unfortunately modifiers are also processed in the wrong order // Unfortunately modifiers are also processed in the wrong order
// See issue #1476 for more information // See issue #1476 for more information
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
keyboard_task(); keyboard_task();
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_LCTRL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_LEFT_CTRL)));
keyboard_task(); keyboard_task();
} }
@ -101,9 +101,9 @@ TEST_F(KeyPress, LeftAndRightShiftCanBePressedAtTheSameTime) {
press_key(4, 0); press_key(4, 0);
// Unfortunately modifiers are also processed in the wrong order // Unfortunately modifiers are also processed in the wrong order
// See issue #1476 for more information // See issue #1476 for more information
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
keyboard_task(); keyboard_task();
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_RSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_RIGHT_SHIFT)));
keyboard_task(); keyboard_task();
} }
@ -115,11 +115,11 @@ TEST_F(KeyPress, RightShiftLeftControlAndCharWithTheSameKey) {
// See issue #524 for more information // See issue #524 for more information
// The underlying cause is that we use only one bit to represent the right hand // The underlying cause is that we use only one bit to represent the right hand
// modifiers. // modifiers.
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RIGHT_SHIFT, KC_RIGHT_CTRL)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL, KC_O))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RIGHT_SHIFT, KC_RIGHT_CTRL, KC_O)));
keyboard_task(); keyboard_task();
release_key(6, 0); release_key(6, 0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RIGHT_SHIFT, KC_RIGHT_CTRL)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
keyboard_task(); keyboard_task();
} }
@ -129,23 +129,23 @@ TEST_F(KeyPress, PressPlusEqualReleaseBeforePress) {
InSequence s; InSequence s;
press_key(1, 1); // KC_PLUS press_key(1, 1); // KC_PLUS
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(1, 1); // KC_PLUS release_key(1, 1); // KC_PLUS
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
press_key(0, 1); // KC_EQL press_key(0, 1); // KC_EQUAL
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(0, 1); // KC_EQL release_key(0, 1); // KC_EQUAL
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
@ -156,25 +156,25 @@ TEST_F(KeyPress, PressPlusEqualDontReleaseBeforePress) {
InSequence s; InSequence s;
press_key(1, 1); // KC_PLUS press_key(1, 1); // KC_PLUS
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
press_key(0, 1); // KC_EQL press_key(0, 1); // KC_EQUAL
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(1, 1); // KC_PLS release_key(1, 1); // KC_PLUS
// BUG: Should really still return KC_EQL, but this is fine too // BUG: Should really still return KC_EQUAL, but this is fine too
// It's also called twice for some reason // It's also called twice for some reason
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2);
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(0, 1); // KC_EQL release_key(0, 1); // KC_EQUAL
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
@ -184,24 +184,24 @@ TEST_F(KeyPress, PressEqualPlusReleaseBeforePress) {
TestDriver driver; TestDriver driver;
InSequence s; InSequence s;
press_key(0, 1); // KC_EQL press_key(0, 1); // KC_EQUAL
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(0, 1); // KQ_EQL release_key(0, 1); // KC_EQUAL
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
press_key(1, 1); // KC_PLUS press_key(1, 1); // KC_PLUS
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(1, 1); // KC_PLUS release_key(1, 1); // KC_PLUS
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
@ -211,29 +211,29 @@ TEST_F(KeyPress, PressEqualPlusDontReleaseBeforePress) {
TestDriver driver; TestDriver driver;
InSequence s; InSequence s;
press_key(0, 1); // KC_EQL press_key(0, 1); // KC_EQUAL
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
press_key(1, 1); // KC_PLUS press_key(1, 1); // KC_PLUS
// BUG: The sequence is a bit strange, but it works, the end result is that // BUG: The sequence is a bit strange, but it works, the end result is that
// KC_PLUS is sent // KC_PLUS is sent
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_EQUAL)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_EQUAL)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(0, 1); // KC_EQL release_key(0, 1); // KC_EQUAL
// I guess it's fine to still report shift here // I guess it's fine to still report shift here
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);
release_key(1, 1); // KC_PLUS release_key(1, 1); // KC_PLUS
// This report is not needed // This report is not needed
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport()));
run_one_scan_loop(); run_one_scan_loop();
testing::Mock::VerifyAndClearExpectations(&driver); testing::Mock::VerifyAndClearExpectations(&driver);

View file

@ -29,9 +29,9 @@ TEST_F(Macro, PlayASimpleMacro) {
InSequence s; InSequence s;
press_key(8, 0); press_key(8, 0);
uint32_t current_time = timer_read32(); uint32_t current_time = timer_read32();
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_H))).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_H))).AT_TIME(0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_E))).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_E))).AT_TIME(0);
// The macro system could actually skip these empty keyboard reports // The macro system could actually skip these empty keyboard reports
@ -45,9 +45,9 @@ TEST_F(Macro, PlayASimpleMacro) {
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_SPACE))).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_SPACE))).AT_TIME(0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(100); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(100);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_W))).AT_TIME(100); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_W))).AT_TIME(100);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(100); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(100);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(100); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(100);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_O))) EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_O)))
// BUG: The timer should not really have advanced 10 ms here // BUG: The timer should not really have advanced 10 ms here
@ -63,9 +63,9 @@ TEST_F(Macro, PlayASimpleMacro) {
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(160); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(160);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_D))).AT_TIME(170); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_D))).AT_TIME(170);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(180); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(180);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(190); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(190);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_1))).AT_TIME(200); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_1))).AT_TIME(200);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(210); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(210);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(220); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(220);
run_one_scan_loop(); run_one_scan_loop();
} }

View file

@ -46,7 +46,7 @@ TEST_F(Tapping, HoldA_SHFT_T_KeyReportsShift) {
// Tapping keys does nothing on press // Tapping keys does nothing on press
EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0);
idle_for(TAPPING_TERM); idle_for(TAPPING_TERM);
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT)));
run_one_scan_loop(); run_one_scan_loop();
} }
@ -92,6 +92,6 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) {
// If TAPPING_TERM + 1 above is changed to TAPPING_TERM or TAPPING_TERM + 2 it doesn't // If TAPPING_TERM + 1 above is changed to TAPPING_TERM or TAPPING_TERM + 2 it doesn't
press_key(7, 0); press_key(7, 0);
// Shouldn't be called here really // Shouldn't be called here really
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(1); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).Times(1);
idle_for(TAPPING_TERM); idle_for(TAPPING_TERM);
} }