Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGuiController throws a NotImplementedException when a key event with Silk.NET.Input.Key.Unknown is fired. #2372

Open
EbiseLutica opened this issue Nov 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@EbiseLutica
Copy link

Summary

In the Silk.NET app using ImGui, when I press the key which Silk.NET detects as Silk.NET.Input.Key.Unknown, app throws an unhandled NotImplementedException with below stacktrace:

Unhandled exception. System.NotImplementedException: The method or operation is not implemented.
   at Silk.NET.OpenGL.Extensions.ImGui.ImGuiController.TranslateInputKeyToImGuiKey(Key key)
   at Silk.NET.OpenGL.Extensions.ImGui.ImGuiController.OnKeyEvent(IKeyboard keyboard, Key keycode, Int32 scancode, Boolean down)
   at Silk.NET.OpenGL.Extensions.ImGui.ImGuiController.OnKeyDown(IKeyboard keyboard, Key keycode, Int32 scancode)
   at Silk.NET.Input.Glfw.GlfwKeyboard.<Subscribe>b__33_1(WindowHandle* _, Keys key, Int32 code, InputAction action, KeyModifiers mods)
   at Silk.NET.Input.Glfw.GlfwEvents.<.ctor>b__0_1(WindowHandle* a, Keys b, Int32 c, InputAction d, KeyModifiers e)
   at Silk.NET.Windowing.Internals.ViewImplementationBase.Silk.NET.Windowing.IView.DoEvents()
   at Silk.NET.Windowing.Internals.ViewImplementationBase.Run(Action onFrame)
   at Silk.NET.Windowing.Glfw.GlfwWindow.Run(Action onFrame)
   at Silk.NET.Windowing.WindowExtensions.Run(IView view)
   ...

Steps to reproduce

  • Platform: Desktop
  • Framework Version: .NET 8, Windows 11
  • API: OpenGL
  • API Version: OpenGL 3.3
  1. Run https://github.com/prometeapp/SilkNetImGuiInputErrorTest
  2. Press Unknown key

Comments

Some example of keys Silk.NET detects as Silk.NET.Input.Key.Unknown:

  • [¥] key on Japanese OADG 109A
  • [\] key on Japanese OADG 109A

If you know how to fix this issue, please submit a pull request instead!

@Jemy191
Copy link

Jemy191 commented Dec 24, 2024

I have the same problem, when I use any media key it throws.

@Jemy191
Copy link

Jemy191 commented Dec 24, 2024

@EbiseLutica did you find a workaround?

Edit: Using version 1.16 seem to work.

@EbiseLutica
Copy link
Author

@Jemy191 No I don't currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants