|
|
@ -882,16 +882,16 @@ void send_string_with_delay(const char *str, uint8_t interval) {
|
|
|
|
while (1) {
|
|
|
|
while (1) {
|
|
|
|
char ascii_code = *str;
|
|
|
|
char ascii_code = *str;
|
|
|
|
if (!ascii_code) break;
|
|
|
|
if (!ascii_code) break;
|
|
|
|
if (ascii_code == 1) {
|
|
|
|
if (ascii_code == SS_TAP_CODE) {
|
|
|
|
// tap
|
|
|
|
// tap
|
|
|
|
uint8_t keycode = *(++str);
|
|
|
|
uint8_t keycode = *(++str);
|
|
|
|
register_code(keycode);
|
|
|
|
register_code(keycode);
|
|
|
|
unregister_code(keycode);
|
|
|
|
unregister_code(keycode);
|
|
|
|
} else if (ascii_code == 2) {
|
|
|
|
} else if (ascii_code == SS_DOWN_CODE) {
|
|
|
|
// down
|
|
|
|
// down
|
|
|
|
uint8_t keycode = *(++str);
|
|
|
|
uint8_t keycode = *(++str);
|
|
|
|
register_code(keycode);
|
|
|
|
register_code(keycode);
|
|
|
|
} else if (ascii_code == 3) {
|
|
|
|
} else if (ascii_code == SS_UP_CODE) {
|
|
|
|
// up
|
|
|
|
// up
|
|
|
|
uint8_t keycode = *(++str);
|
|
|
|
uint8_t keycode = *(++str);
|
|
|
|
unregister_code(keycode);
|
|
|
|
unregister_code(keycode);
|
|
|
@ -908,16 +908,16 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
|
|
|
|
while (1) {
|
|
|
|
while (1) {
|
|
|
|
char ascii_code = pgm_read_byte(str);
|
|
|
|
char ascii_code = pgm_read_byte(str);
|
|
|
|
if (!ascii_code) break;
|
|
|
|
if (!ascii_code) break;
|
|
|
|
if (ascii_code == 1) {
|
|
|
|
if (ascii_code == SS_TAP_CODE) {
|
|
|
|
// tap
|
|
|
|
// tap
|
|
|
|
uint8_t keycode = pgm_read_byte(++str);
|
|
|
|
uint8_t keycode = pgm_read_byte(++str);
|
|
|
|
register_code(keycode);
|
|
|
|
register_code(keycode);
|
|
|
|
unregister_code(keycode);
|
|
|
|
unregister_code(keycode);
|
|
|
|
} else if (ascii_code == 2) {
|
|
|
|
} else if (ascii_code == SS_DOWN_CODE) {
|
|
|
|
// down
|
|
|
|
// down
|
|
|
|
uint8_t keycode = pgm_read_byte(++str);
|
|
|
|
uint8_t keycode = pgm_read_byte(++str);
|
|
|
|
register_code(keycode);
|
|
|
|
register_code(keycode);
|
|
|
|
} else if (ascii_code == 3) {
|
|
|
|
} else if (ascii_code == SS_UP_CODE) {
|
|
|
|
// up
|
|
|
|
// up
|
|
|
|
uint8_t keycode = pgm_read_byte(++str);
|
|
|
|
uint8_t keycode = pgm_read_byte(++str);
|
|
|
|
unregister_code(keycode);
|
|
|
|
unregister_code(keycode);
|
|
|
|