To: vim_dev@googlegroups.com Subject: Patch 9.0.1287 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1287 (after 9.0.1193) Problem: With the Kitty key protocl Esc with NumLock cannot be mapped. Solution: Also use K_ESC when there is a modifier. (closes #11811) Files: src/term.c *** ../vim-9.0.1286/src/term.c 2023-02-03 12:28:00.303287569 +0000 --- src/term.c 2023-02-06 17:44:14.851142896 +0000 *************** *** 5349,5354 **** --- 5349,5359 ---- if ((modifiers & MOD_MASK_SHIFT) && key >= 'a' && key <= 'z') key += 'A' - 'a'; + // Putting Esc in the buffer creates ambiguity, it can be the start of an + // escape sequence. Use K_ESC to avoid that. + if (key == ESC) + key = K_ESC; + return put_key_modifiers_in_typebuf(key, modifiers, csi_len, offset, buf, bufsize, buflen); } *** ../vim-9.0.1286/src/version.c 2023-02-06 16:40:45.382942052 +0000 --- src/version.c 2023-02-06 17:46:07.359072358 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1287, /**/ -- A fool learns from his mistakes, a wise man from someone else's. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///