Forum moved here!

Home / Custom keyboard commands for switching tabs

Eirik

Hello!

Is there any way to customize keyboard commands so that I can use switching tabs with F1 and F2? I have this feature in all other programs, so it’s kind of frustrating to use ctrl+shift+tab and ctrl+tab here (much more ineffective imo). Have looked around, and it seems like there is not much support for custom keyboard commands?

kjk

There is no way to do custom keyboard bindings in Sumatra.

Out of curiosity, what other software allows customizing keyboard bindings?

Eirik

Opera, chrome, firefox, matlab, atom, sublime, Tor browser, etc…

Wow I did not think that this was a problem… this is really a huge downfall for me. I switch tabs all the time, three/two keys to press to switch a tab is very ineffective, you should consider making that custom…

SumatraPeter

@Eirik: Tor browser is Firefox ESR, so no point including that separately. Also, I doubt any of the browsers provide custom keyboard binding ability out of the box. Most likely you’re achieving it with add-ons?

I concur with your request though in general, and not just limited to tab switching either. IMO Sumatra with a customizable toolbar and customizable keyboard shortcuts would be a real improvement that many would prefer over the current version (and those who don’t care need not customize anything). Unfortunately these seem to be very long-term development goals, unless someone pitches in and helps @kjk out with working code/patches. So, any (wannabe) hot-shot programmers interested?

@kjk: On that note, I really think you should take part in Google’s Summer of Code if at all possible, because it will definitely provide a massive boost to the app’s feature set (all code commits by interns subject to your approval of course). Have you ever considered and looked into it?

Eirik

At least Opera has it. Don’t know about the others

Antimatter

I use the same shortcuts and ` (above the tab key) to close tabs. Install AutoHotKey. Save the code below in Notepad as an .ahk file. Right click the file and select Run Script. You will need to add the file to the Startup folder to load at startup.

#IfWinActive ahk_class SUMATRA_PDF_FRAME
{
F1::^+tab
F2::^tab
`::^w
}

Eirik

Yeah, I ended up doing the same :wink:

GitHubRulesOK

[Update] for those who want the ahk script to emulate tabbed browsers see