Extended the virtual key position system from combos so that each sensor also gets a virtual key position. This allows sensor behaviors to use the behavior queue API.
20 lines
492 B
C
20 lines
492 B
C
/*
|
|
* Copyright (c) 2022 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <zmk/matrix.h>
|
|
#include <zmk/sensors.h>
|
|
|
|
/**
|
|
* Gets the virtual key position to use for the sensor with the given index.
|
|
*/
|
|
#define ZMK_VIRTUAL_KEY_POSITION_SENSOR(index) (ZMK_KEYMAP_LEN + (index))
|
|
|
|
/**
|
|
* Gets the virtual key position to use for the combo with the given index.
|
|
*/
|
|
#define ZMK_VIRTUAL_KEY_POSITION_COMBO(index) (ZMK_KEYMAP_LEN + ZMK_KEYMAP_SENSORS_LEN + (index))
|