diff --git a/src/winio.c b/src/winio.c
index acf03df6ad6181fb27830e14c7c5e20358e95b19..019adc94139a47f0eaeaaa6bd83ea86b0b38f79d 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -530,7 +530,7 @@ int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key)
 		     * sequence counter and interpret the digit.  If the
 		     * byte sequence's range is not limited to 2XX, fall
 		     * through. */
-		    if (('0' <= *kbinput && *kbinput <= '6' &&
+		    if (('0' <= *kbinput && *kbinput <= '2' &&
 			byte_digits == 0) || ('0' <= *kbinput &&
 			*kbinput <= '9' && byte_digits > 0)) {
 			int byte;