Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(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 #848

Open
gnagga opened this issue Feb 3, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@gnagga
Copy link

gnagga commented Feb 3, 2024

No description provided.

@gnagga gnagga added the enhancement New feature or request label Feb 3, 2024
@RedBearAK
Copy link
Contributor

@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.

@gnagga
Copy link
Author

gnagga commented Feb 4, 2024

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 gnagga changed the title (Windows) restore functionality to move Chrome tabs around with Shift+Alt+left/right arrows. Up/down arrows still work, to move them leftmost/rightmost (Windows) restore functionality to move Chrome tabs around with Shift+Alt(=Cmd)+left/right arrows. Up/down arrows still work, to move them leftmost/rightmost Feb 4, 2024
@gnagga gnagga changed the title (Windows) restore functionality to move Chrome tabs around with Shift+Alt(=Cmd)+left/right arrows. Up/down arrows still work, to move them leftmost/rightmost (Windows) restore functionality to move Chrome tabs around with Shift+Alt(aka Cmd)+left/right arrows. Up/down arrows still work, to move them leftmost/rightmost Feb 4, 2024
@gnagga gnagga changed the title (Windows) restore functionality to move Chrome tabs around with Shift+Alt(aka Cmd)+left/right arrows. Up/down arrows still work, to move them leftmost/rightmost (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 Feb 4, 2024
@gnagga
Copy link
Author

gnagga commented Feb 4, 2024

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 ;)

@RedBearAK
Copy link
Contributor

RedBearAK commented Feb 4, 2024

@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:

kinto/windows/kinto.ahk

Lines 610 to 640 in 4a3bfe7

; Close all browsers
#IfWinActive ahk_group browsers
; Page Navigation
^[::send !{Left} ; Go to prior page
^]::send !{Right} ; Go to next page
;Tab Navigation
^+[::send ^{PgUp} ; Go to prior tab (left)
^+]::send ^{PgDn} ; Go to next tab (right)
^!Left::send ^{PgUp} ; Go to prior tab (left)
^!Right::send ^{PgDn} ; Go to next tab (right)
#Left::send ^{PgUp} ; Go to prior tab (left)
#Right::send ^{PgDn} ; Go to next tab (right)
^q::send {Alt Down}f{Alt Up}x ; exit all windows
; Dev Tools
!^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
!^j::send {Ctrl Down}{Shift Down}j{Shift Up}{Ctrl Up}
; Open preferences
#IfWinActive ahk_exe firefox.exe
^,::send, {Ctrl Down}t{Ctrl Up}about:preferences{Enter}
^+n::send ^+p
#If
#IfWinActive ahk_exe chrome.exe
^,::send {Alt Down}e{Alt Up}s{Enter}
#If
#IfWinActive ahk_exe msedge.exe
^,::send {Alt Down}e{Alt Up}s{Enter}
#If
#IfWinActive ahk_exe opera.exe
^,::send {Ctrl Down}{F12}{Ctrl Up}
#If
#If

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

kinto/windows/kinto.ahk

Lines 631 to 633 in 4a3bfe7

#IfWinActive ahk_exe chrome.exe
^,::send {Alt Down}e{Alt Up}s{Enter}
#If

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.

@gnagga
Copy link
Author

gnagga commented Feb 5, 2024

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?

@RedBearAK
Copy link
Contributor

which one

Should be the one in your user folder.

@RedBearAK
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants