diff options
| author | Joel Challis <git@zvecr.com> | 2022-10-07 23:36:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-07 23:36:38 +0100 |
| commit | f090cfe75ca3978c08d22b77bb478fb22638b3d9 (patch) | |
| tree | 4f43be38a1b54dac5bf3868e3d356e0c0c340938 /quantum | |
| parent | 9e1ff0e6b95820d6cbe21f9bf3cc2a4f8633114a (diff) | |
Relocate US ANSI shifted keycode aliases (#18634)
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/keymap_extras/keymap_us.h | 72 | ||||
| -rw-r--r-- | quantum/quantum_keycodes.h | 62 | ||||
| -rw-r--r-- | quantum/sequencer/tests/rules.mk | 2 |
3 files changed, 74 insertions, 62 deletions
diff --git a/quantum/keymap_extras/keymap_us.h b/quantum/keymap_extras/keymap_us.h new file mode 100644 index 0000000000..b18c701679 --- /dev/null +++ b/quantum/keymap_extras/keymap_us.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | // Copyright 2022 QMK | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "keymap.h" | ||
| 7 | |||
| 8 | // clang-format off | ||
| 9 | |||
| 10 | /* Shifted symbols | ||
| 11 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ | ||
| 12 | * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ | ||
| 13 | * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ | ||
| 14 | * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │ | ||
| 15 | * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ | ||
| 16 | * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │ | ||
| 17 | * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ | ||
| 18 | * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │ | ||
| 19 | * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ | ||
| 20 | * │ │ │ │ │ │ │ │ │ | ||
| 21 | * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ | ||
| 22 | */ | ||
| 23 | // Row 1 | ||
| 24 | #define KC_TILD S(KC_GRAVE) // ~ | ||
| 25 | #define KC_EXLM S(KC_1) // ! | ||
| 26 | #define KC_AT S(KC_2) // @ | ||
| 27 | #define KC_HASH S(KC_3) // # | ||
| 28 | #define KC_DLR S(KC_4) // $ | ||
| 29 | #define KC_PERC S(KC_5) // % | ||
| 30 | #define KC_CIRC S(KC_6) // ^ | ||
| 31 | #define KC_AMPR S(KC_7) // & | ||
| 32 | #define KC_ASTR S(KC_8) // * | ||
| 33 | #define KC_LPRN S(KC_9) // ( | ||
| 34 | #define KC_RPRN S(KC_0) // ) | ||
| 35 | #define KC_UNDS S(KC_MINUS) // _ | ||
| 36 | #define KC_PLUS S(KC_EQUAL) // + | ||
| 37 | // Row 2 | ||
| 38 | #define KC_LCBR S(KC_LEFT_BRACKET) // { | ||
| 39 | #define KC_RCBR S(KC_RIGHT_BRACKET) // } | ||
| 40 | #define KC_PIPE S(KC_BACKSLASH) // | | ||
| 41 | // Row 3 | ||
| 42 | #define KC_COLN S(KC_SEMICOLON) // : | ||
| 43 | #define KC_DQUO S(KC_QUOTE) // " | ||
| 44 | // Row 4 | ||
| 45 | #define KC_LABK S(KC_COMMA) // < | ||
| 46 | #define KC_RABK S(KC_DOT) // > | ||
| 47 | #define KC_QUES S(KC_SLASH) // ? | ||
| 48 | |||
| 49 | // alias stuff | ||
| 50 | #define KC_TILDE KC_TILD | ||
| 51 | #define KC_EXCLAIM KC_EXLM | ||
| 52 | #define KC_DOLLAR KC_DLR | ||
| 53 | #define KC_PERCENT KC_PERC | ||
| 54 | #define KC_CIRCUMFLEX KC_CIRC | ||
| 55 | #define KC_AMPERSAND KC_AMPR | ||
| 56 | #define KC_ASTERISK KC_ASTR | ||
| 57 | #define KC_LEFT_PAREN KC_LPRN | ||
| 58 | #define KC_RIGHT_PAREN KC_RPRN | ||
| 59 | #define KC_UNDERSCORE KC_UNDS | ||
| 60 | |||
| 61 | #define KC_LEFT_CURLY_BRACE KC_LCBR | ||
| 62 | #define KC_RIGHT_CURLY_BRACE KC_RCBR | ||
| 63 | |||
| 64 | #define KC_COLON KC_COLN | ||
| 65 | #define KC_DOUBLE_QUOTE KC_DQUO | ||
| 66 | #define KC_DQT KC_DQUO | ||
| 67 | |||
| 68 | #define KC_LEFT_ANGLE_BRACKET KC_LABK | ||
| 69 | #define KC_LT KC_LABK | ||
| 70 | #define KC_RIGHT_ANGLE_BRACKET KC_RABK | ||
| 71 | #define KC_GT KC_RABK | ||
| 72 | #define KC_QUESTION KC_QUES | ||
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index abf3f1a384..939fab9298 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -656,67 +656,7 @@ enum quantum_keycodes { | |||
| 656 | #define MOD_MEH 0x7 | 656 | #define MOD_MEH 0x7 |
| 657 | 657 | ||
| 658 | // US ANSI shifted keycode aliases | 658 | // US ANSI shifted keycode aliases |
| 659 | #define KC_TILDE LSFT(KC_GRAVE) // ~ | 659 | #include "keymap_us.h" |
| 660 | #define KC_TILD KC_TILDE | ||
| 661 | |||
| 662 | #define KC_EXCLAIM LSFT(KC_1) // ! | ||
| 663 | #define KC_EXLM KC_EXCLAIM | ||
| 664 | |||
| 665 | #define KC_AT LSFT(KC_2) // @ | ||
| 666 | |||
| 667 | #define KC_HASH LSFT(KC_3) // # | ||
| 668 | |||
| 669 | #define KC_DOLLAR LSFT(KC_4) // $ | ||
| 670 | #define KC_DLR KC_DOLLAR | ||
| 671 | |||
| 672 | #define KC_PERCENT LSFT(KC_5) // % | ||
| 673 | #define KC_PERC KC_PERCENT | ||
| 674 | |||
| 675 | #define KC_CIRCUMFLEX LSFT(KC_6) // ^ | ||
| 676 | #define KC_CIRC KC_CIRCUMFLEX | ||
| 677 | |||
| 678 | #define KC_AMPERSAND LSFT(KC_7) // & | ||
| 679 | #define KC_AMPR KC_AMPERSAND | ||
| 680 | |||
| 681 | #define KC_ASTERISK LSFT(KC_8) // * | ||
| 682 | #define KC_ASTR KC_ASTERISK | ||
| 683 | |||
| 684 | #define KC_LEFT_PAREN LSFT(KC_9) // ( | ||
| 685 | #define KC_LPRN KC_LEFT_PAREN | ||
| 686 | |||
| 687 | #define KC_RIGHT_PAREN LSFT(KC_0) // ) | ||
| 688 | #define KC_RPRN KC_RIGHT_PAREN | ||
| 689 | |||
| 690 | #define KC_UNDERSCORE LSFT(KC_MINUS) // _ | ||
| 691 | #define KC_UNDS KC_UNDERSCORE | ||
| 692 | |||
| 693 | #define KC_PLUS LSFT(KC_EQUAL) // + | ||
| 694 | |||
| 695 | #define KC_LEFT_CURLY_BRACE LSFT(KC_LEFT_BRACKET) // { | ||
| 696 | #define KC_LCBR KC_LEFT_CURLY_BRACE | ||
| 697 | |||
| 698 | #define KC_RIGHT_CURLY_BRACE LSFT(KC_RIGHT_BRACKET) // } | ||
| 699 | #define KC_RCBR KC_RIGHT_CURLY_BRACE | ||
| 700 | |||
| 701 | #define KC_LEFT_ANGLE_BRACKET LSFT(KC_COMMA) // < | ||
| 702 | #define KC_LABK KC_LEFT_ANGLE_BRACKET | ||
| 703 | #define KC_LT KC_LEFT_ANGLE_BRACKET | ||
| 704 | |||
| 705 | #define KC_RIGHT_ANGLE_BRACKET LSFT(KC_DOT) // > | ||
| 706 | #define KC_RABK KC_RIGHT_ANGLE_BRACKET | ||
| 707 | #define KC_GT KC_RIGHT_ANGLE_BRACKET | ||
| 708 | |||
| 709 | #define KC_COLON LSFT(KC_SEMICOLON) // : | ||
| 710 | #define KC_COLN KC_COLON | ||
| 711 | |||
| 712 | #define KC_PIPE LSFT(KC_BACKSLASH) // | | ||
| 713 | |||
| 714 | #define KC_QUESTION LSFT(KC_SLASH) // ? | ||
| 715 | #define KC_QUES KC_QUESTION | ||
| 716 | |||
| 717 | #define KC_DOUBLE_QUOTE LSFT(KC_QUOTE) // " | ||
| 718 | #define KC_DQUO KC_DOUBLE_QUOTE | ||
| 719 | #define KC_DQT KC_DOUBLE_QUOTE | ||
| 720 | 660 | ||
| 721 | #define KC_DELT KC_DELETE // Del key (four letter code) | 661 | #define KC_DELT KC_DELETE // Del key (four letter code) |
| 722 | 662 | ||
diff --git a/quantum/sequencer/tests/rules.mk b/quantum/sequencer/tests/rules.mk index a3bbd80513..611459e060 100644 --- a/quantum/sequencer/tests/rules.mk +++ b/quantum/sequencer/tests/rules.mk | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # - it is consistent with the example that is used as a reference in the Unit Testing article (https://docs.qmk.fm/#/unit_testing?id=adding-tests-for-new-or-existing-features) | 2 | # - it is consistent with the example that is used as a reference in the Unit Testing article (https://docs.qmk.fm/#/unit_testing?id=adding-tests-for-new-or-existing-features) |
| 3 | # - Neither `make test:sequencer` or `make test:SEQUENCER` work when using SCREAMING_SNAKE_CASE | 3 | # - Neither `make test:sequencer` or `make test:SEQUENCER` work when using SCREAMING_SNAKE_CASE |
| 4 | 4 | ||
| 5 | sequencer_DEFS := -DNO_DEBUG -DMIDI_MOCKED | 5 | sequencer_DEFS := -DMATRIX_ROWS=1 -DMATRIX_COLS=1 -DNO_DEBUG -DMIDI_MOCKED |
| 6 | 6 | ||
| 7 | sequencer_SRC := \ | 7 | sequencer_SRC := \ |
| 8 | $(QUANTUM_PATH)/sequencer/tests/midi_mock.c \ | 8 | $(QUANTUM_PATH)/sequencer/tests/midi_mock.c \ |
