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

Re: [PATCH 0/9] gitk: improve keyboard support

From
JLJens Lideström <jens@lidestrom.se>
Date
Jun 28, 2023, 17:32 UTC
Message-ID
<102dabfc-595b-5f85-bc2c-ed9a003cd7bd@lidestrom.se>
In-Reply-To
<0cb94aa5-726f-a57f-858c-b29764c63ce7@kdbg.org>
@Hannes: I choose key combinations with Ctrl+<another-key>.
Another possibility is to use Ctrl+Shift+<another-key>. That is more complicated to press, but it creates a nice distinction between two categories of commands:
Searching and navigation command (existing): Ctrl+<another-key>
Branch modification commands (new): Ctrl+Shift+<another-key>
Do you have any opinion on this? Only Ctrl, or Ctrl+Shift for the new commands?
/Jens
On 2023-06-28 08:09, Johannes Sixt wrote:
Show 51 quoted lines
> Am 27.06.23 um 16:41 schrieb Jens Lidestrom via GitGitGadget:
>> It is often convenient to use the keyboard to navigate the gitk GUI and
>> there are keyboard shortcut bindings for many operations such as searching
>> and scrolling. There is however no keyboard binding for the most common
>> operations on branches and commits: Check out, reset, cherry-pick, create
>> and delete branches.
>>
>> This PR adds keyboard bindings for these 5 commands. It also adjusts some
>> GUI focus defaults to simplify keyboard navigation.
>>
>> Some refactoring of the command implementation has been necessary.
>> Originally the commands was using the mouse context menu to get info about
>> the head and commit to act on. When using keyboard binds this information
>> isn't available so instead the row that is selected in the GUI is used. By
>> adding procedures for doing this the PR lays the groundwork for more similar
>> keyboard binds in the future.
> I like it when an application can be navigated with the keyboard. These
> changes are very much appreciated.
>
> I've left some comments on individual commits. The important one is that
> I think it makes the Reset dialog way too easy to destroy uncommitted work.
>
> Please note that gitk-git directory is in its own repository that is
> only subtree-merged into the Git repository. You should generate patches
> against git://git.ozlabs.org/~paulus/gitk (I don't know how difficult it
> would be for Paul to integrate patches that were generated by gitgitgadget).
>
> -- Hannes
>
>> I'm including Paul Mackerras because he seems to be the maintainer of gitk.
>> Can you review, Paul?
>>
>> Jens Lidestrom (9):
>>    gitk: add procedures to get commit info from selected row
>>    gitk: use term "current branch" in gui
>>    gitk: add keyboard bind for reset
>>    gitk: show branch name in reset dialog
>>    gitk: add keyboard bind for checkout
>>    gitk: add keyboard bind for create and remove branch
>>    gitk: add keyboard bind to cherry-pick
>>    gitk: focus ok button in reset dialog
>>    gitk: default select reset hard in dialog
>>
>>   gitk-git/gitk | 132 ++++++++++++++++++++++++++++++++++++--------------
>>   1 file changed, 96 insertions(+), 36 deletions(-)
>>
>>
>> base-commit: 94486b6763c29144c60932829a65fec0597e17b3
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1551%2Fjensli%2Fkeyboard-for-gitk-v1
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1551/jensli/keyboard-for-gitk-v1
>> Pull-Request: https://github.com/gitgitgadget/git/pull/1551
Previous: Jens LideströmNext: Johannes Sixt
Message 21 of 42 in “gitk: improve keyboard support”
  1. 0/9 gitk: improve keyboard supportJens Lidestrom via GitGitGadget, Jun 27, 2023
  2. 1/9 gitk: add procedures to get commit info from selected rowJens Lidestrom via GitGitGadget, Jun 27, 2023
  3. 2/9 gitk: use term "current branch" in guiJens Lidestrom via GitGitGadget, Jun 27, 2023
  4. 3/9 gitk: add keyboard bind for resetJens Lidestrom via GitGitGadget, Jun 27, 2023
  5. 4/9 gitk: show branch name in reset dialogJens Lidestrom via GitGitGadget, Jun 27, 2023
  6. 5/9 gitk: add keyboard bind for checkoutJens Lidestrom via GitGitGadget, Jun 27, 2023
  7. Jens LideströmJul 2, 2023
  8. 6/9 gitk: add keyboard bind for create and remove branchJens Lidestrom via GitGitGadget, Jun 27, 2023
  9. Johannes SixtJun 28, 2023
  10. Jens LideströmJun 28, 2023
  11. Johannes SixtJun 28, 2023
  12. Jens LideströmJul 2, 2023
  13. 7/9 gitk: add keyboard bind to cherry-pickJens Lidestrom via GitGitGadget, Jun 27, 2023
  14. 8/9 gitk: focus ok button in reset dialogJens Lidestrom via GitGitGadget, Jun 27, 2023
  15. 9/9 gitk: default select reset hard in dialogJens Lidestrom via GitGitGadget, Jun 27, 2023
  16. Johannes SixtJun 28, 2023
  17. Jens LideströmJun 28, 2023
  18. Jens LideströmJul 2, 2023
  19. Johannes SixtJun 28, 2023
  20. Jens LideströmJun 28, 2023
  21. Jens LideströmJun 28, 2023
  22. Johannes SixtJun 28, 2023
  23. Jens LideströmJul 2, 2023
  24. 00/10 gitk: improve keyboard supportJens Lidestrom via GitGitGadget, Jul 3, 2023
  25. 01/10 gitk: add procedures to get commit info from selected rowJens Lidestrom via GitGitGadget, Jul 3, 2023
  26. 02/10 gitk: use term "current branch" in guiJens Lidestrom via GitGitGadget, Jul 3, 2023
  27. 03/10 gitk: add keyboard bind for reset commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  28. 04/10 gitk: show branch name in reset dialogJens Lidestrom via GitGitGadget, Jul 3, 2023
  29. 06/10 gitk: add keyboard bind for remove branch commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  30. Johannes SixtJul 5, 2023
  31. Jens LideströmJul 8, 2023
  32. 05/10 gitk: add keyboard bind for checkout commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  33. Johannes SixtJul 5, 2023
  34. Jens LideströmJul 8, 2023
  35. 07/10 gitk: add keyboard bind for cherry-pick commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  36. Johannes SixtJul 5, 2023
  37. Jens LideströmJul 8, 2023
  38. 08/10 gitk: add keyboard bind for create branch commandJens Lidestrom via GitGitGadget, Jul 3, 2023
  39. Johannes SixtJul 5, 2023
  40. 09/10 gitk: improve keyboard convenience in reset dialogJens Lidestrom via GitGitGadget, Jul 3, 2023
  41. Johannes SixtJul 5, 2023
  42. 10/10 gitk: allow checkout of remote branchJens Lidestrom via GitGitGadget, Jul 3, 2023

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.