diff --git a/src/definitions.h b/src/definitions.h index ffe28a90..e0b458e6 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -622,10 +622,7 @@ enum #define FOREIGN_SEQUENCE 0x4FC #ifdef USE_SLANG -#ifdef ENABLE_UTF8 -#define KEY_BAD 0xFF /* Clipped error code. */ -#endif -#define KEY_FLUSH 0x91 /* User-definable control code. */ +#define KEY_FLUSH 0xFF /* Clipped error code. */ #else #define KEY_FLUSH KEY_F0 /* Nonexistent function key. */ #endif diff --git a/src/winio.c b/src/winio.c index 9397b8a3..6e3b6228 100644 --- a/src/winio.c +++ b/src/winio.c @@ -918,7 +918,7 @@ int parse_kbinput(WINDOW *win) if (escapes == 0) { /* Most key codes in byte range cannot be special keys. */ - if (keycode <= 0xFF && keycode != '\t' && keycode != DEL_CODE) + if (keycode < 0xFF && keycode != '\t' && keycode != DEL_CODE) return keycode; } else if (escapes == 1) { escapes = 0; @@ -1247,9 +1247,6 @@ int parse_kbinput(WINDOW *win) #endif #ifdef KEY_RESIZE /* Slang and SunOS 5.7-5.9 don't support KEY_RESIZE. */ case KEY_RESIZE: -#endif -#if defined(USE_SLANG) && defined(ENABLE_UTF8) - case KEY_BAD: #endif case KEY_FLUSH: return ERR; /* Ignore this keystroke. */