aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-08-28 17:57:57 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-08-28 17:57:57 +0100
commit8793934328f40f79a634a05d8ba815f9b7bcd749 (patch)
treedf25896beb6bca6b2f27b800c53e163104f57c47 /termkey.c
parent26384996486963bc2f097f44a82a5c07e0dfe69e (diff)
downloadtermo-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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/termkey.c b/termkey.c
index 37c2690..573bd44 100644
--- a/termkey.c
+++ b/termkey.c
@@ -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)