From f2c31db680e4b93e58e8668a1ec6f87ec84c280d Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 29 Jun 2026 18:58:10 -0400 Subject: fix(eat): register F1 so it reaches Emacs from agent terminals F1 (cj/dashboard-only, the kill-all sweep back to the dashboard) was swallowed by the pty inside agent EAT buffers. EAT forwards unbound keys to the terminal, so I bound F1 in eat-semi-char-mode-map and eat-mode-map alongside the existing F12 and C-; passthroughs. Unlike ghostel, EAT needs no exception-list or keymap rebuild. --- modules/eat-config.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/eat-config.el b/modules/eat-config.el index f53baed31..3fca0f04b 100644 --- a/modules/eat-config.el +++ b/modules/eat-config.el @@ -27,6 +27,7 @@ (declare-function eat "eat" (&optional program arg)) (declare-function eshell "eshell" (&optional arg)) +(declare-function cj/dashboard-only "dashboard-config") (defvar eat-mode-map) (defvar eat-semi-char-mode-map) (defvar eshell-buffer-name) @@ -110,12 +111,17 @@ ARGS is (TERMINAL OUTPUT)." (eat-sixel-render-formats '(xpm svg half-block background none)) ; inline images (on by default) (eat-query-before-killing-running-terminal 'auto) ; confirm before killing a terminal with a live process :config - ;; F12 and C-; must reach Emacs from inside EAT. In semi-char mode (EAT's - ;; default) EAT forwards unbound keys to the terminal -- a letter runs + ;; F1, F12, and C-; must reach Emacs from inside EAT. In semi-char mode + ;; (EAT's default) EAT forwards unbound keys to the terminal -- a letter runs ;; `eat-self-input' -- so bind these explicitly or they never reach Emacs: - ;; F12 toggles the terminal window, C-; opens the global prefix map. + ;; F1 runs the kill-all sweep back to the dashboard (`cj/dashboard-only', + ;; which buries agent buffers rather than killing them), F12 toggles the + ;; terminal window, C-; opens the global prefix map. Unlike ghostel, EAT + ;; needs no exception-list or keymap rebuild -- the bind alone suffices. + (keymap-set eat-semi-char-mode-map "" #'cj/dashboard-only) (keymap-set eat-semi-char-mode-map "" #'cj/term-toggle) (keymap-set eat-semi-char-mode-map "C-;" cj/custom-keymap) + (keymap-set eat-mode-map "" #'cj/dashboard-only) (keymap-set eat-mode-map "" #'cj/term-toggle) (keymap-set eat-mode-map "C-;" cj/custom-keymap)) -- cgit v1.2.3