feat: Add WPM calculator and display widget

This commit is contained in:
Ally Parker
2021-01-22 16:23:21 +00:00
committed by Pete Johanson
parent c0cab57c2d
commit a4aaa73f06
20 changed files with 306 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
s/.*wpm_work_handler: //p
s/.*wpm_event_listener: //p

View File

@@ -0,0 +1,4 @@
key_pressed_count 1 keycode 5
Raised WPM state changed 12 wpm_update_counter 1
key_pressed_count 2 keycode 5
Raised WPM state changed 8 wpm_update_counter 3

View File

@@ -0,0 +1,9 @@
CONFIG_KSCAN=n
CONFIG_ZMK_KSCAN_MOCK_DRIVER=y
CONFIG_ZMK_KSCAN_GPIO_DRIVER=n
CONFIG_GPIO=n
CONFIG_ZMK_BLE=n
CONFIG_LOG=y
CONFIG_LOG_BACKEND_SHOW_COLOR=n
CONFIG_ZMK_LOG_LEVEL_DBG=y
CONFIG_ZMK_WPM=y

View File

@@ -0,0 +1,15 @@
#include "../behavior_keymap.dtsi"
&kscan {
events = <
ZMK_MOCK_PRESS(0,0,10)
ZMK_MOCK_RELEASE(0,0,10)
//1st WPM worker call - 12wpm - 1 key press in 1 second
ZMK_MOCK_PRESS(0,0,1000)
ZMK_MOCK_RELEASE(0,0,10)
// 2nd WPM worker call - 12wpm - 2 key press in 2 second
// note there is no event for this as WPM hasn't changed
// 3rd WPM worker call - 8wpm - 2 key press in 3 seconds
ZMK_MOCK_PRESS(0,0,2000)
>;
};