{"thread":{"id":"51782","subject":"feature request, git-gui: add hotkey to toggle amend/new","startedAt":"2019-08-31T12:51:52Z","lastAt":"2019-09-11T18:47:21Z","messageCount":27,"participants":["Birger Skogeng Pedersen","Bert Wesarg","David","Pratyush Yadav","Johannes Sixt","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"381624","messageId":"CAGr--=Jw4DAqTi3ROujtE=xBMYErMws6B6vhuXYMQA+5Q1ccow@mail.gmail.com","threadId":"51782","inReplyTo":null,"subject":"feature request, git-gui: add hotkey to toggle amend/new","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-08-31T10:51:37Z","receivedAt":"2019-08-31T12:51:52Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"In my pursuit to fully utilize git-gui with only using a keyboard, I\nsuggest that there is a hotkey to toggle between selecting \"New\nCommit\" and \"Amend Last Commit\".\n\nNot sure which key-combination that fits this purpose best, but my\nsuggestion is CTRL/CMD+Z.\n\nBest regards,\nBirger\n"},{"id":"381657","messageId":"CAGr--=JkNqcrcenp6F1_CHTun_9wPLVvEWGOFJW=ng=XfO+jHw@mail.gmail.com","threadId":"51782","inReplyTo":"CAGr--=Jw4DAqTi3ROujtE=xBMYErMws6B6vhuXYMQA+5Q1ccow@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T16:25:24Z","receivedAt":"2019-09-02T16:25:41Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"I just now realized what a terrible suggestion CTRL+Z was.\nI propose CTRL/CMD+E to toggle between amend/new commit.\n\nOn Sat, Aug 31, 2019 at 12:51 PM Birger Skogeng Pedersen\n<birger.sp@gmail.com> wrote:\n>\n> In my pursuit to fully utilize git-gui with only using a keyboard, I\n> suggest that there is a hotkey to toggle between selecting \"New\n> Commit\" and \"Amend Last Commit\".\n>\n> Not sure which key-combination that fits this purpose best, but my\n> suggestion is CTRL/CMD+Z.\n>\n> Best regards,\n> Birger\n"},{"id":"381666","messageId":"CAKPyHN3Zvf6gtKAq03s8AsguaOFG=g2huGRCTWmBVWioDBqFWw@mail.gmail.com","threadId":"51782","inReplyTo":"CAGr--=JkNqcrcenp6F1_CHTun_9wPLVvEWGOFJW=ng=XfO+jHw@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-02T18:07:55Z","receivedAt":"2019-09-02T18:08:09Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Birger,\n\nOn Mon, Sep 2, 2019 at 6:25 PM Birger Skogeng Pedersen\n<birger.sp@gmail.com> wrote:\n>\n> I just now realized what a terrible suggestion CTRL+Z was.\n> I propose CTRL/CMD+E to toggle between amend/new commit.\n>\n> On Sat, Aug 31, 2019 at 12:51 PM Birger Skogeng Pedersen\n> <birger.sp@gmail.com> wrote:\n> >\n> > In my pursuit to fully utilize git-gui with only using a keyboard, I\n> > suggest that there is a hotkey to toggle between selecting \"New\n> > Commit\" and \"Amend Last Commit\".\n> >\n> > Not sure which key-combination that fits this purpose best, but my\n> > suggestion is CTRL/CMD+Z.\n\nI think with your \"focus\" patch, this is not needed anymore:\n\nAfter focusing the commit message widget, you can focus the radio\nbuttons with Tab/Shift+Tab and press Space.\n\nI think this is short enough, so that wasting a Letter is not justified here.\n\nBest,\nBert\n\n> >\n> > Best regards,\n> > Birger\n"},{"id":"381685","messageId":"CAGr--=JyJHTxtQWSnU7ivQ79qXcg7o4N142+5FSdre851xss6A@mail.gmail.com","threadId":"51782","inReplyTo":"CAKPyHN3Zvf6gtKAq03s8AsguaOFG=g2huGRCTWmBVWioDBqFWw@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T19:49:02Z","receivedAt":"2019-09-02T19:49:16Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi Bert,\n\n\nOn Mon, Sep 2, 2019 at 8:08 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> I think with your \"focus\" patch, this is not needed anymore:\n>\n> After focusing the commit message widget, you can focus the radio\n> buttons with Tab/Shift+Tab and press Space.\n>\n> I think this is short enough, so that wasting a Letter is not justified here.\n\nPressing the Tab key while the commit message widget is focused\ninserts a tab in the commit message.\n(Again, I'm on Windows so you might get different behaviour on Linux)\n\nIf the Tab key acted like you suggested, I agree it would not be\nnecessary with this a hotkey like this.\n\n\nBest regards,\nBirger\n"},{"id":"381687","messageId":"20190902195618.3820-1-birger.sp@gmail.com","threadId":"51782","inReplyTo":"CAGr--=JyJHTxtQWSnU7ivQ79qXcg7o4N142+5FSdre851xss6A@mail.gmail.com","subject":"[PATCH] Add hotkey to toggle \"Amend Last Commit\" radio selector","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-02T19:56:18Z","receivedAt":"2019-09-02T19:56:31Z","isPatch":true,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Selecting whether to do a \"New Commit\" or \"Amend Last Commit\" does not have\na hotkey.\n\nWith this patch, the user may toggle between the two options with\nCTRL/CMD+e.\n\nSigned-off-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n---\n git-gui.sh | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 5bc21b8..14be1e0 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -2640,6 +2640,16 @@ proc show_less_context {} {\n \t}\n }\n \n+proc toggle_commit_type {} {\n+\tglobal selected_commit_type\n+\tif {[string match amend* $selected_commit_type]} {\n+\t\tset selected_commit_type new\n+\t} else {\n+\t\tset selected_commit_type amend\n+\t}\n+\tdo_select_commit_type\n+}\n+\n ######################################################################\n ##\n ## ui construction\n@@ -3843,6 +3853,7 @@ bind .   <$M1B-Key-equal> {show_more_context;break}\n bind .   <$M1B-Key-plus> {show_more_context;break}\n bind .   <$M1B-Key-KP_Add> {show_more_context;break}\n bind .   <$M1B-Key-Return> do_commit\n+bind .   <$M1B-Key-e> toggle_commit_type\n foreach i [list $ui_index $ui_workdir] {\n \tbind $i <Button-1>       { toggle_or_diff click %W %x %y; break }\n \tbind $i <$M1B-Button-1>  { add_one_to_selection %W %x %y; break }\n-- \n2.21.0.windows.1\n\n"},{"id":"381688","messageId":"CAKPyHN3S-jLWmfHUyH9mCBPjHCEaBCbrkVQEKFqHv59U37=Kyg@mail.gmail.com","threadId":"51782","inReplyTo":"CAGr--=JyJHTxtQWSnU7ivQ79qXcg7o4N142+5FSdre851xss6A@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-02T20:12:25Z","receivedAt":"2019-09-02T20:12:39Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 2, 2019 at 9:49 PM Birger Skogeng Pedersen\n<birger.sp@gmail.com> wrote:\n>\n> Hi Bert,\n>\n>\n> On Mon, Sep 2, 2019 at 8:08 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > I think with your \"focus\" patch, this is not needed anymore:\n> >\n> > After focusing the commit message widget, you can focus the radio\n> > buttons with Tab/Shift+Tab and press Space.\n> >\n> > I think this is short enough, so that wasting a Letter is not justified here.\n>\n> Pressing the Tab key while the commit message widget is focused\n> inserts a tab in the commit message.\n> (Again, I'm on Windows so you might get different behaviour on Linux)\n>\n> If the Tab key acted like you suggested, I agree it would not be\n> necessary with this a hotkey like this.\n\ncan we try to figure this out, before going forward with anything else?\n\nThanks.\n\nBert\n\n>\n>\n> Best regards,\n> Birger\n"},{"id":"381690","messageId":"CAKPyHN08Z_9oByA8ruKwwXRcAfYPU95JaMb=pqQWwGwPVG=_og@mail.gmail.com","threadId":"51782","inReplyTo":"CAKPyHN3S-jLWmfHUyH9mCBPjHCEaBCbrkVQEKFqHv59U37=Kyg@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-02T20:15:25Z","receivedAt":"2019-09-02T20:15:38Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Sep 2, 2019 at 10:12 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n>\n> On Mon, Sep 2, 2019 at 9:49 PM Birger Skogeng Pedersen\n> <birger.sp@gmail.com> wrote:\n> >\n> > Hi Bert,\n> >\n> >\n> > On Mon, Sep 2, 2019 at 8:08 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > > I think with your \"focus\" patch, this is not needed anymore:\n> > >\n> > > After focusing the commit message widget, you can focus the radio\n> > > buttons with Tab/Shift+Tab and press Space.\n> > >\n> > > I think this is short enough, so that wasting a Letter is not justified here.\n> >\n> > Pressing the Tab key while the commit message widget is focused\n> > inserts a tab in the commit message.\n\ndoes Control-Tab works for traversal?\n\n> > (Again, I'm on Windows so you might get different behaviour on Linux)\n> >\n> > If the Tab key acted like you suggested, I agree it would not be\n> > necessary with this a hotkey like this.\n>\n> can we try to figure this out, before going forward with anything else?\n>\n> Thanks.\n>\n> Bert\n>\n> >\n> >\n> > Best regards,\n> > Birger\n"},{"id":"381700","messageId":"CAMPXz=pUWNVkM78UHm4NpFZ_nJQOa0ba07N3gMKFzWUiindZ1Q@mail.gmail.com","threadId":"51782","inReplyTo":"CAKPyHN3Zvf6gtKAq03s8AsguaOFG=g2huGRCTWmBVWioDBqFWw@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"David","fromEmail":"bouncingcats@gmail.com","sentAt":"2019-09-03T01:01:19Z","receivedAt":"2019-09-03T01:01:33Z","isPatch":false,"sender":{"key":"bouncingcats@gmail.com","avatar":null},"body":"On Tue, 3 Sep 2019 at 04:11, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> On Mon, Sep 2, 2019 at 6:25 PM Birger Skogeng Pedersen <birger.sp@gmail.com> wrote:\n> > On Sat, Aug 31, 2019 at 12:51 PM Birger Skogeng Pedersen <birger.sp@gmail.com> wrote:\n\n> > > In my pursuit to fully utilize git-gui with only using a keyboard, I\n> > > suggest that there is a hotkey to toggle between selecting \"New\n> > > Commit\" and \"Amend Last Commit\".\n\nHi, thanks for maintaining and contributing to git and git-gui, it's a\ngreat tool!\n\n> After focusing the commit message widget, you can focus the radio\n> buttons with Tab/Shift+Tab and press Space.\n\n> I think this is short enough, so that wasting a Letter is not\n> justified here.\n\nUgh, may I express how unhappy I am to read that opinion from\nthe maintainer. I strongly disagree, please reconsider :(\n\nAnd I enthusiastically support this initial request for a single\nhotkey to immediately toggle between \"New Commit\" and \"Amend Last\nCommit\". And it should work regardless of wherever the cursor or\nhighlight is currently active.\n\nI have used git-gui for many years and I find this is actually the\nmost annoying and inconsistent aspect of its user interface. Sometimes\nif one is lucky then \"spacebar\" will achieve it at startup or after\nrefresh, sometimes not. When I test here just now the suggested\ntab/shift-tab/spacebar method, it does toggle but it also changes the\nitems in the staged changes list as an unwanted side effect. My\nversion says 0.20.0.8.gd000, but I have a few local patches (written\nyears ago) so sorry I am not testing with a version that you have, but\neven so I wanted to report what I observed.\n\nIf one is often amending commit messages as I do during large\ninteractive rebases, it is painful to have to do some kind of\ncontext-sensitive multi-key dance just to change from \"New Commit\" to\n\"Amend Last Commit\". Especially when every other operation has become\na single keystroke in my muscle memory.\n\nIn my world it most definitely would not be \"wasting a letter\" to\nimplement this! It would instead be \"OMG at last that got fixed for\neveryone, hooray!\" :D\n"},{"id":"381706","messageId":"CAGr--=Jn87r_ySYkZmtqUBA40+fwdn0MbuN6_LNDO4mOWyoKTg@mail.gmail.com","threadId":"51782","inReplyTo":"CAKPyHN08Z_9oByA8ruKwwXRcAfYPU95JaMb=pqQWwGwPVG=_og@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-03T05:37:50Z","receivedAt":"2019-09-03T05:40:16Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"On Mon, Sep 2, 2019 at 10:15 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> does Control-Tab works for traversal?\n\n\nBert,\n\nControl+Tab works for traversal, but as a means to toggle new/amend\nit's very tedious. I have to press Ctrl+Tab 9 times to select \"new\"\nand 10 times to select \"Amend\"(!). Then 1 or 2 more times to go back\nto the input area.\nI sincerely doubt that this is your preferred method of switching\nbetween new/amend. At this point we're better of letting go of the\nkeyboard and use the mouse, which is what I'm trying to avoid.\n\n> I think this is short enough, so that wasting a Letter is not justified here.\nI (also) often amend commits, so having a hotkey for this is quite a\nnecessity imo.\n\n\nBirger\n"},{"id":"381711","messageId":"CAKPyHN3S60U8jODeDaVimstF_GkmCCFqDn-AM=urgqKqUnJmAA@mail.gmail.com","threadId":"51782","inReplyTo":"CAMPXz=pUWNVkM78UHm4NpFZ_nJQOa0ba07N3gMKFzWUiindZ1Q@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-03T08:44:45Z","receivedAt":"2019-09-03T08:44:58Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"David,\n\nOn Tue, Sep 3, 2019 at 3:01 AM David <bouncingcats@gmail.com> wrote:\n>\n> On Tue, 3 Sep 2019 at 04:11, Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > On Mon, Sep 2, 2019 at 6:25 PM Birger Skogeng Pedersen <birger.sp@gmail.com> wrote:\n> > > On Sat, Aug 31, 2019 at 12:51 PM Birger Skogeng Pedersen <birger.sp@gmail.com> wrote:\n>\n> > > > In my pursuit to fully utilize git-gui with only using a keyboard, I\n> > > > suggest that there is a hotkey to toggle between selecting \"New\n> > > > Commit\" and \"Amend Last Commit\".\n>\n> Hi, thanks for maintaining and contributing to git and git-gui, it's a\n> great tool!\n>\n> > After focusing the commit message widget, you can focus the radio\n> > buttons with Tab/Shift+Tab and press Space.\n>\n> > I think this is short enough, so that wasting a Letter is not\n> > justified here.\n>\n> Ugh, may I express how unhappy I am to read that opinion from\n> the maintainer. I strongly disagree, please reconsider :(\n>\n> And I enthusiastically support this initial request for a single\n> hotkey to immediately toggle between \"New Commit\" and \"Amend Last\n> Commit\". And it should work regardless of wherever the cursor or\n> highlight is currently active.\n>\n> I have used git-gui for many years and I find this is actually the\n> most annoying and inconsistent aspect of its user interface. Sometimes\n> if one is lucky then \"spacebar\" will achieve it at startup or after\n> refresh, sometimes not. When I test here just now the suggested\n> tab/shift-tab/spacebar method, it does toggle but it also changes the\n> items in the staged changes list as an unwanted side effect. My\n> version says 0.20.0.8.gd000, but I have a few local patches (written\n> years ago) so sorry I am not testing with a version that you have, but\n> even so I wanted to report what I observed.\n>\n> If one is often amending commit messages as I do during large\n> interactive rebases, it is painful to have to do some kind of\n> context-sensitive multi-key dance just to change from \"New Commit\" to\n> \"Amend Last Commit\". Especially when every other operation has become\n> a single keystroke in my muscle memory.\n>\n> In my world it most definitely would not be \"wasting a letter\" to\n> implement this! It would instead be \"OMG at last that got fixed for\n> everyone, hooray!\" :D\n\nthanks for the input. Though I'm not the maintainer.\n\nBert\n"},{"id":"381712","messageId":"CAKPyHN0tFzRDYFkjwTDi6MvN3DmzDRNH6V0Y5Ay1U6K2T-H6sA@mail.gmail.com","threadId":"51782","inReplyTo":"20190902195618.3820-1-birger.sp@gmail.com","subject":"Re: [PATCH] Add hotkey to toggle \"Amend Last Commit\" radio selector","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-03T08:52:58Z","receivedAt":"2019-09-03T08:53:11Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Birger,\n\nOn Mon, Sep 2, 2019 at 9:56 PM Birger Skogeng Pedersen\n<birger.sp@gmail.com> wrote:\n>\n> Selecting whether to do a \"New Commit\" or \"Amend Last Commit\" does not have\n> a hotkey.\n>\n> With this patch, the user may toggle between the two options with\n> CTRL/CMD+e.\n\nDavid A. (in Cc from git-cola) suggested, that we try to re-use\nexisting key bindings in Git GUIs. Here is Git-Cola hotkeys:\n\nhttp://git-cola.github.io/share/doc/git-cola/hotkeys.html\n\nand this indicates, that it already uses CTRL+m for \"amend\". Though\nI'm unsure if this is a toggle like in git-gui or a one-shot. David\nA., can you please clarify?\n\n>\n> Signed-off-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n> ---\n>  git-gui.sh | 11 +++++++++++\n>  1 file changed, 11 insertions(+)\n>\n> diff --git a/git-gui.sh b/git-gui.sh\n> index 5bc21b8..14be1e0 100755\n> --- a/git-gui.sh\n> +++ b/git-gui.sh\n> @@ -2640,6 +2640,16 @@ proc show_less_context {} {\n>         }\n>  }\n>\n> +proc toggle_commit_type {} {\n> +       global selected_commit_type\n> +       if {[string match amend* $selected_commit_type]} {\n> +               set selected_commit_type new\n> +       } else {\n> +               set selected_commit_type amend\n> +       }\n> +       do_select_commit_type\n> +}\n> +\n>  ######################################################################\n>  ##\n>  ## ui construction\n> @@ -3843,6 +3853,7 @@ bind .   <$M1B-Key-equal> {show_more_context;break}\n>  bind .   <$M1B-Key-plus> {show_more_context;break}\n>  bind .   <$M1B-Key-KP_Add> {show_more_context;break}\n>  bind .   <$M1B-Key-Return> do_commit\n> +bind .   <$M1B-Key-e> toggle_commit_type\n\nThe commit type has also a two toggle menu entries (under \"Commit\")\nthey should now also indicate the key binding.\ndisable\n\nThough how to express a toggle keybinding in the menu? I don't know if\nyou can assign the same keybinding to the same menu entry. Maybe we\nneed to add/remove the keybinding depending on the current mode.\n\nBert\n\n>  foreach i [list $ui_index $ui_workdir] {\n>         bind $i <Button-1>       { toggle_or_diff click %W %x %y; break }\n>         bind $i <$M1B-Button-1>  { add_one_to_selection %W %x %y; break }\n> --\n> 2.21.0.windows.1\n>\n"},{"id":"381714","messageId":"CAKPyHN1psZyj1MsMkJ-7ZMm8YX9AoBSHx1+qwBTfSeBKu5xURw@mail.gmail.com","threadId":"51782","inReplyTo":"CAKPyHN0tFzRDYFkjwTDi6MvN3DmzDRNH6V0Y5Ay1U6K2T-H6sA@mail.gmail.com","subject":"Re: [PATCH] Add hotkey to toggle \"Amend Last Commit\" radio selector","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-03T10:25:32Z","receivedAt":"2019-09-03T10:25:46Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"David,\n\nOn Tue, Sep 3, 2019 at 10:52 AM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n>\n> Birger,\n>\n> On Mon, Sep 2, 2019 at 9:56 PM Birger Skogeng Pedersen\n> <birger.sp@gmail.com> wrote:\n> >\n> > Selecting whether to do a \"New Commit\" or \"Amend Last Commit\" does not have\n> > a hotkey.\n> >\n> > With this patch, the user may toggle between the two options with\n> > CTRL/CMD+e.\n>\n> David A. (in Cc from git-cola) suggested, that we try to re-use\n> existing key bindings in Git GUIs. Here is Git-Cola hotkeys:\n>\n> http://git-cola.github.io/share/doc/git-cola/hotkeys.html\n>\n> and this indicates, that it already uses CTRL+m for \"amend\". Though\n> I'm unsure if this is a toggle like in git-gui or a one-shot. David\n> A., can you please clarify?\n\ngit-gui already assigns CTRL+m to \"Local merge…\"\n\nsorry. I think trying to synchronize the keybindings seems impossible.\n\nBert\n\n>\n> >\n> > Signed-off-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n> > ---\n> >  git-gui.sh | 11 +++++++++++\n> >  1 file changed, 11 insertions(+)\n> >\n> > diff --git a/git-gui.sh b/git-gui.sh\n> > index 5bc21b8..14be1e0 100755\n> > --- a/git-gui.sh\n> > +++ b/git-gui.sh\n> > @@ -2640,6 +2640,16 @@ proc show_less_context {} {\n> >         }\n> >  }\n> >\n> > +proc toggle_commit_type {} {\n> > +       global selected_commit_type\n> > +       if {[string match amend* $selected_commit_type]} {\n> > +               set selected_commit_type new\n> > +       } else {\n> > +               set selected_commit_type amend\n> > +       }\n> > +       do_select_commit_type\n> > +}\n> > +\n> >  ######################################################################\n> >  ##\n> >  ## ui construction\n> > @@ -3843,6 +3853,7 @@ bind .   <$M1B-Key-equal> {show_more_context;break}\n> >  bind .   <$M1B-Key-plus> {show_more_context;break}\n> >  bind .   <$M1B-Key-KP_Add> {show_more_context;break}\n> >  bind .   <$M1B-Key-Return> do_commit\n> > +bind .   <$M1B-Key-e> toggle_commit_type\n>\n> The commit type has also a two toggle menu entries (under \"Commit\")\n> they should now also indicate the key binding.\n> disable\n>\n> Though how to express a toggle keybinding in the menu? I don't know if\n> you can assign the same keybinding to the same menu entry. Maybe we\n> need to add/remove the keybinding depending on the current mode.\n>\n> Bert\n>\n> >  foreach i [list $ui_index $ui_workdir] {\n> >         bind $i <Button-1>       { toggle_or_diff click %W %x %y; break }\n> >         bind $i <$M1B-Button-1>  { add_one_to_selection %W %x %y; break }\n> > --\n> > 2.21.0.windows.1\n> >\n"},{"id":"381718","messageId":"20190903124541.2p5hmknolh2dwqh5@yadavpratyush.com","threadId":"51782","inReplyTo":"CAGr--=Jn87r_ySYkZmtqUBA40+fwdn0MbuN6_LNDO4mOWyoKTg@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-03T12:45:41Z","receivedAt":"2019-09-03T12:45:47Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 03/09/19 07:37AM, Birger Skogeng Pedersen wrote:\n> On Mon, Sep 2, 2019 at 10:15 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n> > does Control-Tab works for traversal?\n> \n> \n> Bert,\n> \n> Control+Tab works for traversal, but as a means to toggle new/amend\n> it's very tedious. I have to press Ctrl+Tab 9 times to select \"new\"\n> and 10 times to select \"Amend\"(!). Then 1 or 2 more times to go back\n> to the input area.\n> I sincerely doubt that this is your preferred method of switching\n> between new/amend. At this point we're better of letting go of the\n> keyboard and use the mouse, which is what I'm trying to avoid.\n \nCan you try doing a Shift+Tab? For me on Linux, if I hit Shift+Tab, it \nimmediately takes me to the \"Amend last commit\" option. Then I can press \nspace to select it and Tab again to get back to the commit message.\n\nAlso, since we are on this topic, how about making the \"Amend last \ncommit\" button a toggle instead? This would act as a \"turn amend mode \non/off\" button. Since \"Amend last commit\" and \"New Commit\" are mutually \nexclusive, a single toggle to switch between those modes makes sense to \nme.\n\n> > I think this is short enough, so that wasting a Letter is not \n> > justified here.\n> I (also) often amend commits, so having a hotkey for this is quite a\n> necessity imo.\n\nAssuming the above works for you, do you still feel the need for a \ndedicated binding for amends?\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381723","messageId":"CAGr--=JaTvZ_mUK5+dW6eM3-71ROUR4c58TF9G=-jAw3GDzYTQ@mail.gmail.com","threadId":"51782","inReplyTo":"20190903124541.2p5hmknolh2dwqh5@yadavpratyush.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-03T14:06:17Z","receivedAt":"2019-09-03T14:06:32Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi Pratyush,\n\n\nOn Tue, Sep 3, 2019 at 2:45 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> Can you try doing a Shift+Tab? For me on Linux, if I hit Shift+Tab, it\n> immediately takes me to the \"Amend last commit\" option. Then I can press\n> space to select it and Tab again to get back to the commit message.\n\nIt seems that Shift+Tab doesn't do anything (on Windows 10).\nRegardless, imo there should be a binding dedicated to toggle amend.\n\n\n> Also, since we are on this topic, how about making the \"Amend last\n> commit\" button a toggle instead? This would act as a \"turn amend mode\n> on/off\" button. Since \"Amend last commit\" and \"New Commit\" are mutually\n> exclusive, a single toggle to switch between those modes makes sense to\n> me.\n\nI assume you're talking about the button in the \"Commit\" dropdown\nmenu. I agree, it could be just a single entry which is a toggle to\nenable/disable amending. And (above the commit message dialog) perhaps\njust a single checkbox; \"Amend Last Commit\". In other git GUIs (Git\nCola and TortoiseGit) I see they're using just a single checkbox for\nthis option. But maybe that is a slightly different topic, the hotkey\nbehaviour would remain the same.\n\n\n> ... do you still feel the need for a dedicated binding for amends?\n\nHow do you guys feel about it? So far it seems we're at two \"yay\" and\none \"nay\". I really feel it is in the best interest of the git-gui\nproject to implement this hotkey. And not just because it is my\npersonal preference to have it :-)\n\n\nBirger\n"},{"id":"381729","messageId":"CAMPXz=r7hLn+aOp6B9arGMT2jxOTTpOvc0e5gm3=ttDqWNfmDA@mail.gmail.com","threadId":"51782","inReplyTo":"20190903124541.2p5hmknolh2dwqh5@yadavpratyush.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"David","fromEmail":"bouncingcats@gmail.com","sentAt":"2019-09-03T15:35:47Z","receivedAt":"2019-09-03T15:36:02Z","isPatch":false,"sender":{"key":"bouncingcats@gmail.com","avatar":null},"body":"On Tue, 3 Sep 2019 at 22:45, Pratyush Yadav <me@yadavpratyush.com> wrote:\n>\n> Can you try doing a Shift+Tab? For me on Linux, if I hit Shift+Tab, it\n> immediately takes me to the \"Amend last commit\" option. Then I can press\n> space to select it and Tab again to get back to the commit message.\n\nHi Pratyush Yadav,\n\nYes, we know it can be done this way. The point being made is not\n\"this cannot be changed with the keyboard\". We know that you can\nfool around with the tab key and the shift key and the spacebar and\neventually you can succeed in changing this option.\n\nAnd if you want to toggle it back again, you have to do a slightly\ndifferent keyboard dance, depending on where your cursor or\nhighlight is currently positioned.\n\nRather what we (at least I) am hoping to communicate is that after you\nhave done this many thousands of times, and you can do everything\nelse in git-gui very fast without touching the mouse, you might also join\nus in wishing for action to be achievable with one hotkey-combination\nevent that does not affect any other state, it just toggles new/amend\ncommit, and is not a sequence of several multi-key actions which must\nbe adapted according to the current status of other input mode actions.\n"},{"id":"381731","messageId":"CAKPyHN0AYcdxA5n3856Dk6toJbV_yQ9aXkZ2r_Ytn6mdUK5sbw@mail.gmail.com","threadId":"51782","inReplyTo":"CAKPyHN0tFzRDYFkjwTDi6MvN3DmzDRNH6V0Y5Ay1U6K2T-H6sA@mail.gmail.com","subject":"Re: [PATCH] Add hotkey to toggle \"Amend Last Commit\" radio selector","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-03T16:20:22Z","receivedAt":"2019-09-03T16:20:35Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Birger,\n\nOn Tue, Sep 3, 2019 at 10:52 AM Bert Wesarg <bert.wesarg@googlemail.com> wrote:\n>\n> Birger,\n>\n> On Mon, Sep 2, 2019 at 9:56 PM Birger Skogeng Pedersen\n> <birger.sp@gmail.com> wrote:\n> >\n> > Selecting whether to do a \"New Commit\" or \"Amend Last Commit\" does not have\n> > a hotkey.\n> >\n> > With this patch, the user may toggle between the two options with\n> > CTRL/CMD+e.\n>\n> David A. (in Cc from git-cola) suggested, that we try to re-use\n> existing key bindings in Git GUIs. Here is Git-Cola hotkeys:\n>\n> http://git-cola.github.io/share/doc/git-cola/hotkeys.html\n>\n> and this indicates, that it already uses CTRL+m for \"amend\". Though\n> I'm unsure if this is a toggle like in git-gui or a one-shot. David\n> A., can you please clarify?\n>\n> >\n> > Signed-off-by: Birger Skogeng Pedersen <birger.sp@gmail.com>\n> > ---\n> >  git-gui.sh | 11 +++++++++++\n> >  1 file changed, 11 insertions(+)\n> >\n> > diff --git a/git-gui.sh b/git-gui.sh\n> > index 5bc21b8..14be1e0 100755\n> > --- a/git-gui.sh\n> > +++ b/git-gui.sh\n> > @@ -2640,6 +2640,16 @@ proc show_less_context {} {\n> >         }\n> >  }\n> >\n> > +proc toggle_commit_type {} {\n> > +       global selected_commit_type\n> > +       if {[string match amend* $selected_commit_type]} {\n> > +               set selected_commit_type new\n> > +       } else {\n> > +               set selected_commit_type amend\n> > +       }\n> > +       do_select_commit_type\n> > +}\n> > +\n> >  ######################################################################\n> >  ##\n> >  ## ui construction\n> > @@ -3843,6 +3853,7 @@ bind .   <$M1B-Key-equal> {show_more_context;break}\n> >  bind .   <$M1B-Key-plus> {show_more_context;break}\n> >  bind .   <$M1B-Key-KP_Add> {show_more_context;break}\n> >  bind .   <$M1B-Key-Return> do_commit\n> > +bind .   <$M1B-Key-e> toggle_commit_type\n>\n> The commit type has also a two toggle menu entries (under \"Commit\")\n> they should now also indicate the key binding.\n> disable\n>\n> Though how to express a toggle keybinding in the menu? I don't know if\n> you can assign the same keybinding to the same menu entry. Maybe we\n> need to add/remove the keybinding depending on the current mode.\n\nthat works. I squashed this into your commit and pushed to GitHub\n(sorry, still no path-per-mail)\n\nhttps://github.com/bertwesarg/git-gui/commit/245bb9944e3d1c6b266c58b56d316f283ed3516b\n\nBert\n\n>\n> Bert\n>\n> >  foreach i [list $ui_index $ui_workdir] {\n> >         bind $i <Button-1>       { toggle_or_diff click %W %x %y; break }\n> >         bind $i <$M1B-Button-1>  { add_one_to_selection %W %x %y; break }\n> > --\n> > 2.21.0.windows.1\n> >\n"},{"id":"381734","messageId":"20190903172730.esy3rr4gkwxhx2s6@yadavpratyush.com","threadId":"51782","inReplyTo":"CAMPXz=r7hLn+aOp6B9arGMT2jxOTTpOvc0e5gm3=ttDqWNfmDA@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-03T17:27:30Z","receivedAt":"2019-09-03T17:27:37Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 04/09/19 01:35AM, David wrote:\n> On Tue, 3 Sep 2019 at 22:45, Pratyush Yadav <me@yadavpratyush.com> wrote:\n> >\n> > Can you try doing a Shift+Tab? For me on Linux, if I hit Shift+Tab, it\n> > immediately takes me to the \"Amend last commit\" option. Then I can press\n> > space to select it and Tab again to get back to the commit message.\n> \n> Hi Pratyush Yadav,\n> \n> Yes, we know it can be done this way. The point being made is not\n> \"this cannot be changed with the keyboard\". We know that you can\n> fool around with the tab key and the shift key and the spacebar and\n> eventually you can succeed in changing this option.\n\nYes, but what Birger was saying was hitting Ctrl+Tab 9-10 times to get \nto the option. This is much faster than that alternative.\n\nMy aim was to let people know what options already exist before \nproposing new ones.\n \n> And if you want to toggle it back again, you have to do a slightly\n> different keyboard dance, depending on where your cursor or\n> highlight is currently positioned.\n> \n> Rather what we (at least I) am hoping to communicate is that after you\n> have done this many thousands of times, and you can do everything\n> else in git-gui very fast without touching the mouse, you might also join\n> us in wishing for action to be achievable with one hotkey-combination\n> event that does not affect any other state, it just toggles new/amend\n> commit, and is not a sequence of several multi-key actions which must\n> be adapted according to the current status of other input mode actions.\n\nDon't get me wrong. I am not against having a dedicated hotkey for \ntoggling amends. I think it is a common enough operation to warrant a \ndedicated keyboard toggle. I was just letting everyone know what the \ncurrent options are, so they can make better judgements whether they \nreally need this option or not.\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381735","messageId":"20190903173418.32hqxfzr7wajtikx@yadavpratyush.com","threadId":"51782","inReplyTo":"CAGr--=JaTvZ_mUK5+dW6eM3-71ROUR4c58TF9G=-jAw3GDzYTQ@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-03T17:34:18Z","receivedAt":"2019-09-03T17:34:24Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 03/09/19 04:06PM, Birger Skogeng Pedersen wrote:\n> Hi Pratyush,\n> \n> \n> On Tue, Sep 3, 2019 at 2:45 PM Pratyush Yadav <me@yadavpratyush.com> wrote:\n> > Can you try doing a Shift+Tab? For me on Linux, if I hit Shift+Tab, it\n> > immediately takes me to the \"Amend last commit\" option. Then I can press\n> > space to select it and Tab again to get back to the commit message.\n> \n> It seems that Shift+Tab doesn't do anything (on Windows 10).\n\nAh, too bad.\n\n> Regardless, imo there should be a binding dedicated to toggle amend.\n> \n> > Also, since we are on this topic, how about making the \"Amend last\n> > commit\" button a toggle instead? This would act as a \"turn amend mode\n> > on/off\" button. Since \"Amend last commit\" and \"New Commit\" are mutually\n> > exclusive, a single toggle to switch between those modes makes sense to\n> > me.\n> \n> I assume you're talking about the button in the \"Commit\" dropdown\n\nYes. That one and the two tick boxes on the top right of the commit \nmessage buffer/editor.\n\n> menu. I agree, it could be just a single entry which is a toggle to\n> enable/disable amending. And (above the commit message dialog) perhaps\n> just a single checkbox; \"Amend Last Commit\". In other git GUIs (Git\n> Cola and TortoiseGit) I see they're using just a single checkbox for\n> this option. But maybe that is a slightly different topic, the hotkey\n> behaviour would remain the same.\n\nYes, of course your patch is independent of the two-button behaviour. I \nwas just pointing it out to see how others feel about it.\n\n> \n> \n> > ... do you still feel the need for a dedicated binding for amends?\n> \n> How do you guys feel about it? So far it seems we're at two \"yay\" and\n> one \"nay\". I really feel it is in the best interest of the git-gui\n> project to implement this hotkey. And not just because it is my\n> personal preference to have it :-)\n\nWell, I do think amending commits is a common enough operation to \nwarrant a dedicated keyboard binding for it. So it is a \"yay\" for this \nfeature from my side at least.\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381794","messageId":"971bbc44-d3d4-552d-d18e-58a2315c6183@kdbg.org","threadId":"51782","inReplyTo":"20190903124541.2p5hmknolh2dwqh5@yadavpratyush.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2019-09-04T06:24:47Z","receivedAt":"2019-09-04T06:24:53Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 03.09.19 um 14:45 schrieb Pratyush Yadav:\n> Can you try doing a Shift+Tab? For me on Linux, if I hit Shift+Tab, it \n> immediately takes me to the \"Amend last commit\" option. Then I can press \n> space to select it and Tab again to get back to the commit message.\n\nThat works on Windows with Ctrl+Shift+Tab, too.\n\n> Also, since we are on this topic, how about making the \"Amend last \n> commit\" button a toggle instead? This would act as a \"turn amend mode \n> on/off\" button. Since \"Amend last commit\" and \"New Commit\" are mutually \n> exclusive, a single toggle to switch between those modes makes sense to \n> me.\n\nThat is worth a try. The check box title offers a natural hotkey then:\n\"_A_mend last commit\", Alt-a.\n\n-- Hannes\n"},{"id":"381804","messageId":"20190904174103.nrntgwv6zdqyjqsh@yadavpratyush.com","threadId":"51782","inReplyTo":"971bbc44-d3d4-552d-d18e-58a2315c6183@kdbg.org","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-04T17:46:43Z","receivedAt":"2019-09-04T17:46:54Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 04/09/19 08:24AM, Johannes Sixt wrote:\n> Am 03.09.19 um 14:45 schrieb Pratyush Yadav:\n> > Can you try doing a Shift+Tab? For me on Linux, if I hit Shift+Tab, it \n> > immediately takes me to the \"Amend last commit\" option. Then I can press \n> > space to select it and Tab again to get back to the commit message.\n> \n> That works on Windows with Ctrl+Shift+Tab, too.\n> \n> > Also, since we are on this topic, how about making the \"Amend last \n> > commit\" button a toggle instead? This would act as a \"turn amend mode \n> > on/off\" button. Since \"Amend last commit\" and \"New Commit\" are mutually \n> > exclusive, a single toggle to switch between those modes makes sense to \n> > me.\n> \n> That is worth a try. The check box title offers a natural hotkey then:\n> \"_A_mend last commit\", Alt-a.\n\nRight now, the binding proposed is Ctrl-e.  My mental model for the key \nbindings as of now is having the \"actions\" bound to Ctrl, and bindings \nthat move you around in the UI bound to Alt.  So it makes more sense to \nme to have a \"amend toggle\" bound to Ctrl.  Maybe that's just me though.  \nAnyone else care to chime in?\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"381805","messageId":"CAGr--=L0gp1XVbHzV9_rwYKFi9Xh-q+WFM2z_-=N0Ptj2aPFZQ@mail.gmail.com","threadId":"51782","inReplyTo":"20190904174103.nrntgwv6zdqyjqsh@yadavpratyush.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-04T17:54:27Z","receivedAt":"2019-09-04T17:54:41Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi,\n\nYou could argue that A (as in \"amend\") makes quite an intuitive hotkey.\nBut personally I'm also leaning towards CTRL/CMD+E. The ALT+(letter)\ncombination is used to open a menu, for instance ALT+R opens\n\"Repository\", ALT+E opens \"Edit\", etc. That's the behaviour on\nWindows, anyways. So the hotkeys may seem a bit \"mixed up\" when\nALT+(some letter) opens the corresponding menu but ALT+A does\nsomething quite different.\n\nBirger\n"},{"id":"381810","messageId":"8a726eea-f461-db90-7e36-70b708ff8915@kdbg.org","threadId":"51782","inReplyTo":"20190904174103.nrntgwv6zdqyjqsh@yadavpratyush.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2019-09-04T18:52:09Z","receivedAt":"2019-09-04T18:52:16Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 04.09.19 um 19:46 schrieb Pratyush Yadav:\n> On 04/09/19 08:24AM, Johannes Sixt wrote:\n>> That is worth a try. The check box title offers a natural hotkey then:\n>> \"_A_mend last commit\", Alt-a.\n> \n> Right now, the binding proposed is Ctrl-e.  My mental model for the key \n> bindings as of now is having the \"actions\" bound to Ctrl, and bindings \n> that move you around in the UI bound to Alt.  So it makes more sense to \n> me to have a \"amend toggle\" bound to Ctrl.  Maybe that's just me though.  \n> Anyone else care to chime in?\n\n\"Amend last commit\" is NOT an action. It switches a state.\n\nIt is common in Windows GUIs that every control, including menu items,\nhas a hotkey associated, the underlined letter in the caption, and the\nhotkey to access that UI control is Alt+that letter. It's not\nnecessarily a matter of moving around.\n\nAnd, BTW, this hotkey thing is also the case on my Linux desktop\n(KDE-based).\n\nBut of course, git-gui is different and totally off track here. It has\n*zero* controls marked for hotkey-accessibility. I was just hoping to\nspark an effort to make some of the controls marked and hotkey-accessible.\n\n-- Hannes\n"},{"id":"381813","messageId":"CAKPyHN3+Sr2QJGR7Sw02x0A9OXshVUQofqH=ShXDivmqP5X7vw@mail.gmail.com","threadId":"51782","inReplyTo":"8a726eea-f461-db90-7e36-70b708ff8915@kdbg.org","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2019-09-04T19:03:02Z","receivedAt":"2019-09-04T19:03:17Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Wed, Sep 4, 2019 at 8:52 PM Johannes Sixt <j6t@kdbg.org> wrote:\n>\n> Am 04.09.19 um 19:46 schrieb Pratyush Yadav:\n> > On 04/09/19 08:24AM, Johannes Sixt wrote:\n> >> That is worth a try. The check box title offers a natural hotkey then:\n> >> \"_A_mend last commit\", Alt-a.\n> >\n> > Right now, the binding proposed is Ctrl-e.  My mental model for the key\n> > bindings as of now is having the \"actions\" bound to Ctrl, and bindings\n> > that move you around in the UI bound to Alt.  So it makes more sense to\n> > me to have a \"amend toggle\" bound to Ctrl.  Maybe that's just me though.\n> > Anyone else care to chime in?\n>\n> \"Amend last commit\" is NOT an action. It switches a state.\n>\n> It is common in Windows GUIs that every control, including menu items,\n> has a hotkey associated, the underlined letter in the caption, and the\n> hotkey to access that UI control is Alt+that letter. It's not\n> necessarily a matter of moving around.\n>\n> And, BTW, this hotkey thing is also the case on my Linux desktop\n> (KDE-based).\n>\n> But of course, git-gui is different and totally off track here. It has\n> *zero* controls marked for hotkey-accessibility. I was just hoping to\n> spark an effort to make some of the controls marked and hotkey-accessible.\n\nI'm in favor of making this a checkbox, also in the menu. As all menu\nentries have currently a CTRL+ binding assigned, I think this one\nshould have one too. As CTRL+A is taken, and the proposal is CTRL+E, I\nwould be fine with this. If the menus and the UX elements also honors\nmnemonic now or in the future, I don't think they need to match the\nCTRL+ binding. Thus if this gets Alt+A I'm fine with this too.\n\nBert\n\n>\n> -- Hannes\n"},{"id":"382123","messageId":"20190910085446.GB32239@gmail.com","threadId":"51782","inReplyTo":"CAKPyHN3+Sr2QJGR7Sw02x0A9OXshVUQofqH=ShXDivmqP5X7vw@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2019-09-10T08:54:46Z","receivedAt":"2019-09-10T08:54:52Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Wed, Sep 04, 2019 at 09:03:02PM +0200, Bert Wesarg wrote:\n> On Wed, Sep 4, 2019 at 8:52 PM Johannes Sixt <j6t@kdbg.org> wrote:\n> >\n> > Am 04.09.19 um 19:46 schrieb Pratyush Yadav:\n> > > On 04/09/19 08:24AM, Johannes Sixt wrote:\n> > >> That is worth a try. The check box title offers a natural hotkey then:\n> > >> \"_A_mend last commit\", Alt-a.\n> > >\n> > > Right now, the binding proposed is Ctrl-e.  My mental model for the key\n> > > bindings as of now is having the \"actions\" bound to Ctrl, and bindings\n> > > that move you around in the UI bound to Alt.  So it makes more sense to\n> > > me to have a \"amend toggle\" bound to Ctrl.  Maybe that's just me though.\n> > > Anyone else care to chime in?\n> >\n> > \"Amend last commit\" is NOT an action. It switches a state.\n> >\n> > It is common in Windows GUIs that every control, including menu items,\n> > has a hotkey associated, the underlined letter in the caption, and the\n> > hotkey to access that UI control is Alt+that letter. It's not\n> > necessarily a matter of moving around.\n> >\n> > And, BTW, this hotkey thing is also the case on my Linux desktop\n> > (KDE-based).\n> >\n> > But of course, git-gui is different and totally off track here. It has\n> > *zero* controls marked for hotkey-accessibility. I was just hoping to\n> > spark an effort to make some of the controls marked and hotkey-accessible.\n> \n> I'm in favor of making this a checkbox, also in the menu. As all menu\n> entries have currently a CTRL+ binding assigned, I think this one\n> should have one too. As CTRL+A is taken, and the proposal is CTRL+E, I\n> would be fine with this. If the menus and the UX elements also honors\n> mnemonic now or in the future, I don't think they need to match the\n> CTRL+ binding. Thus if this gets Alt+A I'm fine with this too.\n> \n> Bert\n> \n> >\n> > -- Hannes\n\ngit-gui might not be so focused on providing a fast way to launch a\nvisual $EDITOR, but Ctrl+E is the hotkey we use everywhere in git-cola\nwhen lauching external editors on selected files.  Sometimes it's the\n\"hot\" action so even \"Enter\" gets that action, but it's worth\nconsidering if we ever want git-gui's status widget to be able to launch\neditors.\n\nWe also let Ctrl+Enter launch the default xdg-open action on the\nselected file (e.g. image files go to the default image editing program,\nhtml files to a browser, etc).\n\nWhile we're on the topic of hotkeys, some valuable hotkeys for an\nEnglish-centric keyboard are {J,K,L} because of the home row.\n\nIn web browsers, Ctrl-L is a very common hotkey for focusing the URL\ninput, so we stole that same hotkey for the \"git log <...>\" input\nin the git-dag tool.  In that tool the arguments to \"log\" are very\nmuch like a URL from the input perspective, so it's nice to be able\nto use a familiar and convenient hotkey for that purpose.  The placement\nof the input field[1] is also at the top of that tool, just like in a web\nbrowser.\n\n[1] https://git-cola.github.io/images/dag.png\n\nCtrl-L is also used to focus the \"Commit summary\" line edit for the main\ngit-cola commit message editor.  That seems like the most sensible\n\"main\" behavior for the main commit GUI.  Maybe git-gui can do that too.\n\nCtrl-J is kinda like \"down\" in vim, and so we let that focus the \"diff\"\nwidget which is typically \"down\" below the status and commit widgets in\ncola[2].\n\n[2] https://git-cola.github.io/images/screenshot-dark-linux.png\n\nCtrl-K focuses the status widget because it's \"up\".  Also, K and L are\nadjacent on the keyboard, and they are also adjacent visually in the UI\nso there's a visual and muscle memory pairing there between the Status\nand Commit widgets.\n\nThe JKL hotkeys are nice to have in addition to the numeric hotkeys\nbecause they're so convenient.  In some cases (like when the diff widget\nis focused) we allow Alt-{J,K} to jump down/up (next/prev) between the\nfiles in the status widget, otherwise regular {J,K} can be used if it\nhas focus.\n\nThanks for at least trying to keep some parity with git-cola's hotkeys.\nIt's not completely possible in all situations, but it's good to at\nleast share notes on how we use the GUI.\n-- \nDavid\n"},{"id":"382155","messageId":"CAGr--=Jdj+kJmV7z3vhYW+s129+0+KgbNYw8NFPmSASRYMTdbg@mail.gmail.com","threadId":"51782","inReplyTo":"20190910085446.GB32239@gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Birger Skogeng Pedersen","fromEmail":"birger.sp@gmail.com","sentAt":"2019-09-11T10:27:30Z","receivedAt":"2019-09-11T10:30:04Z","isPatch":false,"sender":{"key":"birger.sp@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5260237?v=4"},"body":"Hi Pratyush,\n\nI'm hoping this will be merged, even without changing the radio\nselectors to a checkbox(?). The patch from Bert resolves the issue I\nraised about wanting the hotkey.\nWhat do you think?\n\nBirger\n"},{"id":"382179","messageId":"20190911183419.jea27ctvcdl5olp3@yadavpratyush.com","threadId":"51782","inReplyTo":"CAGr--=Jdj+kJmV7z3vhYW+s129+0+KgbNYw8NFPmSASRYMTdbg@mail.gmail.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-11T18:34:20Z","receivedAt":"2019-09-11T18:34:31Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 11/09/19 12:27PM, Birger Skogeng Pedersen wrote:\n> Hi Pratyush,\n> \n> I'm hoping this will be merged, even without changing the radio\n> selectors to a checkbox(?). The patch from Bert resolves the issue I\n> raised about wanting the hotkey.\n> What do you think?\n\nWhat do you mean by \"this\"? I am guessing you mean [0].\n\nI'm afraid that patch conflicts with Bert's change [1] to using a \ncheckbox. Since both patches are in flight, it makes more sense to base \nyour work off his. If I merge your patch now, I'll have to revert it as \nsoon as it is time to merge Bert's, and then rework your patch.\n\nAlso, after Bert's patch, the toggling becomes much simpler. All you'd \nhave to do is something like:\n\n  bind . <$M1B-Key-e> {\n\t# Toggle commit type.\n\tset commit_type_is_amend [expr {!$commit_type_is_amend}]\n\tdo_select_commit_type\n  }\n\nMaybe a cleaner way is possible, but this is what I could come up with \nfor toggling a boolean.\n\nSo can you please send a re-roll based on Bert's patch? I took a quick \nglance at it, and it seems mostly correct. I have a couple of comments, \nso some things might change based on the discussion, but I don't think \nit should affect your change too much.\n\n[0] https://public-inbox.org/git/20190904175943.11924-1-birger.sp@gmail.com/\n[1] https://public-inbox.org/git/ab1f68cc8552e405c9d04622be1e728ab81bda17.1567713659.git.bert.wesarg@googlemail.com/\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"382180","messageId":"20190911184716.quzqnjf4o55taop6@yadavpratyush.com","threadId":"51782","inReplyTo":"20190911183419.jea27ctvcdl5olp3@yadavpratyush.com","subject":"Re: feature request, git-gui: add hotkey to toggle amend/new","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-09-11T18:47:16Z","receivedAt":"2019-09-11T18:47:21Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 12/09/19 12:04AM, Pratyush Yadav wrote:\n> On 11/09/19 12:27PM, Birger Skogeng Pedersen wrote:\n> > Hi Pratyush,\n> > \n> > I'm hoping this will be merged, even without changing the radio\n> > selectors to a checkbox(?). The patch from Bert resolves the issue I\n> > raised about wanting the hotkey.\n> > What do you think?\n> \n> What do you mean by \"this\"? I am guessing you mean [0].\n> \n> I'm afraid that patch conflicts with Bert's change [1] to using a \n> checkbox. Since both patches are in flight, it makes more sense to base \n> your work off his. If I merge your patch now, I'll have to revert it as \n> soon as it is time to merge Bert's, and then rework your patch.\n> \n> Also, after Bert's patch, the toggling becomes much simpler. All you'd \n> have to do is something like:\n> \n>   bind . <$M1B-Key-e> {\n> \t# Toggle commit type.\n> \tset commit_type_is_amend [expr {!$commit_type_is_amend}]\n> \tdo_select_commit_type\n>   }\n\nI forgot to mention one more thing. You'd also want to mark the menu \nentry of the amend toggle with Ctrl+e keybinding, like we do for all \nother bindings (F5 for rescan, Ctrl+T for staging, etc.).\n\n-- \nRegards,\nPratyush Yadav\n"}]}