From cca5700f380f2a844d52d4345e08f89c6603aa45 Mon Sep 17 00:00:00 2001 From: Vikas Kumar <1178022+kvikas@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:31:26 -0800 Subject: [PATCH] config: Show `mods` before `key` for `wezterm show-keys --lua` (#7539) --- wezterm-gui/src/inputmap.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wezterm-gui/src/inputmap.rs b/wezterm-gui/src/inputmap.rs index d7f5b0e57..9c9e243dd 100644 --- a/wezterm-gui/src/inputmap.rs +++ b/wezterm-gui/src/inputmap.rs @@ -499,7 +499,7 @@ impl InputMap { pub fn show_keys(&self) { if let Some((key, mods, duration)) = &self.leader { - println!("Leader: {key:?} {mods:?} {duration:?}"); + println!("Leader: {mods:?} {key:?} {duration:?}"); } section_header("Default key table"); @@ -775,7 +775,7 @@ fn lua_key(key: &KeyCode, mods: Modifiers, action: &KeyAssignment) -> String { let mods = format!("{mods:?}").replace(" ", ""); - format!("{{ key = {key}, mods = '{mods}', action = {action} }}") + format!("{{ mods = '{mods}', key = {key}, action = {action} }}") } fn show_key_table(table: &config::keyassignment::KeyTable) {