FinalEngine
FinalEngine copied to clipboard
🐛 Can't Check for Initial State of Lockable Keys
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
- Create an
OpenTKKeyboardDevice
andKeyboard
object. - In the game loop, check if
Keyboard.IsCapsLocked
returns false and create a break-point. - 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