From 4402e4fbc7bc79206589d3006fde802c4ba70ec7 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 18 Aug 2020 11:20:15 -0400 Subject: feeature(bt): Add "unpair combo" on startup. * Especially for splits, we need the ability to unpair all paired devices as sledgehammer if we need to "reset things", and doing so via keymaps isn't suitable. * Allows shields to define a collection of key positions that if all held 2 seconds after startup, will unpair all existing pairs for the device. --- app/include/zmk/ble.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/include') diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index a77237d..e760ed7 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -3,5 +3,5 @@ #include -int zmk_ble_init(); +int zmk_ble_unpair_all(); bool zmk_ble_handle_key_user(struct zmk_key_event *key_event); -- cgit v1.2.3 From a82f990d4c518165fc745ce2b5fb5cf2dd6b2727 Mon Sep 17 00:00:00 2001 From: Cody McGinnis Date: Tue, 18 Aug 2020 14:02:24 -0400 Subject: feat(keymap): allow users to toggle layers --- app/include/zmk/keymap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'app/include') diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index 4a6bb37..c55207f 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -1,5 +1,6 @@ #pragma once +bool zmk_keymap_layer_active(u8_t layer); int zmk_keymap_layer_activate(u8_t layer); int zmk_keymap_layer_deactivate(u8_t layer); -- cgit v1.2.3 From 7facb6eee8c5864c86b0a69213db4aabf6f24585 Mon Sep 17 00:00:00 2001 From: Cody McGinnis Date: Tue, 18 Aug 2020 14:02:25 -0400 Subject: fix(keymap): move the toggle layer logic to keymap.c --- app/include/zmk/keymap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'app/include') diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index c55207f..c1f6393 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -3,5 +3,6 @@ bool zmk_keymap_layer_active(u8_t layer); int zmk_keymap_layer_activate(u8_t layer); int zmk_keymap_layer_deactivate(u8_t layer); +int zmk_keymap_layer_toggle(u8_t layer); int zmk_keymap_position_state_changed(u32_t position, bool pressed); -- cgit v1.2.3