diff options
Diffstat (limited to 'quantum/process_keycode/process_steno.c')
| -rw-r--r-- | quantum/process_keycode/process_steno.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 5d0bb313b4..12ee898212 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c | |||
| @@ -102,11 +102,17 @@ void steno_set_mode(steno_mode_t new_mode) { | |||
| 102 | /* override to intercept chords right before they get sent. | 102 | /* override to intercept chords right before they get sent. |
| 103 | * return zero to suppress normal sending behavior. | 103 | * return zero to suppress normal sending behavior. |
| 104 | */ | 104 | */ |
| 105 | __attribute__((weak)) bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { return true; } | 105 | __attribute__((weak)) bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { |
| 106 | return true; | ||
| 107 | } | ||
| 106 | 108 | ||
| 107 | __attribute__((weak)) bool postprocess_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed) { return true; } | 109 | __attribute__((weak)) bool postprocess_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed) { |
| 110 | return true; | ||
| 111 | } | ||
| 108 | 112 | ||
| 109 | __attribute__((weak)) bool process_steno_user(uint16_t keycode, keyrecord_t *record) { return true; } | 113 | __attribute__((weak)) bool process_steno_user(uint16_t keycode, keyrecord_t *record) { |
| 114 | return true; | ||
| 115 | } | ||
| 110 | 116 | ||
| 111 | static void send_steno_chord(void) { | 117 | static void send_steno_chord(void) { |
| 112 | if (send_steno_chord_user(mode, chord)) { | 118 | if (send_steno_chord_user(mode, chord)) { |
| @@ -114,11 +120,11 @@ static void send_steno_chord(void) { | |||
| 114 | case STENO_MODE_BOLT: | 120 | case STENO_MODE_BOLT: |
| 115 | send_steno_state(BOLT_STATE_SIZE, false); | 121 | send_steno_state(BOLT_STATE_SIZE, false); |
| 116 | #ifdef VIRTSER_ENABLE | 122 | #ifdef VIRTSER_ENABLE |
| 117 | virtser_send(0); // terminating byte | 123 | virtser_send(0); // terminating byte |
| 118 | #endif | 124 | #endif |
| 119 | break; | 125 | break; |
| 120 | case STENO_MODE_GEMINI: | 126 | case STENO_MODE_GEMINI: |
| 121 | chord[0] |= 0x80; // Indicate start of packet | 127 | chord[0] |= 0x80; // Indicate start of packet |
| 122 | send_steno_state(GEMINI_STATE_SIZE, true); | 128 | send_steno_state(GEMINI_STATE_SIZE, true); |
| 123 | break; | 129 | break; |
| 124 | } | 130 | } |
| @@ -126,9 +132,13 @@ static void send_steno_chord(void) { | |||
| 126 | steno_clear_state(); | 132 | steno_clear_state(); |
| 127 | } | 133 | } |
| 128 | 134 | ||
| 129 | uint8_t *steno_get_state(void) { return &state[0]; } | 135 | uint8_t *steno_get_state(void) { |
| 136 | return &state[0]; | ||
| 137 | } | ||
| 130 | 138 | ||
| 131 | uint8_t *steno_get_chord(void) { return &chord[0]; } | 139 | uint8_t *steno_get_chord(void) { |
| 140 | return &chord[0]; | ||
| 141 | } | ||
| 132 | 142 | ||
| 133 | static bool update_state_bolt(uint8_t key, bool press) { | 143 | static bool update_state_bolt(uint8_t key, bool press) { |
| 134 | uint8_t boltcode = pgm_read_byte(boltmap + key); | 144 | uint8_t boltcode = pgm_read_byte(boltmap + key); |
