Page 1 of 1
Keyboard shortcut to switch focus between list & PDF preview without mouse
Posted: 24 Mar 2022 14:54
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.
Re: Keyboard shortcut to switch focus between list & PDF preview without mouse
Posted: 25 Mar 2022 15:13
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", ©DATA, "Ptr")
return
}
And: