|
|
@ -850,6 +850,26 @@ const bool ascii_to_shift_lut[0x80] PROGMEM = {
|
|
|
|
0, 0, 0, 1, 1, 1, 1, 0
|
|
|
|
0, 0, 0, 1, 1, 1, 1, 0
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__attribute__ ((weak))
|
|
|
|
|
|
|
|
const bool ascii_to_altgr_lut[0x80] PROGMEM = {
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
__attribute__ ((weak))
|
|
|
|
__attribute__ ((weak))
|
|
|
|
const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = {
|
|
|
|
const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = {
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
@ -931,16 +951,22 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void send_char(char ascii_code) {
|
|
|
|
void send_char(char ascii_code) {
|
|
|
|
uint8_t keycode;
|
|
|
|
uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
|
|
|
|
keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
|
|
|
|
bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]);
|
|
|
|
if (pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code])) {
|
|
|
|
bool is_altgred = pgm_read_byte(&ascii_to_altgr_lut[(uint8_t)ascii_code]);
|
|
|
|
register_code(KC_LSFT);
|
|
|
|
|
|
|
|
register_code(keycode);
|
|
|
|
if (is_shifted) {
|
|
|
|
unregister_code(keycode);
|
|
|
|
register_code(KC_LSFT);
|
|
|
|
unregister_code(KC_LSFT);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (is_altgred) {
|
|
|
|
register_code(keycode);
|
|
|
|
register_code(KC_RALT);
|
|
|
|
unregister_code(keycode);
|
|
|
|
}
|
|
|
|
|
|
|
|
tap_code(keycode);
|
|
|
|
|
|
|
|
if (is_altgred) {
|
|
|
|
|
|
|
|
unregister_code(KC_RALT);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_shifted) {
|
|
|
|
|
|
|
|
unregister_code(KC_LSFT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|