Skip to content

Gracefully map unknown or invalid Input.Key to ImGuiKey.None.#2458

Merged
Perksey merged 2 commits into
dotnet:mainfrom
Tweety-Lab:imgui-unknown-key-mapping
May 26, 2025
Merged

Gracefully map unknown or invalid Input.Key to ImGuiKey.None.#2458
Perksey merged 2 commits into
dotnet:mainfrom
Tweety-Lab:imgui-unknown-key-mapping

Conversation

@Tweety-Lab
Copy link
Copy Markdown
Contributor

Summary of the PR

Changes ImGuiController.TranslateInputKeyToImGuiKey to no longer throw a NotImplementedException when given an unknown key and instead gracefully map to ImGuiKey.None, the ImGui equivalent of an unmapped/discarded key.

Related issues, Discord discussions, or proposals

Fixes #2372.

Copy link
Copy Markdown
Member

@Perksey Perksey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Silk.NET Development Tracker May 26, 2025
@Perksey Perksey enabled auto-merge (squash) May 26, 2025 14:39
@Perksey Perksey merged commit 4528b57 into dotnet:main May 26, 2025
3 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Silk.NET Development Tracker May 26, 2025
@Tweety-Lab Tweety-Lab deleted the imgui-unknown-key-mapping branch May 26, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

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

2 participants