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

Re: [PATCH] gitk: Add workaround for system where Shift-F5 mapped to Shift-XF86_Switch_VT_5

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 1, 2012, 17:27 UTC
Message-ID
<7vwqzacdb7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1349105191-31681-2-git-send-email-andrew.kw.w@gmail.com>
Andrew Wong <andrew.kw.w@gmail.com> writes:
Show 20 quoted lines
> The same workaround was used for Shift-F4 in:
>   cea07cf8dc9b3677e0c50433c0d72bce83adbdc7
>
> Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
> ---
>  gitk-git/gitk | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gitk-git/gitk b/gitk-git/gitk
> index d93bd99..698b84a 100755
> --- a/gitk-git/gitk
> +++ b/gitk-git/gitk
> @@ -2496,6 +2496,7 @@ proc makewindow {} {
>      bindkey f nextfile
>      bind . <F5> updatecommits
>      bind . <Shift-F5> reloadcommits
> +    catch { bind . <Shift-Key-XF86_Switch_VT_5> reloadcommits }
>      bind . <F2> showrefs
>      bind . <Shift-F4> {newview 0}
>      catch { bind . <Shift-Key-XF86_Switch_VT_4> {newview 0} }

Wouldn't it make more sense to have a small helper function to wrap binding both <Shift-Fn> and <Shift-Key-XF86_Switch_VT_n> to the same thing and have F4 and F5 binding use that to avoid repetition?

Previous: Andrew WongNext: Andrew Wong
Message 4 of 11 in “gitk: can't reload commits with new key binding”
  1. SZEDER GáborSep 30, 2012
  2. Andrew WongOct 1, 2012
  3. gitk: Add workaround for system where Shift-F5 mapped to Shift-XF86_Switch_VT_5Andrew Wong, Oct 1, 2012
  4. Junio C HamanoOct 1, 2012
  5. 0/2 Re: gitk: can't reload commits with new key bindingAndrew Wong, Oct 2, 2012
  6. 1/2 gitk: Refactor code for binding modified function keysAndrew Wong, Oct 2, 2012
  7. 2/2 gitk: Use bindshiftfunctionkey to bind Shift-F5Andrew Wong, Oct 2, 2012
  8. Andrew WongOct 7, 2012
  9. SZEDER GáborOct 8, 2012
  10. Andrew WongOct 12, 2012
  11. Paul MackerrasOct 21, 2012

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.