Fixes "Invalid scancode 248" and "Invalid mouse button 99" on Linux with Hyprland.
The Problem
On Hyprland, sometimes fake release events get sent with scancode 248 or mouse button 99, either during workspace switches or seemingly at random. Minecraft doesn't know these aren't real inputs and passes them straight through. The result: buttons stop responding, your inventory locks up, JEI search boxes won't take text, and your log fills up with these errors.
The Fix
WayKeyFix checks each input event before Minecraft sees it and drops the ones that no real keyboard or mouse could ever produce. Nothing else changes.
- Zero config, just install it
- Only runs on Wayland. On X11 or Windows it does nothing
- Client side only
- Doesn't touch game logic, so it works with any mod or modpack
FAQ
Will this break my keybinds?
No. Real key presses are untouched. It only filters out impossible values.
Do I need this on the server?
No. Client side only, install it in your local mods folder.
Does this cost performance?
On X11 or Windows, nothing runs at all. On Wayland, each event is checked with two integer comparisons, a fraction of a nanosecond. Not something you'll ever notice.
Install
Drop the jar into your NeoForge 1.21.1 instance's mods/ folder. Requires NeoForge 21.1.233 or newer.
Notice
You may still see "Invalid scancode 248" in your log. That message comes from GLFW itself, logged before the mixin runs. The message stays, but the input corruption it used to cause is gone.
License
MIT
No gallery available for this project.