Fix ASCII keys with send-keys -l.

pull/2270/head
nicm 2020-05-27 14:45:35 +00:00
parent f336599a3a
commit bda2a0282a
1 changed files with 8 additions and 3 deletions

View File

@ -118,9 +118,14 @@ cmd_send_keys_inject_string(struct cmdq_item *item, struct cmdq_item *after,
if (literal) {
ud = utf8_fromcstr(s);
for (loop = ud; loop->size != 0; loop++) {
if (utf8_from_data(loop, &uc) != UTF8_DONE)
continue;
after = cmd_send_keys_inject_key(item, after, uc);
if (loop->size == 1 && loop->data[0] <= 0x7f)
key = loop->data[0];
else {
if (utf8_from_data(loop, &uc) != UTF8_DONE)
continue;
key = uc;
}
after = cmd_send_keys_inject_key(item, after, key);
}
free(ud);
}