process_steno.h (1229B)
1 /* Copyright 2017 Joseph Wasson 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */ 16 17 #pragma once 18 19 #include <stdint.h> 20 #include <stdbool.h> 21 #include "action.h" 22 #include "steno_keycodes.h" 23 24 #define BOLT_STROKE_SIZE 4 25 #define GEMINI_STROKE_SIZE 6 26 27 #ifdef STENO_ENABLE_GEMINI 28 # define MAX_STROKE_SIZE GEMINI_STROKE_SIZE 29 #else 30 # define MAX_STROKE_SIZE BOLT_STROKE_SIZE 31 #endif 32 33 typedef enum { 34 STENO_MODE_GEMINI, 35 STENO_MODE_BOLT, 36 } steno_mode_t; 37 38 bool process_steno(uint16_t keycode, keyrecord_t *record); 39 #ifdef STENO_ENABLE_ALL 40 void steno_init(void); 41 void steno_set_mode(steno_mode_t mode); 42 #endif // STENO_ENABLE_ALL