aboutsummaryrefslogtreecommitdiff
path: root/quantum/keymap_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/keymap_common.h')
-rw-r--r--quantum/keymap_common.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index 091f7d8f3..30ef9365a 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -71,6 +71,36 @@ extern const uint16_t fn_actions[];
71#define RALT(kc) kc | 0x1400 71#define RALT(kc) kc | 0x1400
72#define RGUI(kc) kc | 0x1800 72#define RGUI(kc) kc | 0x1800
73 73
74// Aliases for shifted symbols
75#define KC_TILD LSFT(KC_GRV) // ~
76#define KC_TILDE KC_TILD
77#define KC_EXLM LSFT(KC_1) // !
78#define KC_EXCLAIM KC_EXLM
79#define KC_AT LSFT(KC_2) // @
80#define KC_HASH LSFT(KC_3) // #
81#define KC_DLR LSFT(KC_4) // $
82#define KC_DOLLAR KC_DLR
83#define KC_PERC LSFT(KC_5) // %
84#define KC_PERCENT KC_PERC
85#define KC_CIRC LSFT(KC_6) // ^
86#define KC_CIRCUMFLEX KC_CIRC
87#define KC_AMPR LSFT(KC_7) // &
88#define KC_AMPERSAND KC_AMPR
89#define KC_ASTR LSFT(KC_8) // *
90#define KC_ASTERISK KC_ASTR
91#define KC_LPRN LSFT(KC_9) // (
92#define KC_LEFT_PAREN KC_LPRN
93#define KC_RPRN LSFT(KC_0) // )
94#define KC_RIGHT_PAREN KC_RPRN
95#define KC_UNDS LSFT(KC_MINS) // _
96#define KC_UNDERSCORE KC_UNDS
97#define KC_PLUS LSFT(KC_EQL) // +
98#define KC_LCBR LSFT(KC_LBRC) // {
99#define KC_LEFT_CURLY_BRACE KC_LCBR
100#define KC_RCBR LSFT(KC_RBRC) // }
101#define KC_RIGHT_CURLY_BRACE KC_RCBR
102#define KC_PIPE LSFT(KC_SLSH) // |
103
74// Alias for function layers than expand past FN31 104// Alias for function layers than expand past FN31
75#define FUNC(kc) kc | 0x2000 105#define FUNC(kc) kc | 0x2000
76 106
@@ -108,10 +138,18 @@ extern const uint16_t fn_actions[];
108#define RESET 0x5000 138#define RESET 0x5000
109#define DEBUG 0x5001 139#define DEBUG 0x5001
110 140
141// GOTO layer - 16 layers max
142// when:
111// ON_PRESS = 1 143// ON_PRESS = 1
112// ON_RELEASE = 2 144// ON_RELEASE = 2
113// ON_BOTH = 3 145// ON_BOTH = 3
114#define TO(layer, when) (layer | 0x5100 | (when << 0x9)) 146#define TO(layer, when) (layer | 0x5100 | (when << 0x4))
147
148// Momentary switch layer - 256 layer max
149#define MO(layer) (layer | 0x5200)
150
151// Set default layer - 256 layer max
152#define DF(layer) (layer | 0x5300)
115 153
116#define MIDI(n) (n | 0x6000) 154#define MIDI(n) (n | 0x6000)
117 155