From eea85c7e24c4ff61bff0a6db8246a19896b5b630 Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 11 Feb 2013 00:02:11 +0900 Subject: [PATCH] Fix is_tap_key() --- common/action.c | 14 +++++++------- common/action.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/action.c b/common/action.c index f6e50032..6d533675 100644 --- a/common/action.c +++ b/common/action.c @@ -816,18 +816,18 @@ bool is_tap_key(key_t key) case ACT_LAYER: case ACT_LAYER_BIT: switch (action.layer.code) { - case 0x00: - case 0xF1 ... 0xFF: + case LAYER_MOMENTARY: + case LAYER_ON_PRESS: + case LAYER_ON_RELEASE: + case LAYER_DEFAULT: return false; - case 0xF0: - default: + case LAYER_TAP_TOGGLE: + default: /* tap key */ return true; } return false; case ACT_FUNCTION: - if (action.func.opt & FUNC_TAP) { - return true; - } + if (action.func.opt & FUNC_TAP) { return true; } return false; } return false; diff --git a/common/action.h b/common/action.h index 800554eb..9b559cb1 100644 --- a/common/action.h +++ b/common/action.h @@ -323,7 +323,7 @@ enum usage_pages { /* Function */ enum function_opts { - FUNC_TAP = 0x8, + FUNC_TAP = 0x8, /* indciates function is tappable */ }; #define ACTION_FUNCTION(id, opt) ACTION(ACT_FUNCTION, (opt)<<8 | id) #define ACTION_FUNCTION_TAP(id) ACTION(ACT_FUNCTION, FUNC_TAP<<8 | id) -- 2.39.3