Keyboard shortcut to switch focus between list & PDF preview without mouse

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
indignant_juicer
Posts: 5
Joined: 14 Dec 2021 18:48

Keyboard shortcut to switch focus between list & PDF preview without mouse

Post by indignant_juicer »

I use xyplorer to browse a lot of PDFs without opening them outside of xyplorer.

What would be the keyboard shortcuts for jumping between the file list and the PDF preview and back again? Tabbing to it is not a solution, it doesn't get there. I am using PDF Xchange Viewer for what it's worth.

Norn
Posts: 522
Joined: 24 Oct 2021 16:10

Re: Keyboard shortcut to switch focus between list & PDF preview without mouse

Post by Norn »

Ctrl+F11?
www.autohotkey.com

Code: Select all

#NoEnv
#NoTrayIcon
#Persistent
#SingleInstance force

xyPath := "D:\XYplorer"
xyExe  := "XYplorer.exe"
xyID   := "ahk_class ThunderRT6FormDC ahk_exe " xyExe

^`::Click 1900, 550 ;
+`::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
        Send_WM_COPYDATA(xyHWnd, "::focus 'L';")
    } else {
        Run, "%xyPath%\%xyExe%"
    }
    WinActivate, % "ahk_id " xyHWnd
return


Send_WM_COPYDATA(xyHWnd, message) {
    size := StrLen(message)
    if !(A_IsUnicode) {
        VarSetCapacity(data, size * 2, 0)
        StrPut(message, &data, size, "UTF-16")
    } else {
        data := message
    }
    VarSetCapacity(COPYDATA, A_PtrSize * 3, 0)
    NumPut(4194305, COPYDATA, 0, "Ptr")
    NumPut(size * 2, COPYDATA, A_PtrSize, "UInt")
    NumPut(&data, COPYDATA, A_PtrSize * 2, "Ptr")
    result := DllCall("User32.dll\SendMessageW", "Ptr", xyHWnd, "UInt", 74, "Ptr", 0, "Ptr", &COPYDATA, "Ptr")
    return
}

And:
To see the attached files, you need to log into the forum.
Windows 11 24H2 @100% 2560x1440

Post Reply