Keyboard problem

Hello.

I have a strange bug under Windows (or the simulator)
In the following code,

if I press down-arrow and right-arrow then space key do not fire event !!!

function onKeyEvent(event)
	if event.phase == 'down' then
		local key = event.keyName
		print (key)
	end
end

Runtime:addEventListener( "key", onKeyEvent )

Do you have the same problem ?

If you are just pressing the keys in sequence, like down, right, space, etc. then there should be no issues.

If you are holding ctrl and press an arrow while doing so, then your key events may be intercepted by the simulator’s shortcuts for rotating the view, suspending or shaking the device, etc.

No, this is not sequence, the 3 keys are pressed in same time

I’ve try to build for windows,
close the simulator and run the app.

The problem is the same :man_shrugging:

That’s fairly odd. I can’t reproduce that issue in any way. I can slam 15-20 keys down and they all get registered as expected.

Hum. interresting !
it may be dependent on the keyboard

I’ll test on another computer !

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.