We made few functions using low level Rapise APIs

g_util.KeyPress(/**String*/keyCode, /**bool*/press)

to help achieving this. The list of available Key Codes you may find here:

https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

 

And here is how it may be used for cover the subject of this topic:

function PressAlt()
{
	g_util.KeyPress(/**String*/"VK_MENU", /**Boolean*/true);
}

function ReleaseAlt()
{
	g_util.KeyPress(/**String*/"VK_MENU", /**Boolean*/false);
}

function PressCtrl()
{
	g_util.KeyPress(/**String*/"VK_CONTROL", /**Boolean*/true);
}

function ReleaseCtrl()
{
	g_util.KeyPress(/**String*/"VK_CONTROL", /**Boolean*/false);
}

function PressShift()
{
	g_util.KeyPress(/**String*/"VK_SHIFT", /**Boolean*/true);
}

function ReleaseShift()
{
	g_util.KeyPress(/**String*/"VK_SHIFT", /**Boolean*/false);
}

function PressWin()
{
	g_util.KeyPress(/**String*/"VK_LWIN", /**Boolean*/true);
}

function ReleaseWin()
{
	g_util.KeyPress(/**String*/"VK_LWIN", /**Boolean*/false);
}