/// <summary> /// Initializes this instance and starts listening to keyboard input events /// </summary> /// <exception cref="NotSupportedException">Is thrown if keyboard manager is used on an usupported platform.</exception> public void Initialize() { // create the platform-specific instance platform = KeyboardPlatform.Create(game.Window.NativeWindow); // bind to platform-independent events platform.KeyPressed += HandleKeyPressed; platform.KeyReleased += HandleKeyReleased; }
/// <summary> /// Initializes this instance and starts listening to keyboard input events /// </summary> /// <exception cref="NotSupportedException">Is thrown if keyboard manager is used on an unsupported platform.</exception> public override void Initialize() { base.Initialize(); // create the platform-specific instance platform = KeyboardPlatform.Create(Game.Window.NativeWindow); // bind to platform-independent events platform.KeyDown += HandleKeyDown; platform.KeyUp += HandleKeyUp; }