From 77399bfe515f4dde5cb6c08dbc466ac1aa77cda3 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Thu, 17 Jan 2019 19:23:01 -0600 Subject: MacOS Brightness Alias (#4836) * Added aliases for OSX brightness * Updated docs for alises * Moved aliases, added docs to Brightness section * Update docs/keycodes.md Co-Authored-By: germ * Update docs/keycodes.md Co-Authored-By: germ * Update keycode.h * Update keycode.h * Update keycodes.md * Update docs/keycodes.md Co-Authored-By: germ --- tmk_core/common/keycode.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tmk_core/common/keycode.h') diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index ac3edbd21..3e312b829 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -174,6 +174,10 @@ along with this program. If not, see . #define KC_BRIU KC_BRIGHTNESS_UP #define KC_BRID KC_BRIGHTNESS_DOWN +/* System Specific */ +#define KC_BRMU KC_SCROLLLOCK +#define KC_BRMD KC_PAUSE + /* Mouse Keys */ #define KC_MS_U KC_MS_UP #define KC_MS_D KC_MS_DOWN -- cgit v1.2.3-70-g09d2 From 1d0bc5b7bad2c692cb0d7359d2b5506893e7eeca Mon Sep 17 00:00:00 2001 From: Junya Ogura Date: Fri, 18 Jan 2019 12:54:40 +0900 Subject: Flip definitions of macOS brightness alias Before: KC_BRMU - Brightness Down KC_BRMD - Brightness Up After: KC_BRMU - Brightness Up KC_BRMD - Brightness Down --- tmk_core/common/keycode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tmk_core/common/keycode.h') diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index 3e312b829..fd975dd6a 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -175,8 +175,8 @@ along with this program. If not, see . #define KC_BRID KC_BRIGHTNESS_DOWN /* System Specific */ -#define KC_BRMU KC_SCROLLLOCK -#define KC_BRMD KC_PAUSE +#define KC_BRMU KC_PAUSE +#define KC_BRMD KC_SCROLLLOCK /* Mouse Keys */ #define KC_MS_U KC_MS_UP -- cgit v1.2.3-70-g09d2 From 2f009d7461a486cfa7307ef0cecd67d1abe570b3 Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Fri, 25 Jan 2019 22:02:38 +0100 Subject: Add MOD_MASK_* macros to core code (#4337) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add MOD_MASK_* macros to core code * MOD_MASK_ALL → MOD_MASK_CSAG --- tmk_core/common/keycode.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tmk_core/common/keycode.h') diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index fd975dd6a..d5904276e 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -46,6 +46,22 @@ along with this program. If not, see . #define MOD_BIT(code) (1 << MOD_INDEX(code)) #define MOD_INDEX(code) ((code) & 0x07) +#define MOD_MASK_CTRL (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) +#define MOD_MASK_SHIFT (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) +#define MOD_MASK_ALT (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) +#define MOD_MASK_GUI (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) +#define MOD_MASK_CS (MOD_MASK_CTRL | MOD_MASK_SHIFT) +#define MOD_MASK_CA (MOD_MASK_CTRL | MOD_MASK_ALT) +#define MOD_MASK_CG (MOD_MASK_CTRL | MOD_MASK_GUI) +#define MOD_MASK_SA (MOD_MASK_SHIFT | MOD_MASK_ALT) +#define MOD_MASK_SG (MOD_MASK_SHIFT | MOD_MASK_GUI) +#define MOD_MASK_AG (MOD_MASK_ALT | MOD_MASK_GUI) +#define MOD_MASK_CSA (MOD_MASK_CTRL | MOD_MASK_SHIFT | MOD_MASK_ALT) +#define MOD_MASK_CSG (MOD_MASK_CTRL | MOD_MASK_SHIFT | MOD_MASK_GUI) +#define MOD_MASK_CAG (MOD_MASK_CTRL | MOD_MASK_ALT | MOD_MASK_GUI) +#define MOD_MASK_SAG (MOD_MASK_SHIFT | MOD_MASK_ALT | MOD_MASK_GUI) +#define MOD_MASK_CSAG (MOD_MASK_CTRL | MOD_MASK_SHIFT | MOD_MASK_ALT | MOD_MASK_GUI) + #define FN_BIT(code) (1 << FN_INDEX(code)) #define FN_INDEX(code) ((code) - KC_FN0) #define FN_MIN KC_FN0 -- cgit v1.2.3-70-g09d2