git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk: Add shortcut Ctrl-W for closing the active window

From
Jens Lehmann <jens.lehmann@web.de>
Date
Feb 2, 2010, 22:11 UTC
Message-ID
<4B68A310.6000807@web.de>

To make the user experience between git gui and gitk more homogeneous, use Ctrl-W in gitk too for closing the active window. When closing the main window doquit is called for proper cleanup.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Found myself hitting Ctrl-W in gitk with no effect once too often ;-)
 gitk-git/gitk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 03dd0f4..9629394 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2383,6 +2383,8 @@ proc makewindow {} {
     }
     bindall <$::BM> "canvscan mark %W %x %y"
     bindall <B$::BM-Motion> "canvscan dragto %W %x %y"
+    bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
+    bind . <$M1B-Key-w> doquit
     bindkey <Home> selfirstline
     bindkey <End> sellastline
     bind . <Key-Up> "selnextline -1"
@@ -2814,6 +2816,7 @@ proc keys {} {
 [mc "Gitk key bindings:"]

 [mc "<%s-Q>		Quit" $M1T]
+[mc "<%s-W>		Close window" $M1T]
 [mc "<Home>		Move to first commit"]
 [mc "<End>		Move to last commit"]
 [mc "<Up>, p, i	Move up one commit"]
-- 
1.7.0.rc1.173.gc7c5.dirty
Next: Jacob Todd
Message 1 of 3 in “gitk: Add shortcut Ctrl-W for closing the active window”
  1. gitk: Add shortcut Ctrl-W for closing the active windowJens Lehmann, Feb 2, 2010
  2. Jacob ToddFeb 2, 2010
  3. Chris FreyFeb 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.