mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-04-18 02:56:57 -05:00
feat: Allow layer behaviors to "lock" layers on (#2717)
* refactor(core)!: Allow layer behaviors to "lock" layers on Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com> * docs: Added documentation note on locking layers Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com> --------- Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
This commit is contained in:
@@ -12,12 +12,13 @@
|
||||
struct zmk_layer_state_changed {
|
||||
uint8_t layer;
|
||||
bool state;
|
||||
bool locked;
|
||||
int64_t timestamp;
|
||||
};
|
||||
|
||||
ZMK_EVENT_DECLARE(zmk_layer_state_changed);
|
||||
|
||||
static inline int raise_layer_state_changed(uint8_t layer, bool state) {
|
||||
static inline int raise_layer_state_changed(uint8_t layer, bool state, bool locked) {
|
||||
return raise_zmk_layer_state_changed((struct zmk_layer_state_changed){
|
||||
.layer = layer, .state = state, .timestamp = k_uptime_get()});
|
||||
.layer = layer, .state = state, .locked = locked, .timestamp = k_uptime_get()});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user