summaryrefslogtreecommitdiffstats
path: root/quantum/keymap.h
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-11-13 02:54:37 +0100
committerJack Humbert <jack.humb@gmail.com>2016-11-13 02:54:37 +0100
commit33e62c080c9161a0fc921c90ed299a67fc2e1799 (patch)
tree253ea910d8f2ba464ab28709f5f93d09b27c05fd /quantum/keymap.h
parenta889b899e2cf52b3b7807d8a7ad39f12e0761a10 (diff)
parent631b8999a737ec73610f8b569b1f775cadf08172 (diff)
downloadqmk_firmware-33e62c080c9161a0fc921c90ed299a67fc2e1799.tar.gz
qmk_firmware-33e62c080c9161a0fc921c90ed299a67fc2e1799.tar.xz
merging
Diffstat (limited to 'quantum/keymap.h')
-rw-r--r--quantum/keymap.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/quantum/keymap.h b/quantum/keymap.h
index 41aa11622..ae56d16c7 100644
--- a/quantum/keymap.h
+++ b/quantum/keymap.h
@@ -84,6 +84,10 @@ enum quantum_keycodes {
QK_MOD_TAP_MAX = 0x6FFF,
QK_TAP_DANCE = 0x7100,
QK_TAP_DANCE_MAX = 0x71FF,
+#ifdef UNICODEMAP_ENABLE
+ QK_UNICODE_MAP = 0x7800,
+ QK_UNICODE_MAP_MAX = 0x7FFF,
+#endif
#ifdef UNICODE_ENABLE
QK_UNICODE = 0x8000,
QK_UNICODE_MAX = 0xFFFF,
@@ -195,6 +199,7 @@ enum quantum_keycodes {
#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI)
#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT)
#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI)
+#define ALTG(kc) (kc | QK_RCTL | QK_RALT)
#define MOD_HYPR 0xf
#define MOD_MEH 0x7
@@ -299,7 +304,10 @@ enum quantum_keycodes {
// ON_PRESS = 1
// ON_RELEASE = 2
// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default.
-#define TO(layer, when) (layer | QK_TO | (when << 0x4))
+// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own
+// keycode modeled after the old version, kept below for this.
+/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */
+#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4))
// Momentary switch layer - 256 layer max
#define MO(layer) (layer | QK_MOMENTARY)
@@ -339,5 +347,8 @@ enum quantum_keycodes {
#define UC(n) UNICODE(n)
#endif
+#ifdef UNICODEMAP_ENABLE
+ #define X(n) (n | QK_UNICODE_MAP)
+#endif
#endif