Mercurial > vim
comparison src/testdir/test_mswin_event.vim @ 32244:533e36e02a68 v9.0.1453
patch 9.0.1453: typos in source code and tests
Commit: https://github.com/vim/vim/commit/b49dfd0cf296623af2d756cefc3e73b5b307734e
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Fri Apr 14 21:54:25 2023 +0100
patch 9.0.1453: typos in source code and tests
Problem: Typos in source code and tests.
Solution: Fi the typos. (Dominique Pell?, closes https://github.com/vim/vim/issues/12217)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 14 Apr 2023 23:00:07 +0200 |
parents | dbec60b8c253 |
children | 2630432cb6b1 |
comparison
equal
deleted
inserted
replaced
32243:bf6556bfd412 | 32244:533e36e02a68 |
---|---|
4 source check.vim | 4 source check.vim |
5 CheckMSWindows | 5 CheckMSWindows |
6 source mouse.vim | 6 source mouse.vim |
7 | 7 |
8 " Helper function for sending a grouped sequence of low level key presses | 8 " Helper function for sending a grouped sequence of low level key presses |
9 " The modifer key(s) can be included as VK Key Codes in the sequence | 9 " The modifier key(s) can be included as VK Key Codes in the sequence |
10 " Keydown events will be sent, to to the end of the group, then keyup events | 10 " Keydown events will be sent, to to the end of the group, then keyup events |
11 " will be sent in reverse order to release the keys. | 11 " will be sent in reverse order to release the keys. |
12 func SendKeyGroup(keygroup) | 12 func SendKeyGroup(keygroup) |
13 for k in a:keygroup | 13 for k in a:keygroup |
14 call test_mswin_event("key", {'event': "keydown", 'keycode': k}) | 14 call test_mswin_event("key", {'event': "keydown", 'keycode': k}) |
17 call test_mswin_event("key", {'event': "keyup", 'keycode': k}) | 17 call test_mswin_event("key", {'event': "keyup", 'keycode': k}) |
18 endfor | 18 endfor |
19 endfunc | 19 endfunc |
20 | 20 |
21 " Send individual key press and release events. | 21 " Send individual key press and release events. |
22 " the modifers for the key press can be specified in the modifiers arg. | 22 " the modifiers for the key press can be specified in the modifiers arg. |
23 func SendKeyWithModifiers(key, modifiers) | 23 func SendKeyWithModifiers(key, modifiers) |
24 let args = { } | 24 let args = { } |
25 let args.keycode = a:key | 25 let args.keycode = a:key |
26 let args.modifiers = a:modifiers | 26 let args.modifiers = a:modifiers |
27 let args.event = "keydown" | 27 let args.event = "keydown" |
357 let mod_mask = getcharmod() | 357 let mod_mask = getcharmod() |
358 " the mod_mask is zero when no modifiers are used | 358 " the mod_mask is zero when no modifiers are used |
359 " and when the virtual termcap maps the character | 359 " and when the virtual termcap maps the character |
360 call assert_equal(0, mod_mask, $"key = {kstr}") | 360 call assert_equal(0, mod_mask, $"key = {kstr}") |
361 | 361 |
362 " Send as a single key press with a modifers mask. | 362 " Send as a single key press with a modifiers mask. |
363 let modifiers = 0 | 363 let modifiers = 0 |
364 let key = kcodes[0] | 364 let key = kcodes[0] |
365 for key in kcodes | 365 for key in kcodes |
366 if index([s:VK.SHIFT, s:VK.LSHIFT, s:VK.RSHIFT], key) >= 0 | 366 if index([s:VK.SHIFT, s:VK.LSHIFT, s:VK.RSHIFT], key) >= 0 |
367 let modifiers = modifiers + s:MOD_MASK_SHIFT | 367 let modifiers = modifiers + s:MOD_MASK_SHIFT |