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.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index 7452a1ff3..ce87e4770 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30// #include "print.h" 30// #include "print.h"
31#include "debug.h" 31#include "debug.h"
32 32
33#ifdef BOOTMAGIC_ENABLE
34/* NOTE: Not portable. Bit field order depends on implementation */ 33/* NOTE: Not portable. Bit field order depends on implementation */
35typedef union { 34typedef union {
36 uint16_t raw; 35 uint16_t raw;
@@ -45,8 +44,6 @@ typedef union {
45 bool nkro:1; 44 bool nkro:1;
46 }; 45 };
47} keymap_config_t; 46} keymap_config_t;
48keymap_config_t keymap_config;
49#endif
50 47
51 48
52/* translates key to keycode */ 49/* translates key to keycode */
@@ -168,6 +165,30 @@ extern const uint16_t fn_actions[];
168#define RESET 0x5000 165#define RESET 0x5000
169#define DEBUG 0x5001 166#define DEBUG 0x5001
170 167
168// MAGIC keycodes
169#define MAGIC_SWAP_CONTROL_CAPSLOCK 0x5002
170#define MAGIC_UNSWAP_CONTROL_CAPSLOCK 0x5003
171#define MAGIC_CAPSLOCK_TO_CONTROL 0x5004
172#define MAGIC_UNCAPSLOCK_TO_CONTROL 0x5005
173#define MAGIC_SWAP_LALT_LGUI 0x5006
174#define MAGIC_UNSWAP_LALT_LGUI 0x5007
175#define MAGIC_SWAP_RALT_RGUI 0x5008
176#define MAGIC_UNSWAP_RALT_RGUI 0x5009
177#define MAGIC_NO_GUI 0x500a
178#define MAGIC_UNNO_GUI 0x500b
179#define MAGIC_SWAP_GRAVE_ESC 0x500c
180#define MAGIC_UNSWAP_GRAVE_ESC 0x500d
181#define MAGIC_SWAP_BACKSLASH_BACKSPACE 0x500e
182#define MAGIC_UNSWAP_BACKSLASH_BACKSPACE 0x500f
183#define MAGIC_HOST_NKRO 0x5010
184#define MAGIC_UNHOST_NKRO 0x5011
185#define MAGIC_SWAP_ALT_GUI 0x5012
186#define MAGIC_UNSWAP_ALT_GUI 0x5013
187
188#define AG_SWAP MAGIC_SWAP_ALT_GUI
189#define AG_NORM MAGIC_UNSWAP_ALT_GUI
190
191
171// GOTO layer - 16 layers max 192// GOTO layer - 16 layers max
172// when: 193// when:
173// ON_PRESS = 1 194// ON_PRESS = 1
@@ -213,4 +234,5 @@ void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3);
213#define IS_LAYER_ON(layer) ((layer_state) & (1UL<<(layer))) 234#define IS_LAYER_ON(layer) ((layer_state) & (1UL<<(layer)))
214#define IS_LAYER_OFF(layer) ((!layer_state) & (1UL<<(layer))) 235#define IS_LAYER_OFF(layer) ((!layer_state) & (1UL<<(layer)))
215 236
237
216#endif 238#endif