Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot
2026-08-27 01:13:46 +00:00
7 changed files with 216 additions and 343 deletions
+5
View File
@@ -108,6 +108,11 @@ ifeq ($(strip $(STENO_ENABLE)), yes)
$(call CATASTROPHIC_ERROR,Invalid STENO_PROTOCOL,STENO_PROTOCOL="$(STENO_PROTOCOL)" is not a valid stenography protocol)
endif
ifeq ($(strip $(PLOVER_HID_ENABLE)), yes)
$(call WARNING_MESSAGE, PLOVER_HID_ENABLE is mutually exclusive with STENO_ENABLE and will be disabled)
override PLOVER_HID_ENABLE = no
endif
ifeq ($(strip $(STENO_PROTOCOL)), all)
override STENO_PROTOCOL := $(filter-out all,$(VALID_STENO_PROTOCOL_TYPES))
OPT_DEFS += -DSTENO_ENABLE_ALL
@@ -1,265 +0,0 @@
{
"ranges": {
"0x5A40/0x003F": {
"define": "QK_PLOVER_HID"
}
},
"keycodes": {
"0x5A40": {
"group": "plover_hid",
"key": "PLV_S1"
},
"0x5A41": {
"group": "plover_hid",
"key": "PLV_TL"
},
"0x5A42": {
"group": "plover_hid",
"key": "PLV_KL"
},
"0x5A43": {
"group": "plover_hid",
"key": "PLV_PL"
},
"0x5A44": {
"group": "plover_hid",
"key": "PLV_WL"
},
"0x5A45": {
"group": "plover_hid",
"key": "PLV_HL"
},
"0x5A46": {
"group": "plover_hid",
"key": "PLV_RL"
},
"0x5A47": {
"group": "plover_hid",
"key": "PLV_A"
},
"0x5A48": {
"group": "plover_hid",
"key": "PLV_O"
},
"0x5A49": {
"group": "plover_hid",
"key": "PLV_ST1"
},
"0x5A4A": {
"group": "plover_hid",
"key": "PLV_E"
},
"0x5A4B": {
"group": "plover_hid",
"key": "PLV_U"
},
"0x5A4C": {
"group": "plover_hid",
"key": "PLV_FR"
},
"0x5A4D": {
"group": "plover_hid",
"key": "PLV_RR"
},
"0x5A4E": {
"group": "plover_hid",
"key": "PLV_PR"
},
"0x5A4F": {
"group": "plover_hid",
"key": "PLV_BR"
},
"0x5A50": {
"group": "plover_hid",
"key": "PLV_LR"
},
"0x5A51": {
"group": "plover_hid",
"key": "PLV_GR"
},
"0x5A52": {
"group": "plover_hid",
"key": "PLV_TR"
},
"0x5A53": {
"group": "plover_hid",
"key": "PLV_SR"
},
"0x5A54": {
"group": "plover_hid",
"key": "PLV_DR"
},
"0x5A55": {
"group": "plover_hid",
"key": "PLV_ZR"
},
"0x5A56": {
"group": "plover_hid",
"key": "PLV_N1"
},
"0x5A57": {
"group": "plover_hid",
"key": "PLV_S2"
},
"0x5A58": {
"group": "plover_hid",
"key": "PLV_ST2"
},
"0x5A59": {
"group": "plover_hid",
"key": "PLV_ST3"
},
"0x5A5A": {
"group": "plover_hid",
"key": "PLV_ST4"
},
"0x5A5B": {
"group": "plover_hid",
"key": "PLV_N2"
},
"0x5A5C": {
"group": "plover_hid",
"key": "PLV_N3"
},
"0x5A5D": {
"group": "plover_hid",
"key": "PLV_N4"
},
"0x5A5E": {
"group": "plover_hid",
"key": "PLV_N5"
},
"0x5A5F": {
"group": "plover_hid",
"key": "PLV_N6"
},
"0x5A60": {
"group": "plover_hid",
"key": "PLV_N7"
},
"0x5A61": {
"group": "plover_hid",
"key": "PLV_N8"
},
"0x5A62": {
"group": "plover_hid",
"key": "PLV_N9"
},
"0x5A63": {
"group": "plover_hid",
"key": "PLV_NA"
},
"0x5A64": {
"group": "plover_hid",
"key": "PLV_NB"
},
"0x5A65": {
"group": "plover_hid",
"key": "PLV_NC"
},
"0x5A66": {
"group": "plover_hid",
"key": "PLV_X1"
},
"0x5A67": {
"group": "plover_hid",
"key": "PLV_X2"
},
"0x5A68": {
"group": "plover_hid",
"key": "PLV_X3"
},
"0x5A69": {
"group": "plover_hid",
"key": "PLV_X4"
},
"0x5A6A": {
"group": "plover_hid",
"key": "PLV_X5"
},
"0x5A6B": {
"group": "plover_hid",
"key": "PLV_X6"
},
"0x5A6C": {
"group": "plover_hid",
"key": "PLV_X7"
},
"0x5A6D": {
"group": "plover_hid",
"key": "PLV_X8"
},
"0x5A6E": {
"group": "plover_hid",
"key": "PLV_X9"
},
"0x5A6F": {
"group": "plover_hid",
"key": "PLV_X10"
},
"0x5A70": {
"group": "plover_hid",
"key": "PLV_X11"
},
"0x5A71": {
"group": "plover_hid",
"key": "PLV_X12"
},
"0x5A72": {
"group": "plover_hid",
"key": "PLV_X13"
},
"0x5A73": {
"group": "plover_hid",
"key": "PLV_X14"
},
"0x5A74": {
"group": "plover_hid",
"key": "PLV_X15"
},
"0x5A75": {
"group": "plover_hid",
"key": "PLV_X16"
},
"0x5A76": {
"group": "plover_hid",
"key": "PLV_X17"
},
"0x5A77": {
"group": "plover_hid",
"key": "PLV_X18"
},
"0x5A78": {
"group": "plover_hid",
"key": "PLV_X19"
},
"0x5A79": {
"group": "plover_hid",
"key": "PLV_X20"
},
"0x5A7A": {
"group": "plover_hid",
"key": "PLV_X21"
},
"0x5A7B": {
"group": "plover_hid",
"key": "PLV_X22"
},
"0x5A7C": {
"group": "plover_hid",
"key": "PLV_X23"
},
"0x5A7D": {
"group": "plover_hid",
"key": "PLV_X24"
},
"0x5A7E": {
"group": "plover_hid",
"key": "PLV_X25"
},
"0x5A7F": {
"group": "plover_hid",
"key": "PLV_X26"
}
}
}
+41 -4
View File
@@ -97,19 +97,21 @@ Examples of steno strokes and the associated packet:
This mode operates independently of the other Steno "official" machine protocols. Like any other mouse or keyboard, it uses the USB HID protocol to communicate with Plover by sending an 8 byte (64 bit) packet representing a bitfield for all the possible keys on a steno machine plus a number of additional general purpose keys for custom use. This protocol is only understood by Plover as of [5.1.0](https://github.com/opensteno/plover/releases/tag/v5.1.0).
Add
To enable this functionality, add the following lines to your `rules.mk`:
```make
PLOVER_HID_ENABLE = yes
```
to your `rules.mk` file. This does **not** require `STENO_ENABLE` to be set.
::: warning
The Plover HID Protocol is currently mutually exclusive with the other steno protocols and will be disabled when `STENO_ENABLE` is set.
:::
All of the possible keycodes are defined with the `PLV_` prefix and are available without any additional includes.
All of the possible keycodes are defined with the `ST_` prefix and are available without any additional includes.
More details can be found here: https://github.com/dnaq/plover-machine-hid
### Switching protocols on the fly {#switching-protocols-on-the-fly}
## Switching protocols on the fly {#switching-protocols-on-the-fly}
If you wish to switch the serial protocol used to transfer the steno chords without having to recompile your keyboard firmware every time, you can press one of the [mode keycodes](#keycode-reference-mode) in order to switch protocols on the fly.
@@ -249,6 +251,41 @@ TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK
| `QK_STENO_RESET2` | `ST_RES2` | | (Reset 2) |
| `QK_STENO_POWER` | `ST_PWR` | | (Power) |
### Protocol Specific {#keycode-reference-protocol-specific}
#### Plover HID {#keycode-reference-plover-hid}
Additional keycodes available for the [Plover HID Protocol](#plover-hid-protocol):
| Key | Aliases | Description |
|----------------|----------|-------------------------------------|
| `QK_STENO_X1` | `ST_X1` | Extra button 1 (Protocol specific) |
| `QK_STENO_X2` | `ST_X2` | Extra button 2 (Protocol specific) |
| `QK_STENO_X3` | `ST_X3` | Extra button 3 (Protocol specific) |
| `QK_STENO_X4` | `ST_X4` | Extra button 4 (Protocol specific) |
| `QK_STENO_X5` | `ST_X5` | Extra button 5 (Protocol specific) |
| `QK_STENO_X6` | `ST_X6` | Extra button 6 (Protocol specific) |
| `QK_STENO_X7` | `ST_X7` | Extra button 7 (Protocol specific) |
| `QK_STENO_X8` | `ST_X8` | Extra button 8 (Protocol specific) |
| `QK_STENO_X9` | `ST_X9` | Extra button 9 (Protocol specific) |
| `QK_STENO_X10` | `ST_X10` | Extra button 10 (Protocol specific) |
| `QK_STENO_X11` | `ST_X11` | Extra button 11 (Protocol specific) |
| `QK_STENO_X12` | `ST_X12` | Extra button 12 (Protocol specific) |
| `QK_STENO_X13` | `ST_X13` | Extra button 13 (Protocol specific) |
| `QK_STENO_X14` | `ST_X14` | Extra button 14 (Protocol specific) |
| `QK_STENO_X15` | `ST_X15` | Extra button 15 (Protocol specific) |
| `QK_STENO_X16` | `ST_X16` | Extra button 16 (Protocol specific) |
| `QK_STENO_X17` | `ST_X17` | Extra button 17 (Protocol specific) |
| `QK_STENO_X18` | `ST_X18` | Extra button 18 (Protocol specific) |
| `QK_STENO_X19` | `ST_X19` | Extra button 19 (Protocol specific) |
| `QK_STENO_X20` | `ST_X20` | Extra button 20 (Protocol specific) |
| `QK_STENO_X21` | `ST_X21` | Extra button 21 (Protocol specific) |
| `QK_STENO_X22` | `ST_X22` | Extra button 22 (Protocol specific) |
| `QK_STENO_X23` | `ST_X23` | Extra button 23 (Protocol specific) |
| `QK_STENO_X24` | `ST_X24` | Extra button 24 (Protocol specific) |
| `QK_STENO_X25` | `ST_X25` | Extra button 25 (Protocol specific) |
| `QK_STENO_X26` | `ST_X26` | Extra button 26 (Protocol specific) |
### Combined Map {#keycode-reference-combinedmap}
If you do not want to hit two keys with one finger combined keycodes can be used. These cause both keys to be reported as pressed or released. To use these keycodes define `STENO_COMBINEDMAP` in your `config.h` file.
-69
View File
@@ -64,8 +64,6 @@ enum qk_keycode_ranges {
QK_SWAP_HANDS_MAX = 0x56FF,
QK_TAP_DANCE = 0x5700,
QK_TAP_DANCE_MAX = 0x57FF,
QK_PLOVER_HID = 0x5A40,
QK_PLOVER_HID_MAX = 0x5A7F,
QK_MAGIC = 0x7000,
QK_MAGIC_MAX = 0x70FF,
QK_MIDI = 0x7100,
@@ -331,70 +329,6 @@ enum qk_keycode_defines {
QK_SWAP_HANDS_OFF = 0x56F4,
QK_SWAP_HANDS_ON = 0x56F5,
QK_SWAP_HANDS_ONE_SHOT = 0x56F6,
PLV_S1 = 0x5A40,
PLV_TL = 0x5A41,
PLV_KL = 0x5A42,
PLV_PL = 0x5A43,
PLV_WL = 0x5A44,
PLV_HL = 0x5A45,
PLV_RL = 0x5A46,
PLV_A = 0x5A47,
PLV_O = 0x5A48,
PLV_ST1 = 0x5A49,
PLV_E = 0x5A4A,
PLV_U = 0x5A4B,
PLV_FR = 0x5A4C,
PLV_RR = 0x5A4D,
PLV_PR = 0x5A4E,
PLV_BR = 0x5A4F,
PLV_LR = 0x5A50,
PLV_GR = 0x5A51,
PLV_TR = 0x5A52,
PLV_SR = 0x5A53,
PLV_DR = 0x5A54,
PLV_ZR = 0x5A55,
PLV_N1 = 0x5A56,
PLV_S2 = 0x5A57,
PLV_ST2 = 0x5A58,
PLV_ST3 = 0x5A59,
PLV_ST4 = 0x5A5A,
PLV_N2 = 0x5A5B,
PLV_N3 = 0x5A5C,
PLV_N4 = 0x5A5D,
PLV_N5 = 0x5A5E,
PLV_N6 = 0x5A5F,
PLV_N7 = 0x5A60,
PLV_N8 = 0x5A61,
PLV_N9 = 0x5A62,
PLV_NA = 0x5A63,
PLV_NB = 0x5A64,
PLV_NC = 0x5A65,
PLV_X1 = 0x5A66,
PLV_X2 = 0x5A67,
PLV_X3 = 0x5A68,
PLV_X4 = 0x5A69,
PLV_X5 = 0x5A6A,
PLV_X6 = 0x5A6B,
PLV_X7 = 0x5A6C,
PLV_X8 = 0x5A6D,
PLV_X9 = 0x5A6E,
PLV_X10 = 0x5A6F,
PLV_X11 = 0x5A70,
PLV_X12 = 0x5A71,
PLV_X13 = 0x5A72,
PLV_X14 = 0x5A73,
PLV_X15 = 0x5A74,
PLV_X16 = 0x5A75,
PLV_X17 = 0x5A76,
PLV_X18 = 0x5A77,
PLV_X19 = 0x5A78,
PLV_X20 = 0x5A79,
PLV_X21 = 0x5A7A,
PLV_X22 = 0x5A7B,
PLV_X23 = 0x5A7C,
PLV_X24 = 0x5A7D,
PLV_X25 = 0x5A7E,
PLV_X26 = 0x5A7F,
QK_MAGIC_SWAP_CONTROL_CAPS_LOCK = 0x7000,
QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK = 0x7001,
QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK = 0x7002,
@@ -1716,7 +1650,6 @@ enum qk_keycode_defines {
#define IS_QK_PERSISTENT_DEF_LAYER(code) ((code) >= QK_PERSISTENT_DEF_LAYER && (code) <= QK_PERSISTENT_DEF_LAYER_MAX)
#define IS_QK_SWAP_HANDS(code) ((code) >= QK_SWAP_HANDS && (code) <= QK_SWAP_HANDS_MAX)
#define IS_QK_TAP_DANCE(code) ((code) >= QK_TAP_DANCE && (code) <= QK_TAP_DANCE_MAX)
#define IS_QK_PLOVER_HID(code) ((code) >= QK_PLOVER_HID && (code) <= QK_PLOVER_HID_MAX)
#define IS_QK_MAGIC(code) ((code) >= QK_MAGIC && (code) <= QK_MAGIC_MAX)
#define IS_QK_MIDI(code) ((code) >= QK_MIDI && (code) <= QK_MIDI_MAX)
#define IS_QK_SEQUENCER(code) ((code) >= QK_SEQUENCER && (code) <= QK_SEQUENCER_MAX)
@@ -1743,7 +1676,6 @@ enum qk_keycode_defines {
#define IS_MOUSE_KEYCODE(code) ((code) >= QK_MOUSE_CURSOR_UP && (code) <= QK_MOUSE_ACCELERATION_2)
#define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI)
#define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT)
#define IS_PLOVER_HID_KEYCODE(code) ((code) >= PLV_S1 && (code) <= PLV_X26)
#define IS_MAGIC_KEYCODE(code) ((code) >= QK_MAGIC_SWAP_CONTROL_CAPS_LOCK && (code) <= QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK)
#define IS_MIDI_KEYCODE(code) ((code) >= QK_MIDI_ON && (code) <= QK_MIDI_PITCH_BEND_UP)
#define IS_SEQUENCER_KEYCODE(code) ((code) >= QK_SEQUENCER_ON && (code) <= QK_SEQUENCER_STEPS_CLEAR)
@@ -1770,7 +1702,6 @@ enum qk_keycode_defines {
#define MOUSE_KEYCODE_RANGE QK_MOUSE_CURSOR_UP ... QK_MOUSE_ACCELERATION_2
#define MODIFIER_KEYCODE_RANGE KC_LEFT_CTRL ... KC_RIGHT_GUI
#define SWAP_HANDS_KEYCODE_RANGE QK_SWAP_HANDS_TOGGLE ... QK_SWAP_HANDS_ONE_SHOT
#define PLOVER_HID_KEYCODE_RANGE PLV_S1 ... PLV_X26
#define MAGIC_KEYCODE_RANGE QK_MAGIC_SWAP_CONTROL_CAPS_LOCK ... QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK
#define MIDI_KEYCODE_RANGE QK_MIDI_ON ... QK_MIDI_PITCH_BEND_UP
#define SEQUENCER_KEYCODE_RANGE QK_SEQUENCER_ON ... QK_SEQUENCER_STEPS_CLEAR
+7 -3
View File
@@ -21,14 +21,17 @@
#include "host.h"
#include "compiler_support.h"
// The button index handed to plover_hid_update() is `keycode - QK_PLOVER_HID`, so the report's
// data field must hold a bit for every keycode in the range or the bit-packing below overflows.
STATIC_ASSERT(sizeof(((report_plover_hid_t *)0)->data) * CHAR_BIT >= (QK_PLOVER_HID_MAX - QK_PLOVER_HID + 1), "Plover HID report data too small for the QK_PLOVER_HID keycode range");
// Data field must hold a bit for every button in the range or the bit-packing below overflows.
STATIC_ASSERT(sizeof(((report_plover_hid_t *)0)->data) * CHAR_BIT >= PLV_BTN_COUNT, "Plover HID report data too small for the button range");
static report_plover_hid_t plover_hid_report = {.report_id = REPORT_ID_PLOVER_HID};
static bool plover_hid_report_updated = false;
void plover_hid_update(uint8_t button, bool pressed) {
if (button >= PLV_BTN_COUNT) {
return;
}
if (pressed) {
plover_hid_report.data[button / 8] |= (1 << (7 - (button % 8)));
} else {
@@ -41,6 +44,7 @@ void plover_hid_task(void) {
if (!plover_hid_report_updated) {
return;
}
host_plover_hid_send(&plover_hid_report);
plover_hid_report_updated = false;
}
+75
View File
@@ -19,5 +19,80 @@
#include <stdint.h>
#include <stdbool.h>
/**
* \enum plover_hid_button_t
*
* An enumeration of the possible Plover HID bit indexes.
*
* \note Index order is protocol-mandated and must match plover-machine-hid STENO_KEY_CHART position.
*/
typedef enum {
PLV_BTN_S1,
PLV_BTN_TL,
PLV_BTN_KL,
PLV_BTN_PL,
PLV_BTN_WL,
PLV_BTN_HL,
PLV_BTN_RL,
PLV_BTN_A,
PLV_BTN_O,
PLV_BTN_ST1,
PLV_BTN_E,
PLV_BTN_U,
PLV_BTN_FR,
PLV_BTN_RR,
PLV_BTN_PR,
PLV_BTN_BR,
PLV_BTN_LR,
PLV_BTN_GR,
PLV_BTN_TR,
PLV_BTN_SR,
PLV_BTN_DR,
PLV_BTN_ZR,
PLV_BTN_N1,
PLV_BTN_S2,
PLV_BTN_ST2,
PLV_BTN_ST3,
PLV_BTN_ST4,
PLV_BTN_N2,
PLV_BTN_N3,
PLV_BTN_N4,
PLV_BTN_N5,
PLV_BTN_N6,
PLV_BTN_N7,
PLV_BTN_N8,
PLV_BTN_N9,
PLV_BTN_NA,
PLV_BTN_NB,
PLV_BTN_NC,
PLV_BTN_X1,
PLV_BTN_X2,
PLV_BTN_X3,
PLV_BTN_X4,
PLV_BTN_X5,
PLV_BTN_X6,
PLV_BTN_X7,
PLV_BTN_X8,
PLV_BTN_X9,
PLV_BTN_X10,
PLV_BTN_X11,
PLV_BTN_X12,
PLV_BTN_X13,
PLV_BTN_X14,
PLV_BTN_X15,
PLV_BTN_X16,
PLV_BTN_X17,
PLV_BTN_X18,
PLV_BTN_X19,
PLV_BTN_X20,
PLV_BTN_X21,
PLV_BTN_X22,
PLV_BTN_X23,
PLV_BTN_X24,
PLV_BTN_X25,
PLV_BTN_X26,
PLV_BTN_COUNT, // Number of available buttons (always leave at the end)
} plover_hid_button_t;
void plover_hid_update(uint8_t button, bool pressed);
void plover_hid_task(void);
+88 -2
View File
@@ -16,11 +16,97 @@
#include "process_plover_hid.h"
#include "plover_hid.h"
#include "progmem.h"
#include "util.h"
#include "compiler_support.h"
#define PLV_INVALID 0xFF
// clang-format off
static const uint8_t key_to_plover_hid[] PROGMEM = {
PLV_INVALID, // QK_STENO_FUNCTION - Ignore
PLV_BTN_N1, // QK_STENO_N1
PLV_BTN_N2, // QK_STENO_N2
PLV_BTN_N3, // QK_STENO_N3
PLV_BTN_N4, // QK_STENO_N4
PLV_BTN_N5, // QK_STENO_N5
PLV_BTN_N6, // QK_STENO_N6
PLV_BTN_S1, // QK_STENO_S1
PLV_BTN_S2, // QK_STENO_S2
PLV_BTN_TL, // QK_STENO_TL
PLV_BTN_KL, // QK_STENO_KL
PLV_BTN_PL, // QK_STENO_PL
PLV_BTN_WL, // QK_STENO_WL
PLV_BTN_HL, // QK_STENO_HL
PLV_BTN_RL, // QK_STENO_RL
PLV_BTN_A, // QK_STENO_A
PLV_BTN_O, // QK_STENO_O
PLV_BTN_ST1, // QK_STENO_ST1
PLV_BTN_ST2, // QK_STENO_ST2
PLV_INVALID, // QK_STENO_RESET1 - Ignore
PLV_INVALID, // QK_STENO_RESET2 - Ignore
PLV_INVALID, // QK_STENO_POWER - Ignore
PLV_BTN_ST3, // QK_STENO_ST3
PLV_BTN_ST4, // QK_STENO_ST4
PLV_BTN_E, // QK_STENO_E
PLV_BTN_U, // QK_STENO_U
PLV_BTN_FR, // QK_STENO_FR
PLV_BTN_RR, // QK_STENO_RR
PLV_BTN_PR, // QK_STENO_PR
PLV_BTN_BR, // QK_STENO_BR
PLV_BTN_LR, // QK_STENO_LR
PLV_BTN_GR, // QK_STENO_GR
PLV_BTN_TR, // QK_STENO_TR
PLV_BTN_SR, // QK_STENO_SR
PLV_BTN_DR, // QK_STENO_DR
PLV_BTN_N7, // QK_STENO_N7
PLV_BTN_N8, // QK_STENO_N8
PLV_BTN_N9, // QK_STENO_N9
PLV_BTN_NA, // QK_STENO_NA
PLV_BTN_NB, // QK_STENO_NB
PLV_BTN_NC, // QK_STENO_NC
PLV_BTN_ZR, // QK_STENO_ZR
PLV_BTN_X1, // QK_STENO_X1
PLV_BTN_X2, // QK_STENO_X2
PLV_BTN_X3, // QK_STENO_X3
PLV_BTN_X4, // QK_STENO_X4
PLV_BTN_X5, // QK_STENO_X5
PLV_BTN_X6, // QK_STENO_X6
PLV_BTN_X7, // QK_STENO_X7
PLV_BTN_X8, // QK_STENO_X8
PLV_BTN_X9, // QK_STENO_X9
PLV_BTN_X10, // QK_STENO_X10
PLV_BTN_X11, // QK_STENO_X11
PLV_BTN_X12, // QK_STENO_X12
PLV_BTN_X13, // QK_STENO_X13
PLV_BTN_X14, // QK_STENO_X14
PLV_BTN_X15, // QK_STENO_X15
PLV_BTN_X16, // QK_STENO_X16
PLV_BTN_X17, // QK_STENO_X17
PLV_BTN_X18, // QK_STENO_X18
PLV_BTN_X19, // QK_STENO_X19
PLV_BTN_X20, // QK_STENO_X20
PLV_BTN_X21, // QK_STENO_X21
PLV_BTN_X22, // QK_STENO_X22
PLV_BTN_X23, // QK_STENO_X23
PLV_BTN_X24, // QK_STENO_X24
PLV_BTN_X25, // QK_STENO_X25
PLV_BTN_X26, // QK_STENO_X26
};
// clang-format on
STATIC_ASSERT(ARRAY_SIZE(key_to_plover_hid) == (QK_STENO_X26 - QK_STENO + 1), "key_to_plover_hid array size must match number of steno keys");
bool process_plover_hid(uint16_t keycode, keyrecord_t *record) {
if (!IS_QK_PLOVER_HID(keycode)) {
if (keycode < QK_STENO_FUNCTION || keycode > QK_STENO_X26) {
return true;
}
plover_hid_update(keycode - QK_PLOVER_HID, record->event.pressed);
uint8_t button = pgm_read_byte(&key_to_plover_hid[keycode - QK_STENO]);
if (button == PLV_INVALID) {
return true;
}
plover_hid_update(button, record->event.pressed);
return false;
}