1
0
Fork 0

Add MOD_MASK_* macros to core code (#4337)

* Add MOD_MASK_* macros to core code

* MOD_MASK_ALL → MOD_MASK_CSAG
This commit is contained in:
Konstantin Đorđević 2019-01-25 22:02:38 +01:00 committed by Drashna Jaelre
parent e611433cb5
commit 2f009d7461

View file

@ -46,6 +46,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MOD_BIT(code) (1 << MOD_INDEX(code)) #define MOD_BIT(code) (1 << MOD_INDEX(code))
#define MOD_INDEX(code) ((code) & 0x07) #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_BIT(code) (1 << FN_INDEX(code))
#define FN_INDEX(code) ((code) - KC_FN0) #define FN_INDEX(code) ((code) - KC_FN0)
#define FN_MIN KC_FN0 #define FN_MIN KC_FN0