From 5b409242c7072ae5234b64554455e05e61118eb7 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 13 Jan 2019 08:50:12 +0100 Subject: [PATCH] key_defs: Add Meh and Hyper keys To make it easier to create custom shortcuts, that do not interfere with system ones, an old trick is to use many modifiers. To make this easier, Ctrl+Shift+Alt is commonly abbreviated as "Meh", while Ctrl+Shift+Alt+GUI is often called "Hyper". To support this, we offer the `Key_Meh` and `Key_Hyper` aliases, along with `MEH(k)` and `HYPER(k)` to go with them. Signed-off-by: Gergely Nagy --- NEWS.md | 4 ++++ src/kaleidoscope/key_defs_aliases.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/NEWS.md b/NEWS.md index cf6d6570..19641a4c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -83,6 +83,10 @@ There are situations where one would like to disable sending a report after each Changing layers now triggers the `onLayerChange` event - but only if there was real change (thus, calling `Layer.on(SOME_LAYER)` multiple times in a row will only trigger one event). This event was introduced to help plugins that depend on layer state schedule their work better. +### Hyper and Meh keys + +To make it easier to create custom shortcuts, that do not interfere with system ones, an old trick is to use many modifiers. To make this easier, `Ctrl+Shift+Alt` is commonly abbreviated as `Meh`, while `Ctrl+Shift+Alt+Gui` is often called `Hyper`. To support this, we offer the `Key_Meh` and `Key_Hyper` aliases, along with `MEH(k)` and `HYPER(k)` to go with them. + ## New hardware support Kaleidoscope has been ported to the following devices: diff --git a/src/kaleidoscope/key_defs_aliases.h b/src/kaleidoscope/key_defs_aliases.h index 2cc8555c..b673d7f2 100644 --- a/src/kaleidoscope/key_defs_aliases.h +++ b/src/kaleidoscope/key_defs_aliases.h @@ -53,3 +53,15 @@ #define Key_RightCurlyBracket LSHIFT(Key_RightBracket) #define Key_Pipe LSHIFT(Key_Backslash) + +// To make it easier to create custom shortcuts, that do not interfere with +// system ones, an old trick is to use many modifiers. To make this easier, +// Ctrl+Shift+Alt is commonly abbreviated as "Meh", while Ctrl+Shift+Alt+GUI is +// often called "Hyper". To support this, we offer the `Key_Meh` and `Key_Hyper` +// aliases, along with `MEH(k)` and `HYPER(k)` to go with them. + +#define Key_Meh LCTRL(LSHIFT(Key_LeftAlt)) +#define Key_Hyper MEH(Key_LeftGui) + +#define MEH(k) LCTRL(LSHIFT(LALT(k))) +#define HYPER(k) LGUI(MEH(k))