aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-02 00:00:47 -0400
committerCraig Jennings <c@cjennings.net>2026-07-02 00:00:47 -0400
commit622a4d8c13a5037e064cf9caa3e917100f7f5cc9 (patch)
tree933e7efb483f16e379a15aa282e3fc1584b6ce79 /modules
parent37d92510afbaea8609e8aa3612c6e9d27edba12d (diff)
downloaddotemacs-622a4d8c13a5037e064cf9caa3e917100f7f5cc9.tar.gz
dotemacs-622a4d8c13a5037e064cf9caa3e917100f7f5cc9.zip
fix(keybindings): retire the two-column F2 and C-x 6 bindings
A grazed F2 followed by a stray 2, s, or b invokes two-column mode, which replaces the buffer's mode-line-format with its own retro layout and spawns a 2C/ companion buffer. That's what mangled the modeline in an agent terminal: eat semi-char buffers don't forward F2, so the prefix was armed everywhere. Nothing of mine uses global F2 (markdown-mode's binding lives in its own map), so I unbound both routes to 2C-command. cj/modeline-reset repairs a hijacked buffer.
Diffstat (limited to 'modules')
-rw-r--r--modules/keybindings.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/keybindings.el b/modules/keybindings.el
index 7072cb9c..3e51b2dd 100644
--- a/modules/keybindings.el
+++ b/modules/keybindings.el
@@ -147,6 +147,12 @@ Errors if VAR is unbound, not a non-empty string, or the file does not exist."
;; ---------------------------- General Keybindings ----------------------------
;; Avoid hostile bindings
+;; two-column mode (2C-command): a grazed F2 + a stray 2/s/b replaces the
+;; buffer's mode-line-format with 2C's own retro layout and spawns a 2C/
+;; companion buffer. eat semi-char buffers don't forward F2, so the trap
+;; is armed everywhere. cj/modeline-reset repairs a hijacked buffer.
+(keymap-global-unset "<f2>") ;; 2C-command prefix
+(keymap-global-unset "C-x 6") ;; 2C-command prefix (same map)
(keymap-global-unset "C-x C-f") ;; find-file-read-only
(keymap-global-set "C-x C-f" #'find-file)
(keymap-global-set "C-z" (make-sparse-keymap)) ;; replace suspend-frame with prefix map