kinto icon indicating copy to clipboard operation
kinto copied to clipboard

(Windows) ad functionality to move Chrome tabs around with Shift+Alt(aka Cmd)+left/right arrows. Up/down arrows still work, to move them leftmost/rightmost

Open gnagga opened this issue 1 year ago • 7 comments

gnagga avatar Feb 03 '24 22:02 gnagga

@gnagga

A support page that lists Chrome keyboard shortcuts indicates that the official shortcuts for that are Shift+Ctrl+PgUp/PgDn on both Windows/Linux and macOS.

https://support.google.com/chrome/answer/157179?hl=en&co=GENIE.Platform%3DDesktop#zippy=%2Ctab-window-shortcuts

I just got on a Mac mini running Big Sur and the latest Google Chrome, and confirmed that was the shortcut that moved tabs left/right. The Shift+Alt+Left/Right shortcuts did nothing that I noticed.

Due to Kinto's modifier remapping, the physical Ctrl key becomes the Win key in any app that is not a terminal. So at the moment you should be able to move tabs with the physical equivalent of Shift+Cmd+PgUp/PgDn.

If that works, there would need to be a remap in the Kinto config for Shift+Win+PgUp/PgDn to convert it back to sending Shift+Ctrl+PgUp/PgDn in Chrome(s). And maybe a block to prevent Shift+Cmd+PgUp/PgDn from doing the same thing.

RedBearAK avatar Feb 04 '24 05:02 RedBearAK

Ah okay, damn I don't have physical PgUp/Down keys on my laptop and 75% keyboard anymore, so using the arrow keys would be the most intuitive.
Most logical way to me would be to use Shift+Cmd+Arrows left/right and up/down to move them around and Cmd+Arrows to cycle through them. Maybe both ways could be implemented?

gnagga avatar Feb 04 '24 11:02 gnagga

Sorry for the confusion, I thought these shortcuts were standard to Chrome in Windows, but just saw I had these through a chrome extension: https://chromewebstore.google.com/detail/rearrange-tabs/ccnnhhnmpoffieppjjkhdakcoejcpbga

still the most intuitive way in my opinion, wonder why they don't make these standard ;)

gnagga avatar Feb 04 '24 11:02 gnagga

@gnagga

Ah okay, damn I don't have physical PgUp/Down keys on my laptop and 75% keyboard anymore, so using the arrow keys would be the most intuitive.

I know what you mean. I also had issues with only having PgUp/PgDn keys on the numpad. But that problem was happening in Linux, in GTK3 apps. Do you not even have those navigation keys on the numpad? What about the arrow keys, when using Fn+arrows? It's not the best solution, but there should be an option in Kinto's tray icon menu to enable a "Media Arrows Fix" that would enable Fn+Arrows to be PgUp/PgDn/Home/End if they are currently doing media functions.

Most logical way to me would be to use Shift+Cmd+Arrows left/right and up/down to move them around and Cmd+Arrows to cycle through them.

The object of the Kinto config is generally to just make things work like they would have in macOS, so things are not usually added to the default config file for any non-standard customizations.

Maybe both ways could be implemented?

To be clear, I am not the Kinto maintainer, though I did use it on Linux and still use it on Windows. But you can always add customizations to your own config file for special remaps.

Find and open the kinto.ahk config file, and look for the section that pertains to Chrome(s). Which should be here in the "browsers" group:

https://github.com/rbreaves/kinto/blob/4a3bfe79e2578dd85cb6ff2ebc5505f758c64ab6/windows/kinto.ahk#L610-L640

You can see there is one existing special remap for chrome.exe:

https://github.com/rbreaves/kinto/blob/4a3bfe79e2578dd85cb6ff2ebc5505f758c64ab6/windows/kinto.ahk#L631-L633

You can add to that, like this:

        #IfWinActive ahk_exe chrome.exe
            ^,::send {Alt Down}e{Alt Up}s{Enter}
            +^Left::Send, +^{PgUp}
            +^Right::Send, +^{PgDn}
        #If

I think this would be correct for your keyboard, if it's a Windows keyboard. To make it work on the physical equivalent of Shift+Cmd+Left/Right.

You have to save the file and restart Kinto to activate the change.

RedBearAK avatar Feb 04 '24 23:02 RedBearAK

Thank you! Unfortunately it doesn't work yet, i found the kinto.ahk under C:\Users<username>.kinto and C:\Windows\System32\kinto\windows added it to both of them, which one is the one being actually used?

gnagga avatar Feb 05 '24 10:02 gnagga

which one

Should be the one in your user folder.

RedBearAK avatar Feb 05 '24 10:02 RedBearAK

You can try moving those lines up into the rest of the “browsers” group of remaps. Maybe your browser isn’t matching on the “chrome.exe” section. The shortcut should be the same for Firefox.

RedBearAK avatar Feb 05 '24 12:02 RedBearAK