Jump to content
Sign in to follow this  
Vincentbreda

Virtual Keyboard / views

Recommended Posts

Hi there,

I would like to assign some views to a voice command (overhead, external view, drone view etc.). My initial thoughts were to use a virtual event for this, where I assign the key combo I use now on my real keyboard tot a virtual event on the virtual keyboard. This doesn't seem to work however. I try to find a solution in the manual, but couldn't find it. Can you help me out with this issue?

 

Kind regards,

Vincent

 

Share this post


Link to post
Share on other sites
1 hour ago, Vincentbreda said:

This doesn't seem to work however.

Why not?

Option 1:
In general, virtual keyboard keys only work when the MSFS window has the focus. If you can't ensure that, use a script that first sets the focus on MSFS, then sends the virtual keys.

(FOCUS:flightsimulator) (SPLIT:100) (VKD:29- 157-162) (VKD:56-184-164) (VKD:20-148-84) (SPLIT:100) (VKU:20-148-84) (VKU:29-157-162) (VKU:56- 184-164)

The virtual key codes you get with the button "Insert VKey" on the RPN script editor.

Option 2:
Alternatively you can also use vJoy. Install vJoy, create a virutal joystick, create the assignments in AAO to virtual joystick buttons on the vJoy device, then assign them to the cameras in MSFS

Option 3:
Use RPN scripts to switch the views directly instead of virtual keys/buttons.
A fellow simmer made a camera button profile for the StreamDeck that has scripts with all kinds of views, you can find it on flightsim.to (it is for the iniBuilds A310, disregard the StreamDeck part, you only want the scripts package for the views)
Here are a few script examples:

External camera:
3·(>A:CAMERA·STATE,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Showcase camera:
5·(>A:CAMERA·STATE,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Drone
4·(>A:CAMERA·STATE,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Cockpit camera:
2·(>A:CAMERA·STATE,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Pilot View
2·(>A:CAMERA·STATE,·Enum)·1·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·1·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

FO View
2·(>A:CAMERA·STATE,·Enum)·1·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·5·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Instruments 1
2·(>A:CAMERA·STATE,·Enum)·2·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Instruments 2
2·(>A:CAMERA·STATE,·Enum)·2·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·1·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Quickview 1 (left)
2·(>A:CAMERA·STATE,·Enum)·3·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·0·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)

Quickview 2 (right)
2·(>A:CAMERA·STATE,·Enum)·3·(>A:CAMERA·VIEW·TYPE·AND·INDEX:0,·Enum)·1·(>A:CAMERA·VIEW·TYPE·AND·INDEX:1,·Enum)
 

etc.

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post
Share on other sites

Thanks a lot for your in-depth reply, I'm going to try your solutions to see what works best for me!

 

Kind regards,

 

Vincent

 

Share this post


Link to post
Share on other sites
19 minutes ago, Vincentbreda said:

what works best for me

The scripts! 🙂

 


LORBY-SI

Share this post


Link to post
Share on other sites

These are cool and good to know different options instead of sending keyboard events.

Any way of making these views slow down? They teleport directly into the view as opposed to smoothly moving like the keyboard shortcut does..

Share this post


Link to post
Share on other sites
8 hours ago, C414AC said:

These are cool and good to know different options instead of sending keyboard events.

Any way of making these views slow down? They teleport directly into the view as opposed to smoothly moving like the keyboard shortcut does..

Try splitting the RPN code. Instead of setting the camera state and view type index 0 from scratch every time, set the camera state and correct view type index 0 once and change only the view type index 1. Then the camera will float to the new position. Doesn't work for everything, meaning you may have to trial&error the parameters until the camera behaves like you want it to. If it can.

Here is the spec for these variables:

Camera Variables (flightsimulator.com)

 

Edited by Lorby_SI

LORBY-SI

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...