Tidy Layout on Ctrl/Cmd+W

Joins the Command/Control shortcut pairs, so the chord works the same on
either platform, and the View menu entry now shows it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-04 21:28:34 +03:00
co-authored by Claude Opus 5
parent 4988483c64
commit 5f66ecef7b
3 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -1174,6 +1174,7 @@ SHORTCUTS = [
("z", do_undo),
("y", do_redo),
("b", toggle_left_column),
("w", do_tidy_layout),
]
for key, handler in SHORTCUTS:
window.bind_all(f"<Command-{key}>", handler)
@@ -1229,7 +1230,9 @@ menu_view.add_command(
label=MENU_FORWARD_LABEL, command=go_forward, accelerator="Alt+Right", state="disabled"
)
menu_view.add_separator()
menu_view.add_command(label="Tidy Layout", command=do_tidy_layout)
menu_view.add_command(
label="Tidy Layout", command=do_tidy_layout, accelerator=f"{accel_mod}+W"
)
menu_bar.add_cascade(label="View", menu=menu_view)
menu_kits = tk.Menu(menu_bar, tearoff=0)