Jump to content
The simFlight Network Forums
alihor

Assign ALT-TAB for task switching

Recommended Posts

Hi Pete,

how can I assign with FSUIPC  a button for "ALT-TAB" to switch to another task?

When I am flying, I want to switch from my cockpit view screen to another application like FS-FlightControl or a weather program.

Alhard

Share this post


Link to post
Share on other sites
58 minutes ago, alihor said:

how can I assign with FSUIPC  a button for "ALT-TAB" to switch to another task?

Well, you could try assigning such a keypress, but the sim uses ALT to display its Menu bar. You could try though. You might be able to assign to 'null' (code 0) with the ALT and TAB as shifts. An assignment to:

K0,20

See the Button Programming section of the Advanced User's guide. There's a table of keycodes and a list of shifts there. 0 is the keycode for "null" (i.e. do nothing) whilst 20 is 16 (for ALT) plus 4 (for TAB).

Try it. I don't know if it will work.

1 hour ago, alihor said:

When I am flying, I want to switch from my cockpit view screen to another application like FS-FlightControl or a weather program.

The other possibility would be to use the EXT library in WideClient's Lua facilities. you'd need a WideFS licence, and you'd need to ryun WideClient on the same PC with "classInstance=1" inits INI file. The EXT library has facilities to set focus on oher programs.

Mostly it is easier to use the mouse.

Pete

 

Share this post


Link to post
Share on other sites
On 10/30/2018 at 6:31 PM, Pete Dowson said:

Well, you could try assigning such a keypress, but the sim uses ALT to display its Menu bar. You could try though. You might be able to assign to 'null' (code 0) with the ALT and TAB as shifts. An assignment to:

K0,20

See the Button Programming section of the Advanced User's guide. There's a table of keycodes and a list of shifts there. 0 is the keycode for "null" (i.e. do nothing) whilst 20 is 16 (for ALT) plus 4 (for TAB).

I did it and it works well.

But as I want to switch to a specific application, ALT-TAB is unfortunately toggling through the already started tasks.

Especially the WideClient window opens as well, which I do not want to see during my task switches.

On 10/30/2018 at 6:31 PM, Pete Dowson said:

The other possibility would be to use the EXT library in WideClient's Lua facilities. you'd need a WideFS licence, and you'd need to ryun WideClient on the same PC with "classInstance=1" inits INI file. The EXT library has facilities to set focus on oher programs.

I will test it now with   --- = EXT.RUN ("pathname", EXT_MIN") ---

On 10/30/2018 at 6:31 PM, Pete Dowson said:

Mostly it is easier to use the mouse.

Using the mouse is more cumbersome than to press a button on the flight stick.  😀

Alhard

Share this post


Link to post
Share on other sites
23 minutes ago, alihor said:

But as I want to switch to a specific application, ALT-TAB is unfortunately toggling through the already started tasks.

Isn't that what it does in any case? It's a Windows thing.

25 minutes ago, alihor said:

I will test it now with   --- = EXT.RUN ("pathname", EXT_MIN")

That runs a program,  You  originally seemed to be asking to switch to a running program, which is all ALT TAB can do. You can do this with 

h = ext.gethandle("name") --name is program name incl .exe, or program title (as listed in Task Manager)
ext.focus(h)

Oh, and, sorry, i misled you about needing WideClient. You can use the ext library in FSUIPC too -- I forgot I added that library to both! 😞

Just same the above short two-lines program as, say, "usexxx.lua" where xxx suggests the program you are switching to, then, in FSUIPC, assign your button or key to Lua usexxx.

Pete

 

 

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

×

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.