forked from kofal.net/zmk
feat(mouse): Initial mouse keys support.
* Add HID report/descriptor for a new report with mouse buttons, and x/y/wheel deltas. * New mouse key press behavior for press/release of mouse keys. * Add constants for HID main item values (e.g. data/array/absolute) * Define and use constants for our HID report IDs.
This commit is contained in:
committed by
Pete Johanson
parent
8776911da5
commit
d7d9eed317
@@ -26,6 +26,7 @@
|
||||
#define HID_USAGE_GDV (0x06) // Generic Device Controls
|
||||
#define HID_USAGE_KEY (0x07) // Keyboard/Keypad
|
||||
#define HID_USAGE_LED (0x08) // LED
|
||||
#define HID_USAGE_BUTTON (0x09) // Button
|
||||
#define HID_USAGE_TELEPHONY (0x0B) // Telephony Device
|
||||
#define HID_USAGE_CONSUMER (0x0C) // Consumer
|
||||
#define HID_USAGE_DIGITIZERS (0x0D) // Digitizers
|
||||
|
||||
24
app/include/dt-bindings/zmk/mouse.h
Normal file
24
app/include/dt-bindings/zmk/mouse.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <zephyr/dt-bindings/dt-util.h>
|
||||
|
||||
/* Mouse press behavior */
|
||||
/* Left click */
|
||||
#define MB1 BIT(0)
|
||||
#define LCLK (MB1)
|
||||
|
||||
/* Right click */
|
||||
#define MB2 BIT(1)
|
||||
#define RCLK (MB2)
|
||||
|
||||
/* Middle click */
|
||||
#define MB3 BIT(2)
|
||||
#define MCLK (MB3)
|
||||
|
||||
#define MB4 BIT(3)
|
||||
#define MB5 BIT(4)
|
||||
Reference in New Issue
Block a user