From 5d7633c74dbe47690eb837946ca9f17453dbe13f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 13 Jun 2026 00:56:38 -0500 Subject: fix(keys): revert 936c9fd2, restore the M-S- launcher bindings 936c9fd2 rebound eww/elfeed/calibredb from M-S-e/r/b to the uppercase Meta events M-E/M-R/M-B, on the theory that the keyboard emits the uppercase event and the lowercase-shift spec never matched. It was wrong. keyboard-compat.el installs a key-translation-map entry (M-E -> M-S-e, etc.) in GUI frames, so the original M-S- bindings did reach the launchers. Binding M-E directly while that translation stayed in place rewrote the keypress to the now-unbound M-S-e, breaking all three in GUI on the next restart. The audit and the review missed it because they checked key-binding, which ignores key-translation-map, and the running daemon still held the pre-fix bindings as stale state. This restores M-S-e/r/b, deletes the key-binding-only test that certified the broken config, and reclassifies the task as not-a-bug. The real problem, that these chords are dead outside GUI, is the subject of the keybinding-console-safety spec. --- modules/calibredb-epub-config.el | 2 +- modules/elfeed-config.el | 2 +- modules/eww-config.el | 2 +- tests/test-launcher-meta-shift-keys.el | 32 -------------------------------- 4 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 tests/test-launcher-meta-shift-keys.el diff --git a/modules/calibredb-epub-config.el b/modules/calibredb-epub-config.el index 20262e6e4..a17bf8c91 100644 --- a/modules/calibredb-epub-config.el +++ b/modules/calibredb-epub-config.el @@ -112,7 +112,7 @@ which re-applies `calibredb-search-filter' instead." (use-package calibredb :commands calibredb :bind - ("M-B" . calibredb) ;; Meta+Shift+b emits the uppercase event; overrides backward-word + ("M-S-b" . calibredb) ;; was M-B, overrides backward-word ;; use built-in filter by tag, add clear-filters (:map calibredb-search-mode-map ("l" . calibredb-filter-by-tag) diff --git a/modules/elfeed-config.el b/modules/elfeed-config.el index 4f4089157..ad7bda83a 100644 --- a/modules/elfeed-config.el +++ b/modules/elfeed-config.el @@ -33,7 +33,7 @@ (use-package elfeed :bind - ("M-R" . cj/elfeed-open) ;; Meta+Shift+r emits the uppercase event + ("M-S-r" . cj/elfeed-open) ;; was M-R (:map elfeed-show-mode-map ("w" . eww-open-in-new-buffer)) (:map elfeed-search-mode-map diff --git a/modules/eww-config.el b/modules/eww-config.el index 18648c1ba..066fae989 100644 --- a/modules/eww-config.el +++ b/modules/eww-config.el @@ -67,7 +67,7 @@ (use-package eww :ensure nil ;; built-in :bind - (("M-E" . eww) ;; Meta+Shift+e emits the uppercase event; overrides forward-sentence + (("M-S-e" . eww) ;; was M-E, overrides forward-sentence :map eww-mode-map ("<" . eww-back-url) (">" . eww-forward-url) diff --git a/tests/test-launcher-meta-shift-keys.el b/tests/test-launcher-meta-shift-keys.el deleted file mode 100644 index 574a8d68e..000000000 --- a/tests/test-launcher-meta-shift-keys.el +++ /dev/null @@ -1,32 +0,0 @@ -;;; test-launcher-meta-shift-keys.el --- Meta+Shift launcher keys reach their commands -*- lexical-binding: t; -*- - -;;; Commentary: -;; Meta+Shift+ 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 -- cgit v1.2.3