aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/keymap_common.h
diff options
context:
space:
mode:
authorGravatar Jack Humbert <jack.humb@gmail.com>2015-10-27 22:00:52 -0400
committerGravatar Jack Humbert <jack.humb@gmail.com>2015-10-27 22:00:52 -0400
commitd9f08e6177271594fa573993d9f4dbc2d98c7416 (patch)
tree98096a91e8625cef8578bd21fed471bef23e955a /quantum/keymap_common.h
parent909d30553fb0324cd021ebfb523e750b0009c636 (diff)
downloadqmk_firmware-d9f08e6177271594fa573993d9f4dbc2d98c7416.tar.gz
toggle and hold-tap action shortcuts
Diffstat (limited to 'quantum/keymap_common.h')
-rw-r--r--quantum/keymap_common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index b1df4eb0f..100300e81 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -172,8 +172,18 @@ extern const uint16_t fn_actions[];
// Set default layer - 256 layer max
#define DF(layer) (layer | 0x5300)
+// Toggle to layer - 256 layer max
+#define TG(layer) (layer | 0x5400)
+
#define MIDI(n) (n | 0x6000)
+// H-old, T-ap - 256 keycode max
+#define HT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8))
+#define CTL_T(kc) HT(0x1, kc)
+#define SFT_T(kc) HT(0x2, kc)
+#define ALT_T(kc) HT(0x4, kc)
+#define GUI_T(kc) HT(0x8, kc)
+
// For sending unicode codes.
// You may not send codes over 1FFF -- this supports most of UTF8.
// To have a key that sends out Œ, go UC(0x0152)