mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
chore: Add basic tests for Studio's layer manipulation (#3164)
chore: Add test behaviors for Studio testing chore: Add basic tests for studio layer adjustment chore: Fixes from code review
This commit is contained in:
25
app/tests/studio/remove-layer/basic/native_sim.keymap
Normal file
25
app/tests/studio/remove-layer/basic/native_sim.keymap
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
// Test removing layer 1
|
||||
&kscan {
|
||||
events = <
|
||||
// remove layer 1
|
||||
ZMK_MOCK_PRESS(1,0,10)
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
// toggle layer 1 on
|
||||
ZMK_MOCK_PRESS(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
// press position 0,0 - should output A (layer 0) because layer 1 was removed
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
// toggle layer 2 on
|
||||
ZMK_MOCK_PRESS(1,1,10)
|
||||
ZMK_MOCK_RELEASE(1,1,10)
|
||||
// press position 0,0 - should output C (layer 2)
|
||||
ZMK_MOCK_PRESS(0,0,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
||||
Reference in New Issue
Block a user