Finally play Minecraft smoothly on Hyprland!
Fix frustrating input bugs that make GUI interactions impossible after switching workspaces on Hyprland (Wayland).
You're playing Minecraft on Linux with Hyprland, you switch to another workspace to check Discord or your browser, then when you come back:
GL ERROR: Invalid scancode 248 and Invalid mouse button 99This mod fixes it completely, no need to move your hand to your keyboard every time you switch workspaces.
This lightweight client-side mod sits between Hyprland and Minecraft, catching and filtering out the invalid input events that break your game.
[Switch workspace -> Return to Minecraft]
X Can't click inventory
X Can't open menus
X Spam of GL errors in console
? Press random keys to "unstick" input
[Switch workspace -> Return to Minecraft]
✓ Everything just works
✓ Click anything immediately
✓ No errors, no workarounds needed
| Feature | Description |
|---|---|
| Fix Mouse Input | Filters invalid mouse button events (button 99 → blocked) |
| Fix Keyboard Input | Filters invalid scancode events (scancode 248 → blocked) |
| Zero Config | Install and forget - works automatically |
| No Performance Hit | Lightweight mixin implementation |
| Client-Side Only | No server installation needed |
| Safe & Non-Intrusive | Only blocks invalid events, normal input unaffected |
| Minecraft | 1.20.1 |
| Mod Loader | Forge 47.2.0+ |
| Side | Client Only |
| Environment | Hyprland on Wayland (Linux) |
Works with all modpacks! This mod only touches input validation and is compatible with everything.
Click to expand technical explanation
When you switch Hyprland workspaces, the compositor sends "release all keys/buttons" events to prevent stuck inputs. However, it sometimes sends events with invalid GLFW codes:
Minecraft's GLFW integration doesn't validate these and they corrupt the internal input state, making GUIs unclickable.
This mod uses Mixin to inject validation at the start of:
MouseHandler.onPress() - Validates mouse button rangeKeyboardHandler.keyPress() - Validates scancode rangeInvalid events are cancelled at HEAD before Minecraft processes them, keeping input state clean.
No, but it won't hurt anything. The mod only filters genuinely invalid input codes that would cause errors anyway.
Possibly! If you experience similar issues on Sway, River, or other compositors, give it a try.
Not at all. Valid inputs pass through unchanged - this only blocks invalid codes that would crash or corrupt input handling.
No need! This is client-side only. Input handling happens on your computer, not the server.
No. The validation check is trivial (two integer comparisons) and runs only on input events.