aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-07-22 21:12:45 -0700
committerGravatar Tom Willemse2022-07-22 21:12:45 -0700
commite8cdf76fbfaa6bd6c79b7a44a22e277c62781c9e (patch)
tree749343a36b3e08e8fc8acb52b0cae352e8d3067e /test
parent7957b236de1638fdcc1c9d16780c463defd8f961 (diff)
downloadnew-dotfiles-e8cdf76fbfaa6bd6c79b7a44a22e277c62781c9e.tar.gz
new-dotfiles-e8cdf76fbfaa6bd6c79b7a44a22e277c62781c9e.zip
Move a couple of keybindings to herbstluftwm
Diffstat (limited to 'test')
-rw-r--r--test/kbd.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/kbd.scm b/test/kbd.scm
new file mode 100644
index 0000000..52eb3d3
--- /dev/null
+++ b/test/kbd.scm
@@ -0,0 +1,28 @@
+(define-module (test kbd)
+ #:use-module (srfi srfi-64)
+ #:use-module (oni kbd))
+
+(test-begin "kbd-test")
+
+(test-equal "Any letter alone is untouched"
+ "s" (kbd "s"))
+(test-equal "The `s' modifier is converted to `Mod4'"
+ "Mod4-s" (kbd "s-s"))
+(test-equal "The `S' modifier is converted to `Shift'"
+ "Shift-s" (kbd "S-s"))
+(test-equal "The `M' modifier is converted to `Mod1'"
+ "Mod1-x" (kbd "M-x"))
+(test-equal "The `C' modifier is converted to `Ctrl'"
+ "Ctrl-f" (kbd "C-f"))
+(test-equal "Two modifiers can be combined"
+ "Mod4-Shift-q" (kbd "s-S-q"))
+(test-equal "Three modifiers can be combined"
+ "Mod4-Shift-Ctrl-f" (kbd "s-S-C-f"))
+(test-equal "The `RET' key is converted to `Return'"
+ "Mod4-Return" (kbd "s-RET"))
+(test-equal "The `SPC' key is converted to `space'"
+ "Ctrl-space" (kbd "C-SPC"))
+(test-equal "The `<backspace>' key is converted to `BackSpace'"
+ "Mod1-BackSpace" (kbd "M-<backspace>"))
+
+(test-end "kbd-test")