Home›Java›Mods›Hyprland Input Fix
Hyprland Input Fix
ModsJava

Hyprland Input Fix

Java mod listed for Minecraft 1.20. Downloads from the MC Java Mods app on Android.

by TysonTheEmber · on CurseForge

⬇ Download on CurseForge

The author built this one for Minecraft 1.20.1 on Forge. On other versions it may install and then do nothing.

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:

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" input

After Installing:

[Switch workspace -> Return to Minecraft]
✓ Everything just works
✓ Click anything immediately
✓ No errors, no workarounds needed

Features

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

Compatibility

   
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:

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:

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.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more