Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OpenKneeboard + AutoHotKey => The Winning Couple

Featured Replies

... to perform all you have dreamed to do from your VR cockpit.

I was looking for such solution since I fly with a VR headset, more than 2 years ago now.

With the fantastic OpenKneeboard free app (I took me some time to understand its power) + a simple AutoHotKey script, I'm able to:

  • Read any set of Pdf documents (native Pdf, not bitmap converted) and navigate inside without latency
  • Display any Desktop App, refreshed in real time
  • Interact with your mouse with the Desktop app you display

All this without leaving the VR cockpit, without performance impact, and with native headset crisp full resolution, like you can see with the OXRTK menu.

Then all our sim apps which are "not VR compliant" are now VR ready

See how you can use Pilot2ATC, Self Loading Cargo, the incoming BeyondATC and more...

20240111.jpg

 

20240114.jpg

 

20240117.jpg

 

20240110.jpg

 

20240112.jpg

Roland

MSFS my local airport release: LFOR Chartres-Metropole

MSFS Plugins RAAS (registered FSUIPC7 required)

MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites

  • Author

Here is an AHK script sample for the following scenario: You want to display and interact with Pilot2ATC.

In OKB: You add a "Window capture" tab, and set it to capture Pilot2ATC window.

Let say you want to bind button 6 of your controller #1 to switch the focus as long as you maintain the button down, and get back to MSFS focus when finished:

global appP2A:="ahk_exe Pilot2ATC_2021.exe"
global mfs:="ahk_exe FlightSimulator.exe"

1Joy6::
{
    if not WinExist(appP2A)
        return
	switchApp("1Joy6",appP2A)
}

switchApp(key,app)
{
	OutX:=0
	OutY:=0
	OutWidth:=0
	OutHeight:=0
	SendInput "{Blind}!{Tab}"
	Sleep 100
	WinActivate app
	WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight
	MouseMove OutWidth/2,OutHeight/2
	KeyWait key
	SendInput "{Blind}!{Tab}"
	WinActivate mfs
}

When you push the button, the mouse is moved to the center of the client app and you can interact with it until you release it. Simple, no?

 

>>> OpenKneeBoard on GitHub

 

 

Edited by roland_lfor

Roland

MSFS my local airport release: LFOR Chartres-Metropole

MSFS Plugins RAAS (registered FSUIPC7 required)

MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites

AutoHotKey rules. Been using it for 15+ years. The script I use for control bindings and useful VR functions in MSFS has steadily grown to around 1000 lines of code... And part of it is exactly for interacting with OpenKneeboard and switching input between MSFS and Pilot2ATC like you do.

  • 2 weeks later...
On 1/2/2024 at 10:22 PM, roland_lfor said:

Here is an AHK script sample for the following scenario: You want to display and interact with Pilot2ATC.

In OKB: You add a "Window capture" tab, and set it to capture Pilot2ATC window.

Let say you want to bind button 6 of your controller #1 to switch the focus as long as you maintain the button down, and get back to MSFS focus when finished:


global appP2A:="ahk_exe Pilot2ATC_2021.exe"
global mfs:="ahk_exe FlightSimulator.exe"

1Joy6::
{
    if not WinExist(appP2A)
        return
	switchApp("1Joy6",appP2A)
}

switchApp(key,app)
{
	OutX:=0
	OutY:=0
	OutWidth:=0
	OutHeight:=0
	SendInput "{Blind}!{Tab}"
	Sleep 100
	WinActivate app
	WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight
	MouseMove OutWidth/2,OutHeight/2
	KeyWait key
	SendInput "{Blind}!{Tab}"
	WinActivate mfs
}

When you push the button, the mouse is moved to the center of the client app and you can interact with it until you release it. Simple, no?

 

>>> OpenKneeBoard on GitHub

 

 

Tried running this script but I get an error on line 67 (WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight) saying that this line contains no recognized action. Any help will be appreciated, thanks!

19 minutes ago, Divij said:

(WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight) saying that this line contains no recognized action

Are you running AutoHotKey v2? I would expect you'd get that error in AutoHotKey v1 as WinGetClientPos doesn't exist in v1.

22 minutes ago, JacquesBrel said:

Are you running AutoHotKey v2? I would expect you'd get that error in AutoHotKey v1 as WinGetClientPos doesn't exist in v1.

Thank you! That was the problem.

Using Navigraph Charts in VR this way feels a lot smoother. 

Out of curiosity, is there a performance hit using Open Kneeboard in VR in MSFS?

  • Author
1 hour ago, Divij said:

Out of curiosity, is there a performance hit using Open Kneeboard in VR in MSFS?

It's very low, even on my old system.

Roland

MSFS my local airport release: LFOR Chartres-Metropole

MSFS Plugins RAAS (registered FSUIPC7 required)

MSFS FX for Objects & Landmark in France (Steam and smoke) and Aerial coverage for French nuclear sites

Understood, thanks! This makes using Charts so much faster in VR rather than relying on the airplane EFB.

Is it possible to edit this code for it to work with 2 Programs (Charts +vPilot). So using the same joystick hot key for mouse interaction but for 2 apps depending on which one is in focus in the Kneeboard.

Got it. So would this edited code work for what I am looking to do?

 

global appP2A:="ahk_exe Navigraph Charts.exe"
global appP3A:="ahk_exe vpilot.exe"
global mfs:="ahk_exe FlightSimulator.exe"

1Joy20::
{
    if not WinExist(appP2A)
        return
    switchApp("1Joy20",appP2A)
}

1Joy5::
{
    if not WinExist(appP3A)
        return
    switchApp("1Joy5",appP3A)
}

switchApp(key,app)
{
    OutX:=0
    OutY:=0
    OutWidth:=0
    OutHeight:=0
    SendInput "{Blind}!{Tab}"
    Sleep 100
    WinActivate app
    WinGetClientPos &OutX, &OutY, &OutWidth, &OutHeight
    MouseMove OutWidth/2,OutHeight/2
    KeyWait key
    SendInput "{Blind}!{Tab}"
    WinActivate mfs
}
 

Apologies for all the trouble but this is truly a gamechanger for me if I can get it to work 🙂

Edited by Divij

As mentioned there isn't a way that you can get information from OpenKneeboard about which tab is currently open. But you can switch tabs from AutoHotKey using the various RemoteControl-*.exe files in OpenKneeboard: https://openkneeboard.com/features/remote-controls.html#openkneeboard-remotecontrol-set_tabexe - so you could have your script switch to a specific tab and then set mouse focus in the specific app.

If you want one button to do more than one thing, you could use short press/long press, eg. on a short press switch to tab A, on a long press switch to tab B. Code example here: https://www.autohotkey.com/boards/viewtopic.php?t=88662 (v1 script, so it needs to be modified for v2)

Thank you for your help! 

  • 1 month later...

@roland_lfor or someone, great, just seeking this to begin a bit in IVAO again, though in VR, and like many others I found this problem, and if I want the IVAO Pilot Client Altitude in the VR cockpit?, what do I do?

Where those scripts go?

A good manual?, I don´t have tablets installed in the OpenTabletDriver, or what I do?, what a mess, I have the plugin Kneeboard OTD-IPC in it installed, but nothing hahaha, "No tablets were detected".

Ah, ok, there are 3 pages in the "Quick Start" manual pressing the 3 lines button, ok, I have the IVAO windows capture already, I will continue testing and investigating.

Edited by peloto

I’ve downloaded OpenKneeboard and setup 4 window capture tabs for the apps I want to bring into MSFS. 
 

I would like to use AHK as described above but rather than hold the button down, I would like to press a button to bring the window in then press the same button to return to MSFS. Do I just need an additional sendinput or can I just remove the keywait?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.