aboutsummaryrefslogtreecommitdiffstats
path: root/config/bindings_test.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2021-10-25 15:20:34 +0200
committerRobin Jarry <robin@jarry.cc>2021-10-28 16:22:28 +0200
commit1a75906bcbc1915a696259f20373a5a78d4ef8a3 (patch)
treefd674341c9c41ef20604acee89977f1d52e32c18 /config/bindings_test.go
parent7a6c808c042bf6f662e6d6b6dba09829a1f9ed15 (diff)
downloadaerc-1a75906bcbc1915a696259f20373a5a78d4ef8a3.tar.gz
bindings: support more modified keys
Add new supported keys: Ctrl+Enter Ctrl+Up Ctrl+Down Ctrl+Left Ctrl+Right Ctrl+PageUp Ctrl+PageDown Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config/bindings_test.go')
-rw-r--r--config/bindings_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/config/bindings_test.go b/config/bindings_test.go
index d07d65a7..dab3b9f1 100644
--- a/config/bindings_test.go
+++ b/config/bindings_test.go
@@ -55,7 +55,22 @@ func TestGetBinding(t *testing.T) {
}, BINDING_NOT_FOUND, "")
add("<C-a>", "c-a")
+ add("<C-Down>", ":next")
+ add("<C-PgUp>", ":prev")
+ add("<C-Enter>", ":open")
test([]KeyStroke{
{tcell.ModCtrl, tcell.KeyCtrlA, 0},
}, BINDING_FOUND, "c-a")
+ test([]KeyStroke{
+ {tcell.ModCtrl, tcell.KeyDown, 0},
+ }, BINDING_FOUND, ":next")
+ test([]KeyStroke{
+ {tcell.ModCtrl, tcell.KeyPgUp, 0},
+ }, BINDING_FOUND, ":prev")
+ test([]KeyStroke{
+ {tcell.ModCtrl, tcell.KeyPgDn, 0},
+ }, BINDING_NOT_FOUND, "")
+ test([]KeyStroke{
+ {tcell.ModCtrl, tcell.KeyEnter, 0},
+ }, BINDING_FOUND, ":open")
}