跳到正文

WayKeyFix

作者:Crepper9

Filters invalid GLFW scancode 248 and mouse button 99 events sent by Hyprland.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

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

常见问题

WayKeyFix 支持哪些 Minecraft 版本?

WayKeyFix 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

WayKeyFix 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。

评论

登录后评论和评分