+// Toggle to layer - 256 layer max
+#define TG(layer) (layer | 0x5400)
+
+// One-shot layer - 256 layer max
+#define OSL(layer) (layer | 0x5500)
+
+// One-shot mod
+#define OSM(layer) (layer | 0x5600)
+
+// chording is currently at 0x57xx
+
+// M-od, T-ap - 256 keycode max
+#define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8))
+#define CTL_T(kc) MT(0x1, kc)
+#define SFT_T(kc) MT(0x2, kc)
+#define ALT_T(kc) MT(0x4, kc)
+#define GUI_T(kc) MT(0x8, kc)
+#define C_S_T(kc) MT(0x3, kc) // Control + Shift e.g. for gnome-terminal
+#define MEH_T(kc) MT(0x7, kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
+#define LCAG_T(kc) MT(0xD, kc) // Left control alt and gui
+#define ALL_T(kc) MT(0xF, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
+
+// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap
+#define KC_HYPR HYPR(KC_NO)
+#define KC_MEH MEH(KC_NO)
+
+#ifdef UNICODE_ENABLE
+ // For sending unicode codes.
+ // You may not send codes over 7FFF -- this supports most of UTF8.
+ // To have a key that sends out Œ, go UC(0x0152)
+ #define UNICODE(n) (n | 0x8000)
+ #define UC(n) UNICODE(n)
+#endif