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

Re: [PATCH v5] git-gui: Add hotkeys to set widget focus

From
Pratyush Yadav <me@yadavpratyush.com>
Date
Sep 5, 2019, 12:33 UTC
Message-ID
<20190905123319.c53x34yxlt2abiac@yadavpratyush.com>
In-Reply-To
<xmqqy2z3r5sx.fsf@gitster-ct.c.googlers.com>
On 04/09/19 04:38PM, Junio C Hamano wrote:
Show 40 quoted lines
> Pratyush Yadav <me@yadavpratyush.com> writes:
> 
> > On 04/09/19 11:39PM, Johannes Sixt wrote:
> >> Am 04.09.19 um 21:20 schrieb Birger Skogeng Pedersen:
> >> > On Wed, Sep 4, 2019 at 8:59 PM Johannes Sixt <j6t@kdbg.org> wrote:
> >> >> Many keyboards do not have a right Alt-key. That means that Alt+1 to
> >> >> Alt+4 combinations must be typed single-handed with the left hand. This
> >> >> is mildly awkward for Alt+4. Can we please have the very important
> >> >> commit widget *not* at Alt+4? I could live with Alt+3.
> >> > 
> >> > (RightAlt wouldn't be used by Europeans, anyways)
> >> > Are you suggesting to keep Alt+1/2/3 for the files/staged/diff
> >> > widgets, but use something other than Alt+4 for the commit dialog? If
> >> > so, which one would you prefer?
> >> 
> >> I was suggesting Alt+3 for the commit message widget, but my preferences
> >> are actually Alt+1, Alt+2, Alt+3, in this order. My preference for the
> >> diff widget would be Alt+4 (the awkward one) because I do not foresee
> >> that I would use it a lot. Use what remains for the two file lists.
> >
> > I wonder if that binding is very intuitive.  If we do 1/2 for the top 
> > and bottom panes on the left side, and 3/4 for the top and bottom panes 
> > on the right side, that makes some sense.  Doing it your way makes it a 
> > counter-clockwise motion.
> >
> > I am not arguing for or against this proposal, just pointing something 
> > worth thinking about.  Either way, I suppose after a while it becomes 
> > muscle memory so I'm not sure how much difference this subtle thing will 
> > make.
> >
> >> 
> >> > The initial propsal from me was to use CTRL/CMD+1/2/3/4. What do you
> >> > think of using the CTRL/CMD key instead of ALT?
> >> 
> >> I would not mind Ctrl instead of Alt. Take your pick.
> >
> > FWIW, I vote for sticking with Alt.
> 
> Can't these differences in personal preference be solved by
> configurable key binding?

They can be. But as of now, there is no existing mechanism to specify keybindings in git-gui that I know of, so that is not a trivial task. And if we do go with configurable keybindings, that raises the question of whether we should allow all existing keybindings to be changed. Again, this is a significant refactor.

And in the end we still have to come up with a reasonable default, so this discussion is still worth having IMO. We can keep configurable key keybindings as a future feature. Of course, if the contributors are willing to implement this feature along with this patch it would be great, but I don't think that is reason enough to block this patch for too long.

-- 
Regards,
Pratyush Yadav
Previous: Junio C HamanoNext: Bert Wesarg
Message 33 of 46 in “git-gui, feature request: add hotkeys to focus different widgets”
  1. Birger Skogeng PedersenFeb 20, 2018
  2. git-gui: Add hotkeys to change focus between ui widgetsBirger Skogeng Pedersen, Feb 23, 2018
  3. Birger Skogeng PedersenFeb 23, 2018
  4. git-gui: Add hotkeys to change focus between ui widgetsBirger Skogeng Pedersen, Feb 28, 2018
  5. Johannes SchindelinMar 5, 2018
  6. Birger Skogeng PedersenMar 6, 2018
  7. Junio C HamanoMar 6, 2018
  8. git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Aug 31, 2019
  9. Birger Skogeng PedersenAug 31, 2019
  10. Pratyush YadavSep 1, 2019
  11. Junio C HamanoSep 1, 2019
  12. Birger Skogeng PedersenSep 1, 2019
  13. Bert WesargSep 1, 2019
  14. [PATCH] git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Sep 1, 2019
  15. Pratyush YadavSep 2, 2019
  16. Birger Skogeng PedersenSep 2, 2019
  17. Pratyush YadavSep 2, 2019
  18. Birger Skogeng PedersenSep 2, 2019
  19. Bert WesargSep 2, 2019
  20. Birger Skogeng PedersenSep 3, 2019
  21. Pratyush YadavSep 3, 2019
  22. git-gui: use path name instead of list index to track last clicked filePratyush Yadav, Sep 3, 2019
  23. git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Sep 3, 2019
  24. Birger Skogeng PedersenSep 3, 2019
  25. Birger Skogeng PedersenSep 3, 2019
  26. Pratyush YadavSep 3, 2019
  27. git-gui: Add hotkeys to set widget focusBirger Skogeng Pedersen, Sep 4, 2019
  28. Johannes SixtSep 4, 2019
  29. Birger Skogeng PedersenSep 4, 2019
  30. Johannes SixtSep 4, 2019
  31. Pratyush YadavSep 4, 2019
  32. Junio C HamanoSep 4, 2019
  33. Pratyush YadavSep 5, 2019
  34. Bert WesargSep 4, 2019
  35. Johannes SixtSep 4, 2019
  36. Pratyush YadavSep 10, 2019
  37. Birger Skogeng PedersenSep 11, 2019
  38. Pratyush YadavSep 11, 2019
  39. Johannes SixtSep 11, 2019
  40. Bert WesargSep 3, 2019
  41. Philip OakleySep 1, 2019
  42. Pratyush YadavSep 2, 2019
  43. Philip OakleySep 2, 2019
  44. Pratyush YadavSep 3, 2019
  45. Bert WesargSep 1, 2019
  46. Birger Skogeng PedersenSep 1, 2019

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.