FinalEngine icon indicating copy to clipboard operation
FinalEngine copied to clipboard

🐛 Can't Check for Initial State of Lockable Keys

Open softwareantics opened this issue 3 years ago • 0 comments

Expected Behavior

When checking a lockable keys state using the Keyboard class (i.e; Keyboard.IsCapsLocked, etc) it should determine the correct state from the moment the keyboard is initialized.

Current Behavior

Right now, Keyboard.IsCapsLocked, Keyboard.IsNumLocked, etc will all return false until a keyboard action has been performed by the user.

Failure Information (for bugs)

The reason this is happening is due to the limitations of the OpenTK library, in it's current state you cannot check for the initial state of a lockable key upon starting an application.

Steps to Reproduce

  1. Create an OpenTKKeyboardDevice and Keyboard object.
  2. In the game loop, check if Keyboard.IsCapsLocked returns false and create a break-point.
  3. Finally, run the application and you'll see the bug arise.

Context

  • Operating System: Windows 10 Home
  • Hardware: Intel i7-10710U @ 1.10GHz, 32.0 GB
  • Toolchain: Microsoft Visual Studio Community 2019 - Version 16.8.2

softwareantics avatar Nov 29 '20 08:11 softwareantics