From 6e087c7dd42bafb2e71d32e957d0f910ecfd6f30 Mon Sep 17 00:00:00 2001 From: Ben Blazak Date: Fri, 22 Jun 2012 17:43:12 -0700 Subject: [PATCH] removed `kbfun_layer_set()` since it was redundant it had no effective difference from `kbfun_layer_inc()`, because values in the keycode matrix can only be positive (of type uint8_t) --- src/keyboard/ergodox/layout/qwerty.c | 3 +-- src/lib/key-functions.c | 9 --------- src/lib/key-functions.h | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/keyboard/ergodox/layout/qwerty.c b/src/keyboard/ergodox/layout/qwerty.c index 6546e14..fb7d859 100644 --- a/src/keyboard/ergodox/layout/qwerty.c +++ b/src/keyboard/ergodox/layout/qwerty.c @@ -22,7 +22,6 @@ // aliases #define f_prrel &kbfun_press_release #define f_toggl &kbfun_toggle -#define f_l_set &kbfun_layer_set #define f_l_inc &kbfun_layer_inc #define f_l_dec &kbfun_layer_dec #define f_l_iex &kbfun_layer_inc_exec @@ -181,12 +180,12 @@ NULL, // other f_prrel, NULL, NULL, NULL, NULL, NULL, NULL, f_toggl, NULL, NULL, NULL, NULL, NULL, NULL, -f_l_set, NULL, NULL, NULL, NULL, NULL, NULL, f_l_inc, NULL, NULL, NULL, NULL, NULL, NULL, f_l_dec, NULL, NULL, NULL, NULL, NULL, NULL, f_l_iex, NULL, NULL, NULL, NULL, NULL, NULL, f_l_dex, NULL, NULL, NULL, NULL, NULL, NULL, f_2kcap, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) diff --git a/src/lib/key-functions.c b/src/lib/key-functions.c index ea16367..b7dc621 100644 --- a/src/lib/key-functions.c +++ b/src/lib/key-functions.c @@ -212,15 +212,6 @@ void kbfun_toggle( KBFUN_FUNCTION_ARGS ) { _press_release(true, keycode_); } -/* - * Set layer - * - Set layer to the value specified in the keymap (using the value as a - * number instead of a keycode) - */ -void kbfun_layer_set( KBFUN_FUNCTION_ARGS ) { - _layer_set_current( keycode_, current_layer_, current_layers_ ); -} - /* * Increase layer * - Increment the current layer by the value specified in the keymap (for all diff --git a/src/lib/key-functions.h b/src/lib/key-functions.h index 5ccb545..a9728d8 100644 --- a/src/lib/key-functions.h +++ b/src/lib/key-functions.h @@ -50,7 +50,6 @@ void kbfun_press_release (KBFUN_FUNCTION_ARGS); void kbfun_toggle (KBFUN_FUNCTION_ARGS); - void kbfun_layer_set (KBFUN_FUNCTION_ARGS); void kbfun_layer_inc (KBFUN_FUNCTION_ARGS); void kbfun_layer_dec (KBFUN_FUNCTION_ARGS); void kbfun_layer_inc_exec (KBFUN_FUNCTION_ARGS);