Refactor global bindings, implement mod-tap.
* Use extra comptible = "zmk,behavior-global" to add behaviors to global bindings for event notification. * Implement mod-tap, as a keymap binding and global one to skip tap if other keycode pressed while held.
This commit is contained in:
parent
7e659851c8
commit
223edf05ad
20 changed files with 307 additions and 100 deletions
|
|
@ -1,11 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <zmk/keys.h>
|
||||
|
||||
int zmk_events_position_pressed(u32_t position);
|
||||
int zmk_events_position_released(u32_t position);
|
||||
int zmk_events_keycode_pressed(u32_t keycode);
|
||||
int zmk_events_keycode_released(u32_t keycode);
|
||||
int zmk_events_mod_pressed(u32_t modifier);
|
||||
int zmk_events_mod_released(u32_t modifier);
|
||||
int zmk_events_modifiers_pressed(zmk_mod_flags modifiers);
|
||||
int zmk_events_modifiers_released(zmk_mod_flags modifiers);
|
||||
int zmk_events_consumer_key_pressed(u32_t usage);
|
||||
int zmk_events_consumer_key_released(u32_t usage);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <devicetree.h>
|
||||
#include <usb/usb_device.h>
|
||||
#include <usb/class/usb_hid.h>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
#include <zmk/matrix.h>
|
||||
// #include <zmk/keys.h>
|
||||
|
||||
bool zmk_keymap_layer_activate(u8_t layer);
|
||||
bool zmk_keymap_layer_deactivate(u8_t layer);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <devicetree.h>
|
||||
|
||||
#define ZMK_MATRIX_NODE_ID DT_CHOSEN(zmk_kscan)
|
||||
|
||||
#if DT_NODE_HAS_PROP(ZMK_MATRIX_NODE_ID,row_gpios)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue