=== modified file 't/30mouse.c' --- t/30mouse.c 2019-02-17 17:25:34 +0000 +++ t/30mouse.c 2012-04-24 16:42:01 +0000 @@ -14,7 +14,7 @@ tk = termkey_new_abstract("vt100", 0); - termkey_push_bytes(tk, "\x1b[M !!", 6); + termkey_push_bytes(tk, "\e[M !!", 6); key.type = -1; is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for mouse press"); @@ -38,7 +38,7 @@ is_int(len, 21, "string length for press"); is_str(buffer, "MousePress(1) @ (1,1)", "string buffer for press"); - termkey_push_bytes(tk, "\x1b[M@\"!", 6); + termkey_push_bytes(tk, "\e[M@\"!", 6); key.type = -1; ev = -1; button = -1; line = -1; col = -1; @@ -51,7 +51,7 @@ is_int(col, 2, "mouse column for drag"); is_int(key.modifiers, 0, "modifiers for press"); - termkey_push_bytes(tk, "\x1b[M##!", 6); + termkey_push_bytes(tk, "\e[M##!", 6); key.type = -1; ev = -1; button = -1; line = -1; col = -1; @@ -63,7 +63,7 @@ is_int(col, 3, "mouse column for release"); is_int(key.modifiers, 0, "modifiers for press"); - termkey_push_bytes(tk, "\x1b[M0++", 6); + termkey_push_bytes(tk, "\e[M0++", 6); key.type = -1; ev = -1; button = -1; line = -1; col = -1; @@ -81,7 +81,7 @@ is_str(buffer, "C-MousePress(1)", "string buffer for Ctrl-press"); // rxvt protocol - termkey_push_bytes(tk, "\x1b[0;20;20M", 10); + termkey_push_bytes(tk, "\e[0;20;20M", 10); key.type = -1; is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for mouse press rxvt protocol"); @@ -96,7 +96,7 @@ is_int(col, 20, "mouse column for press rxvt protocol"); is_int(key.modifiers, 0, "modifiers for press rxvt protocol"); - termkey_push_bytes(tk, "\x1b[3;20;20M", 10); + termkey_push_bytes(tk, "\e[3;20;20M", 10); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for mouse release rxvt protocol"); @@ -111,7 +111,7 @@ is_int(key.modifiers, 0, "modifiers for release rxvt protocol"); // SGR protocol - termkey_push_bytes(tk, "\x1b[<0;30;30M", 11); + termkey_push_bytes(tk, "\e[<0;30;30M", 11); key.type = -1; is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for mouse press SGR encoding"); @@ -127,7 +127,7 @@ is_int(col, 30, "mouse column for press SGR"); is_int(key.modifiers, 0, "modifiers for press SGR"); - termkey_push_bytes(tk, "\x1b[<0;30;30m", 11); + termkey_push_bytes(tk, "\e[<0;30;30m", 11); key.type = -1; is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for mouse release SGR encoding"); @@ -139,7 +139,7 @@ is_int(ev, TERMKEY_MOUSE_RELEASE, "mouse event for release SGR"); - termkey_push_bytes(tk, "\x1b[<0;500;300M", 13); + termkey_push_bytes(tk, "\e[<0;500;300M", 13); key.type = -1; ev = -1; button = -1; line = -1; col = -1; === modified file 't/31position.c' --- t/31position.c 2019-02-17 17:25:34 +0000 +++ t/31position.c 2012-11-30 16:12:26 +0000 @@ -11,7 +11,7 @@ tk = termkey_new_abstract("vt100", 0); - termkey_push_bytes(tk, "\x1b[?15;7R", 8); + termkey_push_bytes(tk, "\e[?15;7R", 8); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for position report"); @@ -25,7 +25,7 @@ /* A plain CSI R is likely to be though. * This is tricky :/ */ - termkey_push_bytes(tk, "\x1b[R", 3); + termkey_push_bytes(tk, "\e[R", 3); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for "); === modified file 't/32modereport.c' --- t/32modereport.c 2019-02-17 17:25:34 +0000 +++ t/32modereport.c 2012-11-30 16:34:47 +0000 @@ -11,7 +11,7 @@ tk = termkey_new_abstract("vt100", 0); - termkey_push_bytes(tk, "\x1b[?1;2$y", 8); + termkey_push_bytes(tk, "\e[?1;2$y", 8); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for mode report"); @@ -23,7 +23,7 @@ is_int(mode, 1, "mode number from mode report"); is_int(value, 2, "mode value from mode report"); - termkey_push_bytes(tk, "\x1b[4;1$y", 7); + termkey_push_bytes(tk, "\e[4;1$y", 7); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for mode report"); === modified file 't/38csi.c' --- t/38csi.c 2019-02-17 17:25:34 +0000 +++ t/38csi.c 2017-03-29 21:36:37 +0000 @@ -13,7 +13,7 @@ tk = termkey_new_abstract("vt100", 0); - termkey_push_bytes(tk, "\x1b[5;25v", 7); + termkey_push_bytes(tk, "\e[5;25v", 7); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for CSI v"); @@ -26,14 +26,14 @@ is_int(args[1], 25, "args[1] for unknown CSI"); is_int(command, 'v', "command for unknown CSI"); - termkey_push_bytes(tk, "\x1b[?w", 4); + termkey_push_bytes(tk, "\e[?w", 4); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for CSI ? w"); is_int(key.type, TERMKEY_TYPE_UNKNOWN_CSI, "key.type for unknown CSI"); is_int(termkey_interpret_csi(tk, &key, args, &nargs, &command), TERMKEY_RES_KEY, "interpret_csi yields RES_KEY"); is_int(command, '?'<<8 | 'w', "command for unknown CSI"); - termkey_push_bytes(tk, "\x1b[?$x", 5); + termkey_push_bytes(tk, "\e[?$x", 5); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for CSI ? $x"); is_int(key.type, TERMKEY_TYPE_UNKNOWN_CSI, "key.type for unknown CSI"); === modified file 't/39dcs.c' --- t/39dcs.c 2019-02-17 17:25:34 +0000 +++ t/39dcs.c 2017-04-10 14:18:08 +0000 @@ -12,7 +12,7 @@ tk = termkey_new_abstract("xterm", 0); // 7bit DCS - termkey_push_bytes(tk, "\x1bP1$r1 q\x1b\\", 10); + termkey_push_bytes(tk, "\eP1$r1 q\e\\", 10); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for DCS"); @@ -38,7 +38,7 @@ is_int(termkey_getkey(tk, &key), TERMKEY_RES_NONE, "getkey again yields RES_NONE"); // 7bit OSC - termkey_push_bytes(tk, "\x1b]15;abc\x1b\\", 10); + termkey_push_bytes(tk, "\e]15;abc\e\\", 10); is_int(termkey_getkey(tk, &key), TERMKEY_RES_KEY, "getkey yields RES_KEY for OSC"); @@ -51,7 +51,7 @@ is_int(termkey_getkey(tk, &key), TERMKEY_RES_NONE, "getkey again yields RES_NONE"); // False alarm - termkey_push_bytes(tk, "\x1bP", 2); + termkey_push_bytes(tk, "\eP", 2); is_int(termkey_getkey(tk, &key), TERMKEY_RES_AGAIN, "getkey yields RES_AGAIN for false alarm");