Files
zmk/app/include/zmk/split/bluetooth/service.h
Pete Johanson 6b40bfda53 feat(mouse): Add mouse move and scroll support (#2477)
* feat(mouse): Add mouse move and scroll support

    * Use Zephyr input subsystem for all pointers.
    * Input processors for modifying events, e.g. scaling, swapping
      codes, temporary (mouse) layers, etc.
    * Mouse move/scroll behaviors.
    * Infrastructure in place for physical pointer input devices.

* feat: Add input split support.

* docs: Add initial pointer docs.

---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Robert U <urob@users.noreply.github.com>
Co-authored-by: Shawn Meier <ftc@users.noreply.github.com>
Co-authored-by: Chris Andreae <chris@andreae.gen.nz>
Co-authored-by: Anant Thazhemadam <47104651+thazhemadam@users.noreply.github.com>
Co-authored-by: Erik Tollerud <erik.tollerud@gmail.com>
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
2024-12-09 19:45:41 -05:00

48 lines
1.2 KiB
C

/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <zmk/events/sensor_event.h>
#include <zmk/sensors.h>
#define ZMK_SPLIT_RUN_BEHAVIOR_DEV_LEN 9
struct sensor_event {
uint8_t sensor_index;
uint8_t channel_data_size;
struct zmk_sensor_channel_data channel_data[ZMK_SENSOR_EVENT_MAX_CHANNELS];
} __packed;
struct zmk_split_run_behavior_data {
uint8_t position;
uint8_t source;
uint8_t state;
uint32_t param1;
uint32_t param2;
} __packed;
struct zmk_split_run_behavior_payload {
struct zmk_split_run_behavior_data data;
char behavior_dev[ZMK_SPLIT_RUN_BEHAVIOR_DEV_LEN];
} __packed;
struct zmk_split_input_event_payload {
uint8_t type;
uint16_t code;
uint32_t value;
uint8_t sync;
} __packed;
int zmk_split_bt_position_pressed(uint8_t position);
int zmk_split_bt_position_released(uint8_t position);
int zmk_split_bt_sensor_triggered(uint8_t sensor_index,
const struct zmk_sensor_channel_data channel_data[],
size_t channel_data_size);
int zmk_split_bt_report_input(uint8_t reg, uint8_t type, uint16_t code, int32_t value, bool sync);