From cfc4149712217625fcb75e50348094fd9df432f5 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Fri, 27 Jan 2017 10:28:42 +1100 Subject: Add ability to use tap macros without using functions --- quantum/keymap_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'quantum/keymap_common.c') diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index eced3d2bb..5190f24e8 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); break; case QK_MACRO ... QK_MACRO_MAX: - action.code = ACTION_MACRO(keycode & 0xFF); + if (keycode & 0x800) // tap macros have upper bit set + action.code = ACTION_MACRO_TAP(keycode & 0xFF); + else + action.code = ACTION_MACRO(keycode & 0xFF); break; case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); -- cgit v1.2.3-24-g4f1b From 97816df7e7aa8710c8a0837b2abe008e0c765f2a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 10 Feb 2017 06:06:59 +0700 Subject: Implement tap mod dual role for right side mods. --- quantum/keymap_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/keymap_common.c') diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 5190f24e8..54b872d49 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -120,7 +120,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = ACTION_MODS_ONESHOT(mod); break; case QK_MOD_TAP ... QK_MOD_TAP_MAX: - action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); + action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF); break; #ifdef BACKLIGHT_ENABLE case BL_0 ... BL_15: -- cgit v1.2.3-24-g4f1b From 69ea10f9a9407415d8cbb5575a08bd73d5ddd7f9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 11:25:33 -0500 Subject: adds layer tap toggle --- quantum/keymap_common.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'quantum/keymap_common.c') diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 54b872d49..002eabd85 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -119,6 +119,9 @@ action_t action_for_key(uint8_t layer, keypos_t key) mod = keycode & 0xFF; action.code = ACTION_MODS_ONESHOT(mod); break; + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF); + break; case QK_MOD_TAP ... QK_MOD_TAP_MAX: action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF); break; -- cgit v1.2.3-24-g4f1b