diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-27 11:31:23 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-27 11:31:23 +0000 |
commit | cc0907165d388e4e8842d3bda9e24ed4d932d6b8 (patch) | |
tree | cd1de1b5e4df258bc6edfd3286ae8fb1af564bc4 /src/testdir/keycode_check.vim | |
parent | c255b789653120979eacdf8bb8eca02487753a8e (diff) |
patch 9.0.0955: libvterm does not support the XTQMODKEYS requestv9.0.0955
Problem: Libvterm does not support the XTQMODKEYS request.
Solution: Implement the XTQMODKEYS request and response. Update the keycode
check results.
Diffstat (limited to 'src/testdir/keycode_check.vim')
-rw-r--r-- | src/testdir/keycode_check.vim | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/testdir/keycode_check.vim b/src/testdir/keycode_check.vim index ca759ca504..6ad7b773bb 100644 --- a/src/testdir/keycode_check.vim +++ b/src/testdir/keycode_check.vim @@ -134,7 +134,7 @@ def ActionList() endif sort(terms) - var items = ['protocol', 'version', 'status', 'modkeys'] + var items = ['protocol', 'version', 'kitty', 'modkeys'] + key_entries->copy()->map((_, v) => v[1]) # For each terminal compute the needed width, add two. @@ -194,15 +194,17 @@ def DoTerm(name: string) ]) echo "\n" &t_TE = "\<Esc>[>4;m" - var proto_name = 'none' + var proto_name = 'unknown' if proto == 1 - &t_TI = "" + # Request the XTQMODKEYS value and request the kitty keyboard protocol status. + &t_TI = "\<Esc>[?4m" .. "\<Esc>[?u" + proto_name = 'none' elseif proto == 2 - # Enable modifyOtherKeys level 2. Request the XTQMODKEYS value. + # Enable modifyOtherKeys level 2 and request the XTQMODKEYS value. &t_TI = "\<Esc>[>4;2m" .. "\<Esc>[?4m" proto_name = 'mok2' elseif proto == 3 - # Enable Kitty keyboard protocol and request the status + # Enable Kitty keyboard protocol and request the status. &t_TI = "\<Esc>[>1u" .. "\<Esc>[?u" proto_name = 'kitty' else @@ -262,7 +264,7 @@ def DoTerm(name: string) endif keycodes[name]['protocol'] = proto_name keycodes[name]['version'] = '' - keycodes[name]['status'] = '' + keycodes[name]['kitty'] = '' keycodes[name]['modkeys'] = '' # Check the log file for a status and the version response @@ -277,8 +279,9 @@ def DoTerm(name: string) # Check for the XTQMODKEYS response. if code =~ modkeys_pattern var modkeys = substitute(code, '.*\(' .. modkeys_pattern .. '\).*', '\1', '') - # Get the level out of the response - modkeys = substitute(modkeys, '.*4;\(\d\)m', '\1', '') + # We could get the level out of the response, but showing the response + # itself provides more information. + # modkeys = substitute(modkeys, '.*4;\(\d\)m', '\1', '') if keycodes[name]['modkeys'] != '' echomsg 'Another modkeys found after ' .. keycodes[name]['modkeys'] @@ -292,10 +295,10 @@ def DoTerm(name: string) # use the response itself as the status status = Literal2hex(status) - if keycodes[name]['status'] != '' - echomsg 'Another status found after ' .. keycodes[name]['status'] + if keycodes[name]['kitty'] != '' + echomsg 'Another status found after ' .. keycodes[name]['kitty'] endif - keycodes[name]['status'] = status + keycodes[name]['kitty'] = status endif if code =~ version_pattern |