diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-08-28 17:57:57 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-08-28 17:57:57 +0100 |
commit | 8793934328f40f79a634a05d8ba815f9b7bcd749 (patch) | |
tree | df25896beb6bca6b2f27b800c53e163104f57c47 /termkey.c | |
parent | 26384996486963bc2f097f44a82a5c07e0dfe69e (diff) | |
download | termo-8793934328f40f79a634a05d8ba815f9b7bcd749.tar.gz termo-8793934328f40f79a634a05d8ba815f9b7bcd749.tar.xz termo-8793934328f40f79a634a05d8ba815f9b7bcd749.zip |
Allow a flag to convert ASCII DEL into Backspace
Diffstat (limited to 'termkey.c')
-rw-r--r-- | termkey.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |