diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/keymap_extras/sendstring_colemak.h | 41 | ||||
| -rw-r--r-- | quantum/keymap_extras/sendstring_dvorak.h | 41 | ||||
| -rw-r--r-- | quantum/keymap_extras/sendstring_jis.h | 58 | ||||
| -rw-r--r-- | quantum/quantum.c | 158 | ||||
| -rw-r--r-- | quantum/quantum.h | 3 |
5 files changed, 155 insertions, 146 deletions
diff --git a/quantum/keymap_extras/sendstring_colemak.h b/quantum/keymap_extras/sendstring_colemak.h new file mode 100644 index 000000000..fa9ace929 --- /dev/null +++ b/quantum/keymap_extras/sendstring_colemak.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* Copyright 2016 Jack Humbert | ||
| 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 | /* Sendstring definitions for the Colemak layout */ | ||
| 17 | #ifndef SENDSTRING_COLEMAK | ||
| 18 | #define SENDSTRING_COLEMAK | ||
| 19 | |||
| 20 | #include "keymap_colemak.h" | ||
| 21 | |||
| 22 | const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { | ||
| 23 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 24 | KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, | ||
| 25 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 26 | 0, 0, 0, KC_ESC, 0, 0, 0, 0, | ||
| 27 | KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, | ||
| 28 | KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, | ||
| 29 | KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, | ||
| 30 | KC_8, KC_9, CM_SCLN, CM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, | ||
| 31 | KC_2, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, | ||
| 32 | CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, | ||
| 33 | CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, | ||
| 34 | CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, | ||
| 35 | KC_GRV, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, | ||
| 36 | CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, | ||
| 37 | CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, | ||
| 38 | CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL | ||
| 39 | }; | ||
| 40 | |||
| 41 | #endif | ||
diff --git a/quantum/keymap_extras/sendstring_dvorak.h b/quantum/keymap_extras/sendstring_dvorak.h new file mode 100644 index 000000000..f5c5c818b --- /dev/null +++ b/quantum/keymap_extras/sendstring_dvorak.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* Copyright 2016 Jack Humbert | ||
| 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 | /* Sendstring definitions for the Dvorak layout */ | ||
| 17 | #ifndef SENDSTRING_DVORAK | ||
| 18 | #define SENDSTRING_DVORAK | ||
| 19 | |||
| 20 | #include "keymap_dvorak.h" | ||
| 21 | |||
| 22 | const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { | ||
| 23 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 24 | KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, | ||
| 25 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 26 | 0, 0, 0, KC_ESC, 0, 0, 0, 0, | ||
| 27 | KC_SPC, DV_1, DV_QUOT, DV_3, DV_4, DV_5, DV_7, DV_QUOT, | ||
| 28 | DV_9, DV_0, DV_8, DV_EQL, DV_COMM, DV_MINS, DV_DOT, DV_SLSH, | ||
| 29 | DV_0, DV_1, DV_2, DV_3, DV_4, DV_5, DV_6, DV_7, | ||
| 30 | DV_8, DV_9, DV_SCLN, DV_SCLN, DV_COMM, DV_EQL, DV_DOT, DV_SLSH, | ||
| 31 | DV_2, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, | ||
| 32 | DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, | ||
| 33 | DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, | ||
| 34 | DV_X, DV_Y, DV_Z, DV_LBRC, DV_BSLS, DV_RBRC, DV_6, DV_MINS, | ||
| 35 | DV_GRV, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, | ||
| 36 | DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, | ||
| 37 | DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, | ||
| 38 | DV_X, DV_Y, DV_Z, DV_LBRC, DV_BSLS, DV_RBRC, DV_GRV, KC_DEL | ||
| 39 | }; | ||
| 40 | |||
| 41 | #endif | ||
diff --git a/quantum/keymap_extras/sendstring_jis.h b/quantum/keymap_extras/sendstring_jis.h new file mode 100644 index 000000000..c5a38c6a5 --- /dev/null +++ b/quantum/keymap_extras/sendstring_jis.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* Copyright 2016 Jack Humbert | ||
| 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 | /* Sendstring definitions for the JIS keyboard layout */ | ||
| 17 | #ifndef SENDSTRING_JIS | ||
| 18 | #define SENDSTRING_JIS | ||
| 19 | |||
| 20 | const bool ascii_to_shift_lut[0x80] PROGMEM = { | ||
| 21 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 22 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 23 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 24 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 25 | 0, 1, 1, 1, 1, 1, 1, 1, | ||
| 26 | 1, 1, 1, 1, 0, 0, 0, 0, | ||
| 27 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 28 | 0, 0, 0, 0, 1, 1, 1, 1, | ||
| 29 | 0, 1, 1, 1, 1, 1, 1, 1, | ||
| 30 | 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 31 | 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 32 | 1, 1, 1, 0, 0, 0, 0, 1, | ||
| 33 | 1, 0, 0, 0, 0, 0, 0, 0, | ||
| 34 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 35 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 36 | 0, 0, 0, 1, 1, 1, 1, 0 | ||
| 37 | }; | ||
| 38 | |||
| 39 | const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { | ||
| 40 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 41 | KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, | ||
| 42 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 43 | 0, 0, 0, KC_ESC, 0, 0, 0, 0, | ||
| 44 | KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, | ||
| 45 | KC_8, KC_9, KC_QUOT, KC_SCLN, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, | ||
| 46 | KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, | ||
| 47 | KC_8, KC_9, KC_QUOT, KC_SCLN, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, | ||
| 48 | KC_LBRC, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, | ||
| 49 | KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, | ||
| 50 | KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, | ||
| 51 | KC_X, KC_Y, KC_Z, KC_RBRC, KC_JYEN, KC_BSLS, KC_EQL, KC_RO, | ||
| 52 | KC_LBRC, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, | ||
| 53 | KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, | ||
| 54 | KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, | ||
| 55 | KC_X, KC_Y, KC_Z, KC_RBRC, KC_JYEN, KC_BSLS, KC_EQL, KC_DEL, | ||
| 56 | }; | ||
| 57 | |||
| 58 | #endif | ||
diff --git a/quantum/quantum.c b/quantum/quantum.c index 5bb7b04d5..36e586d31 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -455,103 +455,8 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 455 | return process_action_kb(record); | 455 | return process_action_kb(record); |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | #ifdef JIS_KEYCODE | 458 | __attribute__ ((weak)) |
| 459 | static const uint16_t ascii_to_shift_lut[8] PROGMEM = { | 459 | const bool ascii_to_shift_lut[0x80] PROGMEM = { |
| 460 | 0x0000, /*0, 0, 0, 0, 0, 0, 0, 0, | ||
| 461 | 0, 0, 0, 0, 0, 0, 0, 0,*/ | ||
| 462 | 0x0000, /*0, 0, 0, 0, 0, 0, 0, 0, | ||
| 463 | 0, 0, 0, 0, 0, 0, 0, 0,*/ | ||
| 464 | 0x7ff0, /*0, 1, 1, 1, 1, 1, 1, 1, | ||
| 465 | 1, 1, 1, 1, 0, 0, 0, 0,*/ | ||
| 466 | 0x000f, /*0, 0, 0, 0, 0, 0, 0, 0, | ||
| 467 | 0, 0, 0, 0, 1, 1, 1, 1,*/ | ||
| 468 | 0x7fff, /*0, 1, 1, 1, 1, 1, 1, 1, | ||
| 469 | 1, 1, 1, 1, 1, 1, 1, 1,*/ | ||
| 470 | 0xffe1, /*1, 1, 1, 1, 1, 1, 1, 1, | ||
| 471 | 1, 1, 1, 0, 0, 0, 0, 1,*/ | ||
| 472 | 0x8000, /*1, 0, 0, 0, 0, 0, 0, 0, | ||
| 473 | 0, 0, 0, 0, 0, 0, 0, 0,*/ | ||
| 474 | 0x001e, /*0, 0, 0, 0, 0, 0, 0, 0, | ||
| 475 | 0, 0, 0, 1, 1, 1, 1, 0*/ | ||
| 476 | }; | ||
| 477 | |||
| 478 | static const struct { | ||
| 479 | uint8_t controls_0[16], | ||
| 480 | controls_1[16], | ||
| 481 | numerics[16], | ||
| 482 | alphabets_0[16], | ||
| 483 | alphabets_1[16]; | ||
| 484 | } lower_to_keycode PROGMEM = { | ||
| 485 | .controls_0 = { | ||
| 486 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 487 | KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, | ||
| 488 | }, | ||
| 489 | .controls_1 = { | ||
| 490 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 491 | 0, 0, 0, KC_ESC, 0, 0, 0, 0, | ||
| 492 | }, | ||
| 493 | .numerics = { | ||
| 494 | KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, | ||
| 495 | KC_8, KC_9, KC_QUOT, KC_SCLN, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, | ||
| 496 | }, | ||
| 497 | .alphabets_0 = { | ||
| 498 | KC_LBRC, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, | ||
| 499 | KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, | ||
| 500 | }, | ||
| 501 | .alphabets_1 = { | ||
| 502 | KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, | ||
| 503 | KC_X, KC_Y, KC_Z, KC_RBRC, KC_JYEN, KC_BSLS, KC_EQL, KC_RO, | ||
| 504 | }, | ||
| 505 | }; | ||
| 506 | static const uint8_t* ascii_to_keycode_lut[8] = { | ||
| 507 | lower_to_keycode.controls_0, | ||
| 508 | lower_to_keycode.controls_1, | ||
| 509 | lower_to_keycode.numerics, | ||
| 510 | lower_to_keycode.numerics, | ||
| 511 | lower_to_keycode.alphabets_0, | ||
| 512 | lower_to_keycode.alphabets_1, | ||
| 513 | lower_to_keycode.alphabets_0, | ||
| 514 | lower_to_keycode.alphabets_1 | ||
| 515 | }; | ||
| 516 | |||
| 517 | void send_string(const char *str) { | ||
| 518 | while (1) { | ||
| 519 | uint8_t keycode; | ||
| 520 | bool shift; | ||
| 521 | uint8_t ascii_code = pgm_read_byte(str); | ||
| 522 | |||
| 523 | if ( ascii_code == 0x00u ){ break; } | ||
| 524 | else if (ascii_code == 0x20u) { | ||
| 525 | keycode = KC_SPC; | ||
| 526 | shift = false; | ||
| 527 | } | ||
| 528 | else if (ascii_code == 0x7Fu) { | ||
| 529 | keycode = KC_DEL; | ||
| 530 | shift = false; | ||
| 531 | } | ||
| 532 | else { | ||
| 533 | int hi = ascii_code>>4 & 0x0f, | ||
| 534 | lo = ascii_code & 0x0f; | ||
| 535 | keycode = pgm_read_byte(&ascii_to_keycode_lut[hi][lo]); | ||
| 536 | shift = !!( pgm_read_word(&ascii_to_shift_lut[hi]) & (0x8000u>>lo) ); | ||
| 537 | } | ||
| 538 | |||
| 539 | if (shift) { | ||
| 540 | register_code(KC_LSFT); | ||
| 541 | register_code(keycode); | ||
| 542 | unregister_code(keycode); | ||
| 543 | unregister_code(KC_LSFT); | ||
| 544 | } | ||
| 545 | else { | ||
| 546 | register_code(keycode); | ||
| 547 | unregister_code(keycode); | ||
| 548 | } | ||
| 549 | ++str; | ||
| 550 | } | ||
| 551 | } | ||
| 552 | |||
| 553 | #else | ||
| 554 | static const bool ascii_to_qwerty_shift_lut[0x80] PROGMEM = { | ||
| 555 | 0, 0, 0, 0, 0, 0, 0, 0, | 460 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 556 | 0, 0, 0, 0, 0, 0, 0, 0, | 461 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 557 | 0, 0, 0, 0, 0, 0, 0, 0, | 462 | 0, 0, 0, 0, 0, 0, 0, 0, |
| @@ -570,7 +475,8 @@ static const bool ascii_to_qwerty_shift_lut[0x80] PROGMEM = { | |||
| 570 | 0, 0, 0, 1, 1, 1, 1, 0 | 475 | 0, 0, 0, 1, 1, 1, 1, 0 |
| 571 | }; | 476 | }; |
| 572 | 477 | ||
| 573 | static const uint8_t ascii_to_qwerty_keycode_lut[0x80] PROGMEM = { | 478 | __attribute__ ((weak)) |
| 479 | const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { | ||
| 574 | 0, 0, 0, 0, 0, 0, 0, 0, | 480 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 575 | KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, | 481 | KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, |
| 576 | 0, 0, 0, 0, 0, 0, 0, 0, | 482 | 0, 0, 0, 0, 0, 0, 0, 0, |
| @@ -590,12 +496,16 @@ static const uint8_t ascii_to_qwerty_keycode_lut[0x80] PROGMEM = { | |||
| 590 | }; | 496 | }; |
| 591 | 497 | ||
| 592 | void send_string(const char *str) { | 498 | void send_string(const char *str) { |
| 499 | send_string_with_delay(str, 0); | ||
| 500 | } | ||
| 501 | |||
| 502 | void send_string_with_delay(const char *str, uint8_t interval) { | ||
| 593 | while (1) { | 503 | while (1) { |
| 594 | uint8_t keycode; | 504 | uint8_t keycode; |
| 595 | uint8_t ascii_code = pgm_read_byte(str); | 505 | uint8_t ascii_code = pgm_read_byte(str); |
| 596 | if (!ascii_code) break; | 506 | if (!ascii_code) break; |
| 597 | keycode = pgm_read_byte(&ascii_to_qwerty_keycode_lut[ascii_code]); | 507 | keycode = pgm_read_byte(&ascii_to_keycode_lut[ascii_code]); |
| 598 | if (pgm_read_byte(&ascii_to_qwerty_shift_lut[ascii_code])) { | 508 | if (pgm_read_byte(&ascii_to_shift_lut[ascii_code])) { |
| 599 | register_code(KC_LSFT); | 509 | register_code(KC_LSFT); |
| 600 | register_code(keycode); | 510 | register_code(keycode); |
| 601 | unregister_code(keycode); | 511 | unregister_code(keycode); |
| @@ -606,55 +516,11 @@ void send_string(const char *str) { | |||
| 606 | unregister_code(keycode); | 516 | unregister_code(keycode); |
| 607 | } | 517 | } |
| 608 | ++str; | 518 | ++str; |
| 519 | // interval | ||
| 520 | { uint8_t ms = interval; while (ms--) wait_ms(1); } | ||
| 609 | } | 521 | } |
| 610 | } | 522 | } |
| 611 | 523 | ||
| 612 | #endif | ||
| 613 | |||
| 614 | /* for users whose OSes are set to Colemak */ | ||
| 615 | #if 0 | ||
| 616 | #include "keymap_colemak.h" | ||
| 617 | |||
| 618 | const bool ascii_to_colemak_shift_lut[0x80] PROGMEM = { | ||
| 619 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 620 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 621 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 622 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 623 | 0, 1, 1, 1, 1, 1, 1, 0, | ||
| 624 | 1, 1, 1, 1, 0, 0, 0, 0, | ||
| 625 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 626 | 0, 0, 1, 0, 1, 0, 1, 1, | ||
| 627 | 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 628 | 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 629 | 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 630 | 1, 1, 1, 0, 0, 0, 1, 1, | ||
| 631 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 632 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 633 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 634 | 0, 0, 0, 1, 1, 1, 1, 0 | ||
| 635 | }; | ||
| 636 | |||
| 637 | const uint8_t ascii_to_colemak_keycode_lut[0x80] PROGMEM = { | ||
| 638 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 639 | KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, | ||
| 640 | 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 641 | 0, 0, 0, KC_ESC, 0, 0, 0, 0, | ||
| 642 | KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, | ||
| 643 | KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, | ||
| 644 | KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, | ||
| 645 | KC_8, KC_9, CM_SCLN, CM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, | ||
| 646 | KC_2, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, | ||
| 647 | CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, | ||
| 648 | CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, | ||
| 649 | CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, | ||
| 650 | KC_GRV, CM_A, CM_B, CM_C, CM_D, CM_E, CM_F, CM_G, | ||
| 651 | CM_H, CM_I, CM_J, CM_K, CM_L, CM_M, CM_N, CM_O, | ||
| 652 | CM_P, CM_Q, CM_R, CM_S, CM_T, CM_U, CM_V, CM_W, | ||
| 653 | CM_X, CM_Y, CM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL | ||
| 654 | }; | ||
| 655 | |||
| 656 | #endif | ||
| 657 | |||
| 658 | void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { | 524 | void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { |
| 659 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { | 525 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { |
| 660 | layer_on(layer3); | 526 | layer_on(layer3); |
diff --git a/quantum/quantum.h b/quantum/quantum.h index 2bf18d095..e00fe2346 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -95,7 +95,10 @@ extern uint32_t default_layer_state; | |||
| 95 | #endif | 95 | #endif |
| 96 | 96 | ||
| 97 | #define SEND_STRING(str) send_string(PSTR(str)) | 97 | #define SEND_STRING(str) send_string(PSTR(str)) |
| 98 | extern const bool ascii_to_shift_lut[0x80]; | ||
| 99 | extern const uint8_t ascii_to_keycode_lut[0x80]; | ||
| 98 | void send_string(const char *str); | 100 | void send_string(const char *str); |
| 101 | void send_string_with_delay(const char *str, uint8_t interval); | ||
| 99 | 102 | ||
| 100 | // For tri-layer | 103 | // For tri-layer |
| 101 | void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); | 104 | void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); |
