To: vim_dev@googlegroups.com Subject: Patch 9.0.0429 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0429 Problem: Not all keys are tested for the MS-Windows GUI. Solution: Add more key codes to the list. (Yegappan Lakshmanan, closes #11097) Files: src/testdir/test_gui.vim *** ../vim-9.0.0428/src/testdir/test_gui.vim 2022-09-07 13:01:07.334758741 +0100 --- src/testdir/test_gui.vim 2022-09-09 17:34:02.156856831 +0100 *************** *** 1651,1713 **** endfor " Test for the various Ctrl and Shift key combinations. let keytests = [ ! \ [[0x10, 0x21], "\", 2], ! \ [[0x11, 0x21], "\", 4], ! \ [[0x10, 0x22], "\", 2], ! \ [[0x11, 0x22], "\", 4], ! \ [[0x10, 0x23], "\", 0], ! \ [[0x11, 0x23], "\", 0], ! \ [[0x10, 0x24], "\", 0], ! \ [[0x11, 0x24], "\", 0], ! \ [[0x10, 0x25], "\", 0], ! \ [[0x11, 0x25], "\", 0], ! \ [[0x10, 0x26], "\", 0], ! \ [[0x11, 0x26], "\", 4], ! \ [[0x10, 0x27], "\", 0], ! \ [[0x11, 0x27], "\", 0], ! \ [[0x10, 0x28], "\", 0], ! \ [[0x11, 0x28], "\", 4], ! \ [[0x11, 0x30], "\", 4], ! \ [[0x11, 0x31], "\", 4], ! \ [[0x11, 0x32], "\", 4], ! \ [[0x11, 0x33], "\", 4], ! \ [[0x11, 0x34], "\", 4], ! \ [[0x11, 0x35], "\", 4], ! \ [[0x11, 0x36], "\", 0], ! \ [[0x11, 0x37], "\", 4], ! \ [[0x11, 0x38], "\", 4], ! \ [[0x11, 0x39], "\", 4], ! \ [[0x11, 0x60], "\", 4], ! \ [[0x11, 0x61], "\", 4], ! \ [[0x11, 0x62], "\", 4], ! \ [[0x11, 0x63], "\", 4], ! \ [[0x11, 0x64], "\", 4], ! \ [[0x11, 0x65], "\", 4], ! \ [[0x11, 0x66], "\", 4], ! \ [[0x11, 0x67], "\", 4], ! \ [[0x11, 0x68], "\", 4], ! \ [[0x11, 0x69], "\", 4], ! \ [[0x11, 0x6A], "\", 4], ! \ [[0x11, 0x6B], "\", 4], ! \ [[0x11, 0x6D], "\", 4], ! \ [[0x11, 0x70], "\", 4], ! \ [[0x11, 0x71], "\", 4], ! \ [[0x11, 0x72], "\", 4], ! \ [[0x11, 0x73], "\", 4], ! \ [[0x11, 0x74], "\", 4], ! \ [[0x11, 0x75], "\", 4], ! \ [[0x11, 0x76], "\", 4], ! \ [[0x11, 0x77], "\", 4], ! \ [[0x11, 0x78], "\", 4], \ ] for [kcodes, kstr, kmod] in keytests call SendKeys(kcodes) let ch = getcharstr() let mod = getcharmod() ! call assert_equal(kstr, ch, $"key = {kstr}") ! call assert_equal(kmod, mod) endfor bw! --- 1651,1741 ---- endfor " Test for the various Ctrl and Shift key combinations. + " Refer to the following page for the virtual key codes: + " https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes let keytests = [ ! \ [[0x10, 0x21], "S-Pageup", 2], ! \ [[0xA0, 0x21], "S-Pageup", 2], ! \ [[0xA1, 0x21], "S-Pageup", 2], ! \ [[0x11, 0x21], "C-Pageup", 4], ! \ [[0xA2, 0x21], "C-Pageup", 4], ! \ [[0xA3, 0x21], "C-Pageup", 4], ! \ [[0x11, 0x10, 0x21], "C-S-Pageup", 6], ! \ [[0x10, 0x22], "S-PageDown", 2], ! \ [[0xA0, 0x22], "S-PageDown", 2], ! \ [[0xA1, 0x22], "S-PageDown", 2], ! \ [[0x11, 0x22], "C-PageDown", 4], ! \ [[0xA2, 0x22], "C-PageDown", 4], ! \ [[0xA3, 0x22], "C-PageDown", 4], ! \ [[0x11, 0x10, 0x22], "C-S-PageDown", 6], ! \ [[0x10, 0x23], "S-End", 0], ! \ [[0x11, 0x23], "C-End", 0], ! \ [[0x11, 0x10, 0x23], "C-S-End", 4], ! \ [[0x10, 0x24], "S-Home", 0], ! \ [[0x11, 0x24], "C-Home", 0], ! \ [[0x11, 0x10, 0x24], "C-S-Home", 4], ! \ [[0x10, 0x25], "S-Left", 0], ! \ [[0x11, 0x25], "C-Left", 0], ! \ [[0x11, 0x10, 0x25], "C-S-Left", 4], ! \ [[0x10, 0x26], "S-Up", 0], ! \ [[0x11, 0x26], "C-Up", 4], ! \ [[0x11, 0x10, 0x26], "C-S-Up", 4], ! \ [[0x10, 0x27], "S-Right", 0], ! \ [[0x11, 0x27], "C-Right", 0], ! \ [[0x11, 0x10, 0x27], "C-S-Right", 4], ! \ [[0x10, 0x28], "S-Down", 0], ! \ [[0x11, 0x28], "C-Down", 4], ! \ [[0x11, 0x10, 0x28], "C-S-Down", 4], ! \ [[0x11, 0x30], "C-0", 4], ! \ [[0x11, 0x31], "C-1", 4], ! \ [[0x11, 0x32], "C-2", 4], ! \ [[0x11, 0x33], "C-3", 4], ! \ [[0x11, 0x34], "C-4", 4], ! \ [[0x11, 0x35], "C-5", 4], ! \ [[0x11, 0x36], "C-^", 0], ! \ [[0x11, 0x37], "C-7", 4], ! \ [[0x11, 0x38], "C-8", 4], ! \ [[0x11, 0x39], "C-9", 4], ! \ [[0x11, 0x60], "C-0", 4], ! \ [[0x11, 0x61], "C-1", 4], ! \ [[0x11, 0x62], "C-2", 4], ! \ [[0x11, 0x63], "C-3", 4], ! \ [[0x11, 0x64], "C-4", 4], ! \ [[0x11, 0x65], "C-5", 4], ! \ [[0x11, 0x66], "C-6", 4], ! \ [[0x11, 0x67], "C-7", 4], ! \ [[0x11, 0x68], "C-8", 4], ! \ [[0x11, 0x69], "C-9", 4], ! \ [[0x11, 0x6A], "C-*", 4], ! \ [[0x11, 0x6B], "C-+", 4], ! \ [[0x11, 0x6D], "C--", 4], ! \ [[0x11, 0x70], "C-F1", 4], ! \ [[0x11, 0x10, 0x70], "C-S-F1", 4], ! \ [[0x11, 0x71], "C-F2", 4], ! \ [[0x11, 0x10, 0x71], "C-S-F2", 4], ! \ [[0x11, 0x72], "C-F3", 4], ! \ [[0x11, 0x10, 0x72], "C-S-F3", 4], ! \ [[0x11, 0x73], "C-F4", 4], ! \ [[0x11, 0x10, 0x73], "C-S-F4", 4], ! \ [[0x11, 0x74], "C-F5", 4], ! \ [[0x11, 0x10, 0x74], "C-S-F5", 4], ! \ [[0x11, 0x75], "C-F6", 4], ! \ [[0x11, 0x10, 0x75], "C-S-F6", 4], ! \ [[0x11, 0x76], "C-F7", 4], ! \ [[0x11, 0x10, 0x76], "C-S-F7", 4], ! \ [[0x11, 0x77], "C-F8", 4], ! \ [[0x11, 0x10, 0x77], "C-S-F8", 4], ! \ [[0x11, 0x78], "C-F9", 4], ! \ [[0x11, 0x10, 0x78], "C-S-F9", 4], \ ] for [kcodes, kstr, kmod] in keytests call SendKeys(kcodes) let ch = getcharstr() let mod = getcharmod() ! let keycode = eval('"\<' .. kstr .. '>"') ! call assert_equal(keycode, ch, $"key = {kstr}") ! call assert_equal(kmod, mod, $"key = {kstr}") endfor bw! *** ../vim-9.0.0428/src/version.c 2022-09-09 17:09:32.204881239 +0100 --- src/version.c 2022-09-09 17:38:27.040145754 +0100 *************** *** 705,706 **** --- 705,708 ---- { /* Add new patch number below this line */ + /**/ + 429, /**/ -- To define recursion, we must first define recursion. /// 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 ///