patch 8.2.1811: mapping Ctrl-key does not work for '{', '}' and '|'
Problem: Mapping Ctrl-key does not work for '{', '}' and '|'.
Solution: Remove the shift modifier. (closes #6457)
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index 7d7e2f0..424e285 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -2126,6 +2126,24 @@
func Test_mapping_works_with_shift_ctrl()
call RunTest_mapping_works_with_mods(function('GetEscCodeCSI27'), 'C-S', 6)
call RunTest_mapping_works_with_mods(function('GetEscCodeCSIu'), 'C-S', 6)
+
+ new
+ set timeoutlen=10
+
+ " Ctrl-Shift-[ actually produces CTRL-Shift-{ which is mapped as <C-{>
+ call RunTest_mapping_mods('<C-{>', '{', function('GetEscCodeCSI27'), 6)
+ call RunTest_mapping_mods('<C-{>', '{', function('GetEscCodeCSIu'), 6)
+
+ " Ctrl-Shift-] actually produces CTRL-Shift-} which is mapped as <C-}>
+ call RunTest_mapping_mods('<C-{>', '{', function('GetEscCodeCSI27'), 6)
+ call RunTest_mapping_mods('<C-{>', '{', function('GetEscCodeCSIu'), 6)
+
+ " Ctrl-Shift-\ actually produces CTRL-Shift-| which is mapped as <C-|>
+ call RunTest_mapping_mods('<C-\|>', '|', function('GetEscCodeCSI27'), 6)
+ call RunTest_mapping_mods('<C-\|>', '|', function('GetEscCodeCSIu'), 6)
+
+ bwipe!
+ set timeoutlen&
endfunc
" Below we also test the "u" code with Alt, This works, but libvterm would not