aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-12 10:07:09 -0500
committerCraig Jennings <c@cjennings.net>2026-06-12 10:07:09 -0500
commit5bfd74fd42b47a774b9982a5c44d00c92a2e6d63 (patch)
tree4a9b1ead425281218e6448d5aa488d511defdb57 /tests
parent1953b6cf73acf4e1bbf9f2ac14d2a539da55fb7c (diff)
downloaddotemacs-5bfd74fd42b47a774b9982a5c44d00c92a2e6d63.tar.gz
dotemacs-5bfd74fd42b47a774b9982a5c44d00c92a2e6d63.zip
fix(keys): bind eww/elfeed/calibredb launchers to the uppercase Meta event
Meta+Shift+<letter> emits the uppercase event (M-E/M-R/M-B), so the M-S-e/M-S-r/M-S-b :bind specs on lowercase letters were never reached by the keychord and the three launchers were dead. Rebind them to M-E/M-R/M-B. Three ERT tests assert each chord resolves to eww, cj/elfeed-open, and calibredb respectively.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-launcher-meta-shift-keys.el32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/test-launcher-meta-shift-keys.el b/tests/test-launcher-meta-shift-keys.el
new file mode 100644
index 00000000..574a8d68
--- /dev/null
+++ b/tests/test-launcher-meta-shift-keys.el
@@ -0,0 +1,32 @@
+;;; test-launcher-meta-shift-keys.el --- Meta+Shift launcher keys reach their commands -*- lexical-binding: t; -*-
+
+;;; Commentary:
+;; Meta+Shift+<letter> emits the uppercase event (M-E, M-R, M-B), so a
+;; binding written as "M-S-e" on a lowercase letter is never reached by
+;; the keychord. These launchers must be bound under the uppercase
+;; event the keyboard actually produces.
+
+;;; Code:
+
+(require 'ert)
+(require 'testutil-general)
+
+(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
+(require 'eww-config)
+(require 'elfeed-config)
+(require 'calibredb-epub-config)
+
+(ert-deftest test-launcher-meta-shift-e-opens-eww ()
+ "Normal: M-E (Meta+Shift+e) is bound to `eww'."
+ (should (eq (key-binding (kbd "M-E")) 'eww)))
+
+(ert-deftest test-launcher-meta-shift-r-opens-elfeed ()
+ "Normal: M-R (Meta+Shift+r) is bound to `cj/elfeed-open'."
+ (should (eq (key-binding (kbd "M-R")) 'cj/elfeed-open)))
+
+(ert-deftest test-launcher-meta-shift-b-opens-calibredb ()
+ "Normal: M-B (Meta+Shift+b) is bound to `calibredb'."
+ (should (eq (key-binding (kbd "M-B")) 'calibredb)))
+
+(provide 'test-launcher-meta-shift-keys)
+;;; test-launcher-meta-shift-keys.el ends here