aboutsummaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_terminal.c
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-11-04 16:22:17 +1100
committerGitHub <noreply@github.com>2021-11-03 22:22:17 -0700
commitf529580860cf5a1de4afc10432f218a45daae17a (patch)
tree1d2fa041174f2586230ab831c05e5b56d8ba4f92 /quantum/process_keycode/process_terminal.c
parentb06d9d822cfb72e0728b11711a333f2f5d3c631e (diff)
downloadqmk_firmware-f529580860cf5a1de4afc10432f218a45daae17a.tar.gz
qmk_firmware-f529580860cf5a1de4afc10432f218a45daae17a.zip
Basic keycode overhaul (#14726)
Diffstat (limited to 'quantum/process_keycode/process_terminal.c')
-rw-r--r--quantum/process_keycode/process_terminal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/quantum/process_keycode/process_terminal.c b/quantum/process_keycode/process_terminal.c
index 7d1eefa9e..a059f3a52 100644
--- a/quantum/process_keycode/process_terminal.c
+++ b/quantum/process_keycode/process_terminal.c
@@ -257,12 +257,12 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
257 process_terminal_command(); 257 process_terminal_command();
258 return false; 258 return false;
259 break; 259 break;
260 case KC_ESC: 260 case KC_ESCAPE:
261 SEND_STRING("\n"); 261 SEND_STRING("\n");
262 enable_terminal(); 262 enable_terminal();
263 return false; 263 return false;
264 break; 264 break;
265 case KC_BSPC: 265 case KC_BACKSPACE:
266 str_len = strlen(buffer); 266 str_len = strlen(buffer);
267 if (str_len > 0) { 267 if (str_len > 0) {
268 buffer[str_len - 1] = 0; 268 buffer[str_len - 1] = 0;
@@ -284,7 +284,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
284 str_len = strlen(buffer); 284 str_len = strlen(buffer);
285 for (int i = 0; i < str_len; ++i) { 285 for (int i = 0; i < str_len; ++i) {
286 send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already 286 send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already
287 // process_terminal(KC_BSPC,record); 287 // process_terminal(KC_BACKSPACE,record);
288 } 288 }
289 strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 80); 289 strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 80);
290 290
@@ -299,7 +299,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
299 str_len = strlen(buffer); 299 str_len = strlen(buffer);
300 for (int i = 0; i < str_len; ++i) { 300 for (int i = 0; i < str_len; ++i) {
301 send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already 301 send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already
302 // process_terminal(KC_BSPC,record); 302 // process_terminal(KC_BACKSPACE,record);
303 } 303 }
304 strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 79); 304 strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 79);
305 305
@@ -311,7 +311,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
311 default: 311 default:
312 if (keycode <= 58) { 312 if (keycode <= 58) {
313 char_to_add = 0; 313 char_to_add = 0;
314 if (get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) { 314 if (get_mods() & (MOD_BIT(KC_LEFT_SHIFT) | MOD_BIT(KC_RIGHT_SHIFT))) {
315 char_to_add = shifted_keycode_to_ascii_lut[keycode]; 315 char_to_add = shifted_keycode_to_ascii_lut[keycode];
316 } else if (get_mods() == 0) { 316 } else if (get_mods() == 0) {
317 char_to_add = keycode_to_ascii_lut[keycode]; 317 char_to_add = keycode_to_ascii_lut[keycode];