Topic: Key events how do i stop the delay
Local receiver:IEventReceiver=IEventReceiver.create(MyEventReceiver.generate)
Type MyEventReceiver Extends IEventReceiver
Method OnEvent:Int(event:SEvent)
If (event.getEventType()=EET_KEY_INPUT_EVENT )
Local key:Int=event.getKeyinputkey()
Case EKEY_KEY_D
Local v:Vector3df=ship.getPosition()
v.setY(v.getY()-2.0)
ship.setPosition(v)
Return True
Default
Return False
EndSelect
EndIf
Return False
EndMethod
' we must override the generate function in order for instantiation to work properly
Function generate:IEventReceiver()
Return New MyEventReceiver
EndFunction
EndType
Hi,
Here is some event code hijacked from the example. How do i stop the keyboard using the typing delay when i press the key ??
I found the method: getKeypresseddown() on the irrlicht forums but it doesnt seem to work.
I would prefer not to use an event system at all, but instead use the keydown() and keyhit() but they are not working when im using the irrlicht mod