core: Fix is_tap_key() #673
System and media control keys work well with ACTION_MODS_TAP_KEY and ACTION_LAYER_TAP_KEY now.
This commit is contained in:
parent
ea4baf1cb6
commit
06d354c06b
3 changed files with 9 additions and 9 deletions
|
|
@ -555,18 +555,19 @@ bool is_tap_key(keyevent_t event)
|
|||
switch (action.key.code) {
|
||||
case MODS_ONESHOT:
|
||||
case MODS_TAP_TOGGLE:
|
||||
case KC_A ... KC_EXSEL: // tap key
|
||||
case KC_LCTRL ... KC_RGUI: // tap key
|
||||
default: // tap key
|
||||
return true;
|
||||
}
|
||||
case ACT_LAYER_TAP:
|
||||
case ACT_LAYER_TAP_EXT:
|
||||
switch (action.layer_tap.code) {
|
||||
case OP_ON_OFF:
|
||||
case OP_OFF_ON:
|
||||
case OP_SET_CLEAR:
|
||||
case 0xc0 ... 0xdf: // with modifiers
|
||||
return false;
|
||||
case KC_A ... KC_EXSEL: // tap key
|
||||
case KC_LCTRL ... KC_RGUI: // tap key
|
||||
case OP_TAP_TOGGLE:
|
||||
default: // tap key
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* 001r|mods|0000 0000 Modifiers with OneShot[TAP]
|
||||
* 001r|mods|0000 0001 Modifiers with tap toggle[TAP]
|
||||
* 001r|mods|0000 00xx (reserved) (0x02-03)
|
||||
* 001r|mods| keycode Modifiers with tap key(0x04-A4, E0-E7)[TAP]
|
||||
* (reserved) (0xA5-DF, E8-FF)
|
||||
* 001r|mods| keycode Modifiers with tap key[TAP]
|
||||
*
|
||||
*
|
||||
* Other Keys(01xx)
|
||||
|
|
@ -71,10 +70,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* 1001|oopp|BBBB BBBB 8-bit Bitwise Operation???
|
||||
*
|
||||
* ACT_LAYER_TAP(101x):
|
||||
* 101E|LLLL| keycode On/Off with tap key (0x04-A4, E0-E7)[TAP]
|
||||
* 101E|LLLL| keycode On/Off with tap key [TAP]
|
||||
* 101E|LLLL|110r mods On/Off with modifiers (0xC0-DF)[NOT TAP]
|
||||
* r: Left/Right flag(Left:0, Right:1)
|
||||
* (reserved) (0xA5-BF, E8-EF)
|
||||
* 101E|LLLL|1111 0000 Invert with tap toggle (0xF0) [TAP]
|
||||
* 101E|LLLL|1111 0001 On/Off (0xF1) [NOT TAP]
|
||||
* 101E|LLLL|1111 0010 Off/On (0xF2) [NOT TAP]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED)
|
||||
#define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF)
|
||||
|
||||
#ifndef ACTIONMAP_ENABLE
|
||||
// Use original HID usages on B0-DD instead of TMK specific codes
|
||||
#ifndef USE_ORIGINAL_HID_USAGE
|
||||
#define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL)
|
||||
#else
|
||||
#define IS_KEY(code) ((KC_A <= (code) && (code) <= KC_EXSEL) || \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue