zmk/app/tests/mouse-keys/mkp/native_posix_64.keymap
Jesper Jensen f8a0c397e2 Remove everything not required for buttons
I've stripped out everything not strictly required for mouse button HID
support. This include dropping the worker thread completely, shaving
down the USB HID descriptor. Flattening the mouse/ source directory
structure and removing a bunch of event handling.

I have kept the mouse event handling separate from the other HID event
handling since I figured that was a pretty neat split. If that's a bad
idea, do tell.

I've also added a test case for mouse button emulation, since that was
untested before.

The changes have been tested on a corne (split) in usb mode. Bindings on
both the left and the right side works (with the left side as master).
2022-08-17 23:40:01 +02:00

28 lines
445 B
Text

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/kscan_mock.h>
#include <dt-bindings/zmk/mouse.h>
/ {
keymap {
compatible = "zmk,keymap";
label ="Default keymap";
default_layer {
bindings = <
&mkp LCLK &none
&none &mkp RCLK
>;
};
};
};
&kscan {
events = <
ZMK_MOCK_PRESS (0,0,100)
ZMK_MOCK_PRESS (1,1,100)
ZMK_MOCK_RELEASE(1,1, 10)
ZMK_MOCK_RELEASE(0,0, 10)
>;
};