How to run some FS2020 commands by luamacros?

Announcements, questions
Post Reply
jonny
Posts: 18
Joined: 22 Aug 2012, 19:35

How to run some FS2020 commands by luamacros?

Post by jonny » 14 Oct 2022, 21:05

In FS2020 one can see different instrument views by the commands [CTRL]+1 ... [CTRL]+9. I would like to map a single key in a second keyboard to do this commands. But it seems impossible for FS2020 to reciev commands from LUAMacros. I have tried this command:

Code: Select all

	elseif (button == 97) then    -- PANEL_1
		lmc_send_input(162, 0, 0) -- press Left CTRL
		lmc_send_input(49, 0, 0) -- press '1'
		lmc_send_input(49, 0, 2) -- releare '1'
		lmc_send_input(162, 0, 2) -- release Left CTRL
but nothing happends.

This commads works fine:

Code: Select all

	elseif (button == 101) then    -- 
		lmc_send_input(162, 0, 0) -- press Left CTRL
		lmc_send_input(67, 0, 0) -- press 'C'
		lmc_send_input(67, 0, 2) -- releare 'C'
		lmc_send_input(162, 0, 2) -- release Left CTRL
		
	elseif (button == 102) then    -- 
		lmc_send_input(162, 0, 0) -- press Left CTRL
		lmc_send_input(86, 0, 0) -- press 'V'
		lmc_send_input(86, 0, 2) -- releare 'V'
		lmc_send_input(162, 0, 2) -- release Left CTRL
I use the commands in a modified quickstart.lua file.
Why won't the first command not work in FS2020?
Thanks!

Post Reply