From 8793934328f40f79a634a05d8ba815f9b7bcd749 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Sun, 28 Aug 2011 17:57:57 +0100 Subject: Allow a flag to convert ASCII DEL into Backspace --- termkey.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'termkey.c') 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) -- cgit v1.2.3