aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/input_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-02-20 17:09:15 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-02-22 02:41:40 -0500
commit99d4c8c29c4a9371c268cc20e4805709d86fb686 (patch)
tree6bedd829ee9f073f7940a2ed09ad6829318d71b5 /test/functional/ui/input_spec.lua
parent9403ce82bce1a2dcda4b01b10b2c01ee42bb4034 (diff)
downloadrneovim-99d4c8c29c4a9371c268cc20e4805709d86fb686.tar.gz
rneovim-99d4c8c29c4a9371c268cc20e4805709d86fb686.tar.bz2
rneovim-99d4c8c29c4a9371c268cc20e4805709d86fb686.zip
keymap: Support <D-...> (super/command key).
Adds support for: - api:vim_input("<D-a>") - ":nnoremap <C-D-S-...>" and permutations thereof UIs must capture the modifier and send it as "<D-...>" to vim_input(). Note: Before this commit, any arbitrary ":nnoremap <{foo}-{bar}>" mapping could already be invoked with feedkeys("\<{foo}-{bar}>"). This commit supports "D-" as a modifier that can be combined with "C-", "A-", "S-" in any order. For non-GUI (terminal) support, user must: :set <D-a>={CSI sequence} then send the {CSI sequence} from their terminal. But this does not work yet (regression #2204). Closes #2190
Diffstat (limited to 'test/functional/ui/input_spec.lua')
-rw-r--r--test/functional/ui/input_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua
index 4818830940..6f5cadaf81 100644
--- a/test/functional/ui/input_spec.lua
+++ b/test/functional/ui/input_spec.lua
@@ -25,6 +25,9 @@ describe('mappings', function()
add_mapping('<s-up>', '<s-up>')
add_mapping('<c-s-up>', '<c-s-up>')
add_mapping('<c-s-a-up>', '<c-s-a-up>')
+ add_mapping('<c-s-a-d-up>', '<c-s-a-d-up>')
+ add_mapping('<c-d-a>', '<c-d-a>')
+ add_mapping('<d-1>', '<d-1>')
end)
it('ok', function()
@@ -37,6 +40,12 @@ describe('mappings', function()
check_mapping('<s-a-c-up>', '<c-s-a-up>')
check_mapping('<a-c-s-up>', '<c-s-a-up>')
check_mapping('<a-s-c-up>', '<c-s-a-up>')
+ check_mapping('<c-s-a-d-up>', '<c-s-a-d-up>')
+ check_mapping('<s-a-d-c-up>', '<c-s-a-d-up>')
+ check_mapping('<d-s-a-c-up>', '<c-s-a-d-up>')
+ check_mapping('<c-d-a>', '<c-d-a>')
+ check_mapping('<d-c-a>', '<c-d-a>')
+ check_mapping('<d-1>', '<d-1>')
end)
end)