Initial rework of steno feature (#26273)

This commit is contained in:
Joel Challis
2026-08-25 17:15:01 +01:00
committed by GitHub
parent 4b2c8b31b1
commit 4dfef5c638
21 changed files with 1554 additions and 403 deletions
+64 -112
View File
@@ -1,119 +1,71 @@
/* Copyright 2017 Joseph Wasson
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Copyright 2026 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "keycodes.h"
// List of keycodes for the steno keyboard. To prevent
// errors, this must be <= 42 total entries in order to
// support the GeminiPR protocol.
enum steno_keycodes {
STN__MIN = QK_STENO,
STN_FN = STN__MIN,
STN_NUM,
STN_N1 = STN_NUM,
STN_N2,
STN_N3,
STN_N4,
STN_N5,
STN_N6,
STN_SL,
STN_S1 = STN_SL,
STN_S2,
STN_TL,
STN_KL,
STN_PL,
STN_WL,
STN_HL,
STN_RL,
STN_A,
STN_O,
STN_STR,
STN_ST1 = STN_STR,
STN_ST2,
STN_RES1,
STN_RE1 = STN_RES1,
STN_RES2,
STN_RE2 = STN_RES2,
STN_PWR,
STN_ST3,
STN_ST4,
STN_E,
STN_U,
STN_FR,
STN_RR,
STN_PR,
STN_BR,
STN_LR,
STN_GR,
STN_TR,
STN_SR,
STN_DR,
STN_N7,
STN_N8,
STN_N9,
STN_NA,
STN_NB,
STN_NC,
STN_ZR,
STN__MAX = STN_ZR, // must be less than QK_STENO_BOLT
};
// Deprecated steno keycodes
#define STN_FN QK_STENO_FUNCTION
#define STN_N1 QK_STENO_N1
#define STN_N2 QK_STENO_N2
#define STN_N3 QK_STENO_N3
#define STN_N4 QK_STENO_N4
#define STN_N5 QK_STENO_N5
#define STN_N6 QK_STENO_N6
#define STN_S1 QK_STENO_S1
#define STN_S2 QK_STENO_S2
#define STN_TL QK_STENO_TL
#define STN_KL QK_STENO_KL
#define STN_PL QK_STENO_PL
#define STN_WL QK_STENO_WL
#define STN_HL QK_STENO_HL
#define STN_RL QK_STENO_RL
#define STN_A QK_STENO_A
#define STN_O QK_STENO_O
#define STN_ST1 QK_STENO_ST1
#define STN_ST2 QK_STENO_ST2
#define STN_RE1 QK_STENO_RESET1
#define STN_RE2 QK_STENO_RESET2
#define STN_PWR QK_STENO_POWER
#define STN_ST3 QK_STENO_ST3
#define STN_ST4 QK_STENO_ST4
#define STN_E QK_STENO_E
#define STN_U QK_STENO_U
#define STN_FR QK_STENO_FR
#define STN_RR QK_STENO_RR
#define STN_PR QK_STENO_PR
#define STN_BR QK_STENO_BR
#define STN_LR QK_STENO_LR
#define STN_GR QK_STENO_GR
#define STN_TR QK_STENO_TR
#define STN_SR QK_STENO_SR
#define STN_DR QK_STENO_DR
#define STN_N7 QK_STENO_N7
#define STN_N8 QK_STENO_N8
#define STN_N9 QK_STENO_N9
#define STN_NA QK_STENO_NA
#define STN_NB QK_STENO_NB
#define STN_NC QK_STENO_NC
#define STN_ZR QK_STENO_ZR
#ifdef STENO_COMBINEDMAP
enum steno_combined_keycodes {
STN_S3 = QK_STENO_COMB,
STN_TKL,
STN_PWL,
STN_HRL,
STN_FRR,
STN_PBR,
STN_LGR,
STN_TSR,
STN_DZR,
STN_AO,
STN_EU,
STN_COMB_MAX = STN_EU,
};
#endif
#define STN_NUM QK_STENO_N1
#define STN_SL QK_STENO_S1
#define STN_STR QK_STENO_ST1
#define STN_RES1 QK_STENO_RESET1
#define STN_RES2 QK_STENO_RESET2
#ifdef STENO_ENABLE_BOLT
// TxBolt Codes
# define TXB_NUL 0
# define TXB_S_L 0b00000001
# define TXB_T_L 0b00000010
# define TXB_K_L 0b00000100
# define TXB_P_L 0b00001000
# define TXB_W_L 0b00010000
# define TXB_H_L 0b00100000
# define TXB_R_L 0b01000001
# define TXB_A_L 0b01000010
# define TXB_O_L 0b01000100
# define TXB_STR 0b01001000
# define TXB_E_R 0b01010000
# define TXB_U_R 0b01100000
# define TXB_F_R 0b10000001
# define TXB_R_R 0b10000010
# define TXB_P_R 0b10000100
# define TXB_B_R 0b10001000
# define TXB_L_R 0b10010000
# define TXB_G_R 0b10100000
# define TXB_T_R 0b11000001
# define TXB_S_R 0b11000010
# define TXB_D_R 0b11000100
# define TXB_Z_R 0b11001000
# define TXB_NUM 0b11010000
#endif // STENO_ENABLE_BOLT
#define STN_S3 QK_STENO_S3
#define STN_TKL QK_STENO_TKL
#define STN_PWL QK_STENO_PWL
#define STN_HRL QK_STENO_HRL
#define STN_FRR QK_STENO_FRR
#define STN_PBR QK_STENO_PBR
#define STN_LGR QK_STENO_LGR
#define STN_TSR QK_STENO_TSR
#define STN_DZR QK_STENO_DZR
#define STN_AO QK_STENO_AO
#define STN_EU QK_STENO_EU
#define QK_STENO_BOLT QK_STENO_MODE_BOLT
#define QK_STENO_GEMINI QK_STENO_MODE_GEMINI