Alessandro Bortolin
3 years ago
committed by
Pete Johanson
24 changed files with 285 additions and 3 deletions
@ -0,0 +1 @@ |
|||||||
|
s/.*zmk_backlight_update: //p |
@ -0,0 +1,9 @@ |
|||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 60% |
||||||
|
Update backlight brightness: 80% |
||||||
|
Update backlight brightness: 60% |
||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 40% |
@ -0,0 +1,14 @@ |
|||||||
|
CONFIG_KSCAN=n |
||||||
|
CONFIG_ZMK_KSCAN_MOCK_DRIVER=y |
||||||
|
CONFIG_ZMK_KSCAN_GPIO_DRIVER=n |
||||||
|
CONFIG_GPIO=y |
||||||
|
CONFIG_GPIO_EMUL=y |
||||||
|
CONFIG_ZMK_BLE=n |
||||||
|
CONFIG_LOG=y |
||||||
|
CONFIG_LOG_BACKEND_SHOW_COLOR=n |
||||||
|
CONFIG_ZMK_LOG_LEVEL_DBG=y |
||||||
|
CONFIG_DEBUG=y |
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 |
||||||
|
|
||||||
|
CONFIG_LED_GPIO=y |
||||||
|
CONFIG_ZMK_BACKLIGHT=y |
@ -0,0 +1,30 @@ |
|||||||
|
#include "../behavior_keymap.dtsi" |
||||||
|
|
||||||
|
&kscan { |
||||||
|
events = < |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_OFF */ |
||||||
|
ZMK_MOCK_PRESS(1,1,10) |
||||||
|
ZMK_MOCK_RELEASE(1,1,10) |
||||||
|
/* BL_OFF */ |
||||||
|
ZMK_MOCK_PRESS(1,1,10) |
||||||
|
ZMK_MOCK_RELEASE(1,1,10) |
||||||
|
/* BL_ON */ |
||||||
|
ZMK_MOCK_PRESS(1,0,10) |
||||||
|
ZMK_MOCK_RELEASE(1,0,10) |
||||||
|
/* BL_ON */ |
||||||
|
ZMK_MOCK_PRESS(1,0,10) |
||||||
|
ZMK_MOCK_RELEASE(1,0,10) |
||||||
|
>; |
||||||
|
}; |
@ -0,0 +1,34 @@ |
|||||||
|
#include <dt-bindings/zmk/keys.h> |
||||||
|
#include <behaviors.dtsi> |
||||||
|
#include <dt-bindings/zmk/kscan_mock.h> |
||||||
|
#include <dt-bindings/zmk/backlight.h> |
||||||
|
|
||||||
|
/ { |
||||||
|
chosen { |
||||||
|
zmk,backlight = &backlight; |
||||||
|
}; |
||||||
|
|
||||||
|
backlight: leds { |
||||||
|
compatible = "gpio-leds"; |
||||||
|
led_0 { |
||||||
|
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; |
||||||
|
label = "Backlight LED 0"; |
||||||
|
}; |
||||||
|
led_1 { |
||||||
|
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; |
||||||
|
label = "Backlight LED 1"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
keymap { |
||||||
|
compatible = "zmk,keymap"; |
||||||
|
label ="Default keymap"; |
||||||
|
|
||||||
|
default_layer { |
||||||
|
bindings = < |
||||||
|
&bl BL_INC &bl BL_DEC |
||||||
|
&bl BL_ON &bl BL_OFF |
||||||
|
>; |
||||||
|
}; |
||||||
|
}; |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
s/.*zmk_backlight_update: //p |
@ -0,0 +1,3 @@ |
|||||||
|
Update backlight brightness: 60% |
||||||
|
Update backlight brightness: 80% |
||||||
|
Update backlight brightness: 60% |
@ -0,0 +1,15 @@ |
|||||||
|
CONFIG_KSCAN=n |
||||||
|
CONFIG_ZMK_KSCAN_MOCK_DRIVER=y |
||||||
|
CONFIG_ZMK_KSCAN_GPIO_DRIVER=n |
||||||
|
CONFIG_GPIO=y |
||||||
|
CONFIG_GPIO_EMUL=y |
||||||
|
CONFIG_ZMK_BLE=n |
||||||
|
CONFIG_LOG=y |
||||||
|
CONFIG_LOG_BACKEND_SHOW_COLOR=n |
||||||
|
CONFIG_ZMK_LOG_LEVEL_DBG=y |
||||||
|
CONFIG_DEBUG=y |
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 |
||||||
|
|
||||||
|
CONFIG_LED_GPIO=y |
||||||
|
CONFIG_ZMK_BACKLIGHT=y |
||||||
|
CONFIG_ZMK_BACKLIGHT_BRT_START=60 |
@ -0,0 +1,12 @@ |
|||||||
|
#include "../behavior_keymap.dtsi" |
||||||
|
|
||||||
|
&kscan { |
||||||
|
events = < |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
>; |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
s/.*zmk_backlight_update: //p |
@ -0,0 +1,3 @@ |
|||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 0% |
@ -0,0 +1,15 @@ |
|||||||
|
CONFIG_KSCAN=n |
||||||
|
CONFIG_ZMK_KSCAN_MOCK_DRIVER=y |
||||||
|
CONFIG_ZMK_KSCAN_GPIO_DRIVER=n |
||||||
|
CONFIG_GPIO=y |
||||||
|
CONFIG_GPIO_EMUL=y |
||||||
|
CONFIG_ZMK_BLE=n |
||||||
|
CONFIG_LOG=y |
||||||
|
CONFIG_LOG_BACKEND_SHOW_COLOR=n |
||||||
|
CONFIG_ZMK_LOG_LEVEL_DBG=y |
||||||
|
CONFIG_DEBUG=y |
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 |
||||||
|
|
||||||
|
CONFIG_LED_GPIO=y |
||||||
|
CONFIG_ZMK_BACKLIGHT=y |
||||||
|
CONFIG_ZMK_BACKLIGHT_ON_START=n |
@ -0,0 +1,12 @@ |
|||||||
|
#include "../behavior_keymap.dtsi" |
||||||
|
|
||||||
|
&kscan { |
||||||
|
events = < |
||||||
|
/* BL_ON */ |
||||||
|
ZMK_MOCK_PRESS(1,0,10) |
||||||
|
ZMK_MOCK_RELEASE(1,0,10) |
||||||
|
/* BL_OFF */ |
||||||
|
ZMK_MOCK_PRESS(1,1,10) |
||||||
|
ZMK_MOCK_RELEASE(1,1,10) |
||||||
|
>; |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
s/.*zmk_backlight_update: //p |
@ -0,0 +1,11 @@ |
|||||||
|
Update backlight brightness: 60% |
||||||
|
Update backlight brightness: 90% |
||||||
|
Update backlight brightness: 100% |
||||||
|
Update backlight brightness: 100% |
||||||
|
Update backlight brightness: 70% |
||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 10% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 30% |
||||||
|
Update backlight brightness: 60% |
@ -0,0 +1,16 @@ |
|||||||
|
CONFIG_KSCAN=n |
||||||
|
CONFIG_ZMK_KSCAN_MOCK_DRIVER=y |
||||||
|
CONFIG_ZMK_KSCAN_GPIO_DRIVER=n |
||||||
|
CONFIG_GPIO=y |
||||||
|
CONFIG_GPIO_EMUL=y |
||||||
|
CONFIG_ZMK_BLE=n |
||||||
|
CONFIG_LOG=y |
||||||
|
CONFIG_LOG_BACKEND_SHOW_COLOR=n |
||||||
|
CONFIG_ZMK_LOG_LEVEL_DBG=y |
||||||
|
CONFIG_DEBUG=y |
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 |
||||||
|
|
||||||
|
CONFIG_LED_GPIO=y |
||||||
|
CONFIG_ZMK_BACKLIGHT=y |
||||||
|
CONFIG_ZMK_BACKLIGHT_BRT_START=60 |
||||||
|
CONFIG_ZMK_BACKLIGHT_BRT_STEP=30 |
@ -0,0 +1,36 @@ |
|||||||
|
#include "../behavior_keymap.dtsi" |
||||||
|
|
||||||
|
&kscan { |
||||||
|
events = < |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
>; |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
s/.*zmk_backlight_update: //p |
@ -0,0 +1,12 @@ |
|||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 20% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 20% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 60% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 40% |
||||||
|
Update backlight brightness: 20% |
||||||
|
Update backlight brightness: 0% |
||||||
|
Update backlight brightness: 20% |
@ -0,0 +1,14 @@ |
|||||||
|
CONFIG_KSCAN=n |
||||||
|
CONFIG_ZMK_KSCAN_MOCK_DRIVER=y |
||||||
|
CONFIG_ZMK_KSCAN_GPIO_DRIVER=n |
||||||
|
CONFIG_GPIO=y |
||||||
|
CONFIG_GPIO_EMUL=y |
||||||
|
CONFIG_ZMK_BLE=n |
||||||
|
CONFIG_LOG=y |
||||||
|
CONFIG_LOG_BACKEND_SHOW_COLOR=n |
||||||
|
CONFIG_ZMK_LOG_LEVEL_DBG=y |
||||||
|
CONFIG_DEBUG=y |
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 |
||||||
|
|
||||||
|
CONFIG_LED_GPIO=y |
||||||
|
CONFIG_ZMK_BACKLIGHT=y |
@ -0,0 +1,39 @@ |
|||||||
|
#include "../behavior_keymap.dtsi" |
||||||
|
|
||||||
|
&kscan { |
||||||
|
events = < |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_ON */ |
||||||
|
ZMK_MOCK_PRESS(1,0,10) |
||||||
|
ZMK_MOCK_RELEASE(1,0,10) |
||||||
|
/* BL_OFF */ |
||||||
|
ZMK_MOCK_PRESS(1,1,10) |
||||||
|
ZMK_MOCK_RELEASE(1,1,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
/* BL_OFF */ |
||||||
|
ZMK_MOCK_PRESS(1,1,10) |
||||||
|
ZMK_MOCK_RELEASE(1,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_DEC */ |
||||||
|
ZMK_MOCK_PRESS(0,1,10) |
||||||
|
ZMK_MOCK_RELEASE(0,1,10) |
||||||
|
/* BL_INC */ |
||||||
|
ZMK_MOCK_PRESS(0,0,10) |
||||||
|
ZMK_MOCK_RELEASE(0,0,10) |
||||||
|
>; |
||||||
|
}; |
Loading…
Reference in new issue