Keyboard codes

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Foobar

Keyboard codes

Post by Foobar »

Code: Select all

Public Class MyEventReceiver
        Implements IEventReceiver

        Public Function OnEvent(ByVal e As [Event]) As Boolean Implements IEventReceiver.OnEvent
            If e.Type = EventType.KeyInput Then
                If e.Key = 32 Then
                    driver.EndScene()
                    device.CloseDevice()
                    Environment.Exit(-1)
                End If
            End If
        End Function
    End Class
I am trying to close the device and application when 'esc' is pressed. However, it is not quite working. I found the hex value of the escape key, in keycodes.h and converted it to numeric value, but it doesnt work right.
Guest

Post by Guest »

oops, nm it should be 27.
Locked