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

[PATCH] gitk: map / to focus the search box

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Dec 2, 2008, 01:19 UTC
Message-ID
<1228180762-15739-1-git-send-email-giuseppe.bilotta@gmail.com>
In-Reply-To
<18740.26151.55900.953153@cargo.ozlabs.ibm.com>

The / key is often used to initiate searches (less, vim, some web browsers). We change the binding for the / (slash) key from 'find next' to 'focus the search box' to follow this convention.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
Like this?
 gitk-git/gitk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 6b671a6..0c0350b 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2271,7 +2271,7 @@ proc makewindow {} {
     bindkey b prevfile
     bindkey d "$ctext yview scroll 18 units"
     bindkey u "$ctext yview scroll -18 units"
-    bindkey / {dofind 1 1}
+    bindkey / {focus $fstring}
     bindkey <Key-Return> {dofind 1 1}
     bindkey ? {dofind -1 1}
     bindkey f nextfile
@@ -2652,7 +2652,7 @@ proc keys {} {
 [mc "<%s-F>		Find" $M1T]
 [mc "<%s-G>		Move to next find hit" $M1T]
 [mc "<Return>	Move to next find hit"]
-[mc "/		Move to next find hit, or redo find"]
+[mc "/		Focus the search box"]
 [mc "?		Move to previous find hit"]
 [mc "f		Scroll diff view to next file"]
 [mc "<%s-S>		Search for next hit in diff view" $M1T]
-- 
1.5.6.5
Previous: Paul Mackerras
Message 3 of 3 in “gitk: map / to focus the search box”
  1. gitk: map / to focus the search boxGiuseppe Bilotta, Nov 23, 2008
  2. Paul MackerrasDec 1, 2008
  3. gitk: map / to focus the search boxGiuseppe Bilotta, Dec 2, 2008

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.