Re: [PATCH 2/2] git-gui: add hotkey to toggle "Amend Last Commit" check button/menu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13/09/19 09:50AM, Birger Skogeng Pedersen wrote:
> Hi Marc and Philip,
> 
> 
> On 12/09/2019 22:34, Marc Branchaud wrote:
> > I disagree!  Who expects anything to work properly when capslock is on?
> 
> Me :-)
> 
> 
> On Fri, Sep 13, 2019 at 12:23 AM Philip Oakley <philipoakley@iee.email> wrote:
> > I'd tend to agree. In other areas the use of shift is often used as the
> > complement of the unshifted action, so it does feel 'odd'. Thus it could
> > be used directly as the bool for amend or direct commit.
> >
> > This all assumes that Caps Lock is equivalent to having the shift on,
> > rather than being a special extra key.
> 
> It seems all the Ctrl+(lowercase character) hotkeys in git-gui have an
> equivalent Ctrl+(uppercase character).
> So for this feature, we should keep the Ctrl+E bind aswell as the
> Ctrl+e bind. If nothing else, to keep it consistent with the rest of
> the hotkey bindings.

I agree with this that we should keep it consistent with the rest of the 
bindings for now...

> But honestly, (as Marc pointed out) it is a quite weird that
> Ctrl+Shift+(character) has the excact same function as
> Ctrl+(character). Perhaps we should find another way to bind the
> hotkeys, where the state of Caps Lock doesn't matter? If possible.

...but I'd love to see this happen. To me shift is a modifier. No matter 
whether Caps Lock is pressed or not, it should not do the shift-modified 
behavior (that's just me, maybe other people think differently).

AFAIK, Tk does not provide any direct way to find out whether shift is 
pressed (correct me if I'm wrong). What you instead have to do is some 
bit arithmetic on the number passed to the "Key" event via the "%s" 
substitution. Source: [0]. We can probably have a bind_alpha procedure 
that takes two arguments: what to run when shift is pressed and what to 
run when it isn't.

This, of course, would be incompatible with the current behavior, but do 
people even keep the Caps Lock on? I personally use it so rarely I have 
my Caps Lock bound to Escape because I might as well use that key for 
something I use more often.

[0] https://blog.tcl.tk/4238

-- 
Regards,
Pratyush Yadav



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux