rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.38k stars 213 forks source link

Block Selection with Left Shift issue #247

Open kennigandira opened 4 years ago

kennigandira commented 4 years ago

Describe the bug Selected text become un-selected when I hit left shift + arrow left / right. Beforehand I'm using alt + shift + arrow left / right for block selection .

Expected behavior The previous selected should be still on selected state then continue the selection to the next column.

Install Type: Bare Metal Distro: Ubuntu + 20 Branch: master

Screenshots baru

Additional Context This issue not applicable to right shift (working perfectly as it should be).

rbreaves commented 4 years ago

Vs code or sublime?

rbreaves commented 4 years ago

Seems to be behaving as I would expect under VS Code and Sublime Text with the left shift key. If it is behaving unexpectedly for you in your editor then you will need to provide me with the name of the editor so I can test it first hand, otherwise I will be closing this ticket in the next few days since I cannot reproduce it.

kennigandira commented 4 years ago

I'm using VS Code. The issue seems occurs not only at the text editor (e.g chrome)

kennigandira commented 4 years ago

Updated It happened only if I'm not lifting up shift key after doing selection block. Here's how it happened:

Tested by KeyTest

keyrecord

As you can see at gif above, the left shift become unpressed even I'm not lifting up my left shift button. I've try this without Kinto and it's working normal. I've provide the normal key record

keyrecord-expected

rbreaves commented 4 years ago

The issue is that the moment you press and release ctrl (cmd key postion) whatever combo you were making becomes ignore/released itself. I believe this is partially on purpose as a remap may have already occurred and it can't remap twice. Obviously to do the wordwise stuff your alt+left/right key combo is becoming ctrl+left/right and by pressing ctrl (cmd key postion) and releasing it... it literally breaks that combo.

And ignoring the physical Ctrl input would be a little difficult because there will always be times where you legitimate want to hold down alt+ctrl at the same time - and there's no way for me to know what your intention is going to be as far whether or not you are about to hit your arrow keys for a wordwise function to occur pre-emptively.

I am really not sure that this particular issue has a real fix since alt in this case has transformed into Ctrl behind the scenes and I believe you are then pressing the Cmd key location - thus triggering Ctrl a 2nd time resulting in the inevitable release of the transformed Alt key that is actually a Ctrl key. I hope that makes sense - it is a little complicated to wrap ones head around 😅. This is the only way I have been able to duplicate this behavior any ways after you making your latest post.

rbreaves commented 4 years ago

~There may be one way of prevent the issue... xkeysnail does separate key presses by their left or right orientation - at least on modifier keys.. So if you don't conflict with your modifiers then it won't release unexpected. I should probably remap the wordwise functions to use the Left Ctrl key instead of the right Ctrl key.~

Nevermind changing this to LC did not work, it still releases it. I guess my prior post stands - this will have to be solved via xkeysnail based on my fork of it.

kinto.py line 191

    # Wordwise
    K("RC-Left"): K("Home"),                      # Beginning of Line
    K("Super-a"): K("Home"),                      # Beginning of Line
    K("RC-Shift-Left"): K("Shift-Home"),          # Select all to Beginning of Line
    K("RC-Right"): K("End"),                      # End of Line
    K("Super-e"): K("End"),                       # End of Line
    K("RC-Shift-Right"): K("Shift-End"),          # Select all to End of Line
    # K("RC-Left"): K("C-LEFT_BRACE"),              # Firefox-nw - Back
    # K("RC-Right"): K("C-RIGHT_BRACE"),            # Firefox-nw - Forward
    # K("RC-Left"): K("M-LEFT"),                    # Chrome-nw - Back
    # K("RC-Right"): K("M-RIGHT"),                  # Chrome-nw - Forward
    K("RC-Up"): K("C-Home"),                      # Beginning of File
    K("RC-Shift-Up"): K("C-Shift-Home"),          # Select all to Beginning of File
    K("RC-Down"): K("C-End"),                     # End of File
    K("RC-Shift-Down"): K("C-Shift-End"),         # Select all to End of File
rbreaves commented 3 years ago

I think this still needs addressing. Now that v1.2 is released I think I will be ready to address issues with xkeysnail soon. Will be adding this to my roadmap as I think I will be prioritizing xkeysnail over kinto.sh for awhile. Not my project, but it is important that some of these things get addressed.

vicente-lansweeper commented 3 years ago

Any updates on this?

rbreaves commented 2 years ago

No new updates on this yet, but re-reviewing tickets and this one is sticking around. I think this change in behavior to xkeysnail is possible and should happen. And oh wow, I did not realize a lansweeper dev had commented here! Love lansweeper @vicente-lansweeper.