Page 1 of 1

Keyboard - Mouse events not working

Posted: Wed May 29, 2024 5:18 pm
by MehdiZangenehBar
Except for the "OnKeyDown" in some cases (pressing f key), none of the following events works, why?

Code: Select all

-- **************************************************
-- General information about this script
-- **************************************************

ScriptName = "Test_Script"

Test_Script = {}

function Test_Script:Name()
	return 'Test Script'
end

function Test_Script:Version()
	return '1.0'
end

function Test_Script:UILabel()
	return 'Test Script'
end

function Test_Script:Creator()
	return 'Test'
end

function Test_Script:Description()
	return 'Test'
end

-- **************************************************
-- Is Relevant / Is Enabled
-- **************************************************

function Test_Script:IsRelevant(moho)
	return true
end

function Test_Script:IsEnabled(moho)
	return true
end

-- **************************************************
-- Events
-- **************************************************

function Test_Script:OnMouseDown(moho, mouseEvent)
	print('Test_Script:OnMouseDown')
end

function Test_Script:OnMouseUp(moho, mouseEvent)
	print('Test_Script:OnMouseUp')
end

function Test_Script:OnKeyDown(moho, keyEvent)
	print('Test_Script:OnKeyDown')
end

function Test_Script:OnKeyUp(moho, keyEvent)
	print('Test_Script:OnKeyUp')
end

function Test_Script:OnInputDeviceEvent(moho, deviceEvent)
	print('Test_Script:OnInputDeviceEvent')
end

Re: Keyboard - Mouse events not working

Posted: Wed May 29, 2024 11:32 pm
by synthsin75
Shortcut keys do not get passed to scripts.

OnKeyUp not working probably has something to do with the momentary tool selection (tool selected while you hold the shortcut, and then back to the last tool when you release it).

Re: Keyboard - Mouse events not working

Posted: Wed Jun 05, 2024 1:41 am
by MehdiZangenehBar
So the only trigger is Alt?