PollEvent() - KeyRepeat Bug

Archives Forums/Linux Discussion/PollEvent() - KeyRepeat Bug

Space Fractal(Posted 2007) [#1]
It seen BlitzMax report KeyRepeat completely wrong. Instead it mainly report KeyUp constantly (would been much easier override if it was KeyDown), which got the controls to stop where it should not been due.

KeyDown() does not work in Canvas mode (windowered), so it is anywhere I can override that bug? It work nice in Windows:

WindowID=CreateWindow("KeyRepeat BUG", 10, 10, 640, 480, Null)

	While True
		PollEvent
		Event$=CurrentEvent.ToString()
		
		If Left$(Event$,7)<>"Unknown"
			If EventID()<>2049
				Print Event$+" "+EventID()
			EndIf
			Find=Instr(Event$,":")
			Do$=Left$(Event$, Find-1)
			Find=Instr(Event$,"x=") 
			Find=Find+2
			Find2=Instr(Event$, " ",Find)
			x=Mid$(Event$,Find,Find2-Find-1).ToInt()
			Find=Instr(Event$,"y=") 
			Find=Find+2
			Find2=Instr(Event$, " ",Find)
			y=Mid$(Event$,Find,Find2-Find-1).ToInt()			

			Find=Instr(Event$,"data=") 
			Find=Find+5
			Find2=Instr(Event$, " ",Find)
			data=Mid$(Event$,Find,Find2-Find-1).ToInt()
			Print Event$
			If DO$="WindowClose" Then End
		EndIf
	EndWhile


Also for some reason ESC key is not even polled. I like to use ESC to quit my App.


I got most part of my app to work. It only missing the sound yet (because I used bass.dll on windows version).

I use Ubuntu v7.04 with nearly all updates (all apart this week).

[EDIT]
Look like if you do the same in fullscreen and use PollEvent(), then this would work fine.
[/EDIT]


Space Fractal(Posted 2008) [#2]
Anyone experiment this bug?

It now being worse in my Linux setup now. IT do that regaardles it in fullscreen or windowered, and it also effected KeyDown() as well.

The problem the PollEvent send a KeyUp Event instead of KeyRepeat event, so the game throuch the key is released, even I still hold the key down.

Escape key is not polled at all for some reason.

That cause the keyboard usuable to use in Games, so it might been a keyboard driver problem, or is the pollevent bug in BlitzMax?

I do guess its more a keyboard driver bug issue. I do not have a USB keyboard.

It pretty annoying....