Allow a flag to convert ASCII DEL into Backspace

This commit is contained in:
Paul LeoNerd Evans
2011-08-28 17:57:57 +01:00
parent 2638499648
commit 8793934328
4 changed files with 27 additions and 1 deletions

View File

@@ -610,6 +610,12 @@ void termkey_canonicalise(TermKey *tk, TermKeyKey *key)
fill_utf8(key);
}
}
if(flags & TERMKEY_CANON_DELBS) {
if(key->type == TERMKEY_TYPE_KEYSYM && key->code.sym == TERMKEY_SYM_DEL) {
key->code.sym = TERMKEY_SYM_BACKSPACE;
}
}
}
static TermKeyResult peekkey(TermKey *tk, TermKeyKey *key, int force, size_t *nbytep)