X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Faction.c;h=59c6f252dcdbc6a08695d88259ba5b99ff350b6e;hb=cdd19b95dd01c5437ca313968a1385a3939e59cf;hp=c7c8f71f2ccafa346cd6cfd77625d244e7a814b9;hpb=cbb9c408e46a7a7a567f3d6e07713256152106d0;p=max%2Ftmk_keyboard.git diff --git a/common/action.c b/common/action.c index c7c8f71f..59c6f252 100644 --- a/common/action.c +++ b/common/action.c @@ -20,6 +20,7 @@ along with this program. If not, see . #include "mousekey.h" #include "command.h" #include "led.h" +#include "backlight.h" #include "action_layer.h" #include "action_tapping.h" #include "action_oneshot.h" @@ -236,7 +237,7 @@ void process_action(keyrecord_t *record) break; #ifndef NO_ACTION_TAPPING case ACT_LAYER_TAP: - case ACT_LAYER_TAP1: + case ACT_LAYER_TAP_EXT: switch (action.layer_tap.code) { case OP_TAP_TOGGLE: /* tap toggle */ @@ -291,6 +292,26 @@ void process_action(keyrecord_t *record) case ACT_MACRO: action_macro_play(action_get_macro(record, action.func.id, action.func.opt)); break; +#endif +#ifdef BACKLIGHT_ENABLE + case ACT_BACKLIGHT: + if (!event.pressed) { + switch (action.backlight.id) { + case BACKLIGHT_INCREASE: + backlight_increase(); + break; + case BACKLIGHT_DECREASE: + backlight_decrease(); + break; + case BACKLIGHT_TOGGLE: + backlight_toggle(); + break; + case BACKLIGHT_STEP: + backlight_step(); + break; + } + } + break; #endif case ACT_COMMAND: break; @@ -315,9 +336,10 @@ void register_code(uint8_t code) if (code == KC_NO) { return; } -#ifdef CAPSLOCK_LOCKING_ENABLE + +#ifdef LOCKING_SUPPORT_ENABLE else if (KC_LOCKING_CAPS == code) { -#ifdef CAPSLOCK_LOCKING_RESYNC_ENABLE +#ifdef LOCKING_RESYNC_ENABLE // Resync: ignore if caps lock already is on if (host_keyboard_leds() & (1<