diff --git a/keyboard/tentapad/backlight.c b/keyboard/tentapad/backlight.c
index cb2a3641..4ee3fec5 100644
--- a/keyboard/tentapad/backlight.c
+++ b/keyboard/tentapad/backlight.c
@@ -26,7 +26,8 @@ along with this program. If not, see .
#ifdef BACKLIGHT_ENABLE
uint8_t backlight_mode;
-const uint8_t backlight_brightness = 0xFF;
+const uint8_t backlight_brightness_mid = 64;
+const uint8_t backlight_brightness_high = 255;
void backlight_set(uint8_t level)
{
@@ -44,14 +45,14 @@ void backlight_set(uint8_t level)
softpwm_led_on(LED_BOARD_SIDE);
break;
case 1:
- softpwm_led_set(LED_BOARD_SIDE, backlight_brightness);
+ softpwm_led_set(LED_BOARD_SIDE, backlight_brightness_mid);
fading_led_disable_all();
fading_led_enable(LED_KEY_SIDE);
breathing_led_disable_all();
softpwm_led_enable();
break;
case 2:
- softpwm_led_set(LED_KEY_SIDE, backlight_brightness);
+ softpwm_led_set(LED_KEY_SIDE, backlight_brightness_mid);
fading_led_disable_all();
fading_led_enable(LED_BOARD_SIDE);
breathing_led_disable_all();
@@ -65,14 +66,14 @@ void backlight_set(uint8_t level)
softpwm_led_enable();
break;
case 4:
- softpwm_led_set(LED_KEY_SIDE, backlight_brightness);
+ softpwm_led_set(LED_KEY_SIDE, backlight_brightness_mid);
breathing_led_disable_all();
breathing_led_enable(LED_BOARD_SIDE);
fading_led_disable_all();
softpwm_led_enable();
break;
case 5:
- softpwm_led_set(LED_BOARD_SIDE, backlight_brightness);
+ softpwm_led_set(LED_BOARD_SIDE, backlight_brightness_mid);
breathing_led_disable_all();
breathing_led_enable(LED_KEY_SIDE);
fading_led_disable_all();
diff --git a/keyboard/tentapad/config.h b/keyboard/tentapad/config.h
index 99797bf4..2dfbaec0 100644
--- a/keyboard/tentapad/config.h
+++ b/keyboard/tentapad/config.h
@@ -33,7 +33,7 @@ along with this program. If not, see .
/* keymap in eeprom */
#define FN_ACTIONS_COUNT 32
-#define KEYMAPS_COUNT 8
+#define KEYMAPS_COUNT 32
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboard/tentapad/tentapad.c b/keyboard/tentapad/tentapad.c
index 7b852665..1bd6fa5a 100644
--- a/keyboard/tentapad/tentapad.c
+++ b/keyboard/tentapad/tentapad.c
@@ -41,7 +41,8 @@ static uint8_t backlight = 0;
static uint8_t layer_modified = 0;
static uint8_t backlight_modified = 0;
extern uint8_t backlight_mode;
-extern const uint8_t backlight_brightness;
+extern const uint8_t backlight_brightness_mid;
+extern const uint8_t backlight_brightness_high;
void action_keyevent(keyevent_t event)
{
@@ -79,7 +80,7 @@ void action_keyevent(keyevent_t event)
case 1: case 2:
softpwm_led_increase(LED_KEY_SIDE - 1 + backlight_mode, 32);
case 3 ... 5:
- softpwm_led_set(key, backlight_brightness);
+ softpwm_led_set(key, backlight_brightness_high);
break;
}
}
@@ -97,7 +98,7 @@ void action_keyevent(keyevent_t event)
break;
case KEY_TT:
if (event.pressed) {
- vibration(64);
+ vibration(32);
switch (backlight_mode) {
case 1: case 2:
softpwm_led_increase(LED_KEY_SIDE - 1 + backlight_mode, 32);
@@ -105,6 +106,26 @@ void action_keyevent(keyevent_t event)
}
}
break;
+ case KEY_TP:
+ switch (backlight_mode) {
+ case 1: case 5:
+ if (event.pressed) {
+ softpwm_led_set(LED_BOARD_SIDE, backlight_brightness_high);
+ }
+ else {
+ softpwm_led_set(LED_BOARD_SIDE, backlight_brightness_mid);
+ }
+ break;
+ case 2: case 4:
+ if (event.pressed) {
+ softpwm_led_set(LED_KEY_SIDE, backlight_brightness_high);
+ }
+ else {
+ softpwm_led_set(LED_KEY_SIDE, backlight_brightness_mid);
+ }
+ break;
+ }
+ break;
case KEY_CFG:
if (event.pressed) {
enter_config_mode();
@@ -121,7 +142,6 @@ void enter_config_mode(void)
backlight_modified = 0;
backlight = backlight_mode;
backlight_level(8);
- layer_on(CONFIG_LAYER);
softpwm_led_set(0, 32 * (layer + 1));
softpwm_led_set(1, 32 * (backlight + 1));
buzzer(pgm_read_word(&tones[0]), 50);
@@ -133,7 +153,6 @@ void exit_config_mode(void)
{
config_mode = 0;
backlight_level(backlight);
- layer_off(CONFIG_LAYER);
if (layer_modified) {
default_layer_set(1UL<