diff options
| -rw-r--r-- | src/edbox.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/edbox.c b/src/edbox.c index b70ae2a..de9df79 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -198,6 +198,19 @@ void edbox_keystroke(void) { while(OS.ch == 0xff) ; + /* filter out all ctrl-shift key combos except the ones + we actually support */ + if(OS.ch == 0xce) { + /* ctrl-shift-up, same as ^B = back 1 word */ + OS.ch = 0x95; + } else if(OS.ch == 0xcf) { + /* ctrl-shift-down, same as ^F = forward 1 word */ + OS.ch = 0xb8; + } else if(OS.ch > 0xbf) { + OS.ch = 0xff; + return; + } + edbox_show(); c = 0; @@ -229,12 +242,6 @@ void edbox_keystroke(void) { case 0xa7: /* ...w/ctrl */ c = 0x02; /* ^B = IRC bold formatting char */ break; - case 0xce: /* ctrl-shift-up, same as... */ - OS.ch = 0x95; /* ^B = back 1 word */ - break; - case 0xcf: /* ctrl-shift-down, same as... */ - OS.ch = 0xb8; /* ^F = forward 1 word */ - break; case 0x9a: /* ctrl-3 (crash if cgetc() reads it!) */ OS.ch = 0xff; /* ignore it! */ return; |
