Hyprland Input Fix
Modby TysonTheEmber
Fixes broken GUI interactions and GL errors when running Minecraft on Hyprland (Wayland).
Type
Mod
CurseForge Downloads
516
CurseForge ID
1422610
Last Updated
Jul 25, 2026
Description
Hyprland Input Fix
Finally play Minecraft smoothly on Hyprland!
Fix frustrating input bugs that make GUI interactions impossible after switching workspaces on Hyprland (Wayland).
Does This Sound Familiar?
You're playing Minecraft on Linux with Hyprland, you switch to another workspace to check Discord or your browser, then when you come back:
- Can't click anything in Minecraft - menus, inventory, buttons all broken
- Logs filled with errors: GL ERROR: Invalid scancode 248 and Invalid mouse button 99
- The only fix: Press a keyboard key
This mod fixes it completely, no need to move your hand to your keyboard every time you switch workspaces.
What This Mod Does
This lightweight client-side mod sits between Hyprland and Minecraft, catching and filtering out the invalid input events that break your game.
Before Installing:
[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" inputAfter Installing:
[Switch workspace -> Return to Minecraft] ✓ Everything just works ✓ Click anything immediately ✓ No errors, no workarounds neededFeatures
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 unaffectedCompatibility
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.
Technical Details
Click to expand technical explanation
The Problem
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:
- Mouse button 99 (valid range: 0-7)
- Scancode 248 (valid range: 0-200)
Minecraft's GLFW integration doesn't validate these and they corrupt the internal input state, making GUIs unclickable.
The Solution
This mod uses Mixin to inject validation at the start of:
- MouseHandler.onPress() - Validates mouse button range
- KeyboardHandler.keyPress() - Validates scancode range
Invalid events are cancelled at HEAD before Minecraft processes them, keeping input state clean.
FAQ
Do I need this mod if I don't use Hyprland?
No, but it won't hurt anything. The mod only filters genuinely invalid input codes that would cause errors anyway.
Will this work on other Wayland compositors?
Possibly! If you experience similar issues on Sway, River, or other compositors, give it a try.
Does this affect normal gameplay?
Not at all. Valid inputs pass through unchanged - this only blocks invalid codes that would crash or corrupt input handling.
Can I use this on a server?
No need! This is client-side only. Input handling happens on your computer, not the server.
Will this slow down my game?
No. The validation check is trivial (two integer comparisons) and runs only on input events.
Similar Mods
Donut Hoppers
A toggleable hopper mod for DonutSMP testing.
Mystical Adaptations: Continuation
An unofficial continuation of Mystical Adaptations for 1.21+
Faction power skills
This mode is required for the bleach reborn mod
stainers: fishing and recovery net
stainers: fishing and recovery net
Hardcore Enforcer
Forces hardcore world generation and disables cheats - Completely configurable.
BetterTeams
A Teams mod with a built-in custom tab bar. Lots of features and a lot of fun.