LShiftFix
作者:rebot | 分类:模组
Minecraft 版本: 1.8.9
平台: forge
标签: optimization
Problem
When a Chinese / Japanese / Korean IME is active in Minecraft 1.8.9, the player cannot jump while holding Shift (sneak) and pressing Space. The jump input is swallowed by the OS input method.
Root cause: Almost every IME registers Shift+Space as a full-width/half-width toggle hotkey. Windows routes WM_KEYDOWN through ImmTranslateMessage before dispatching to the app. The IME consumes the combo there, so Minecraft's Keyboard.next() event queue never sees the key press — keyBindJump.isKeyDown() stays false forever.
Fix
LShiftFix injects at the tail of EntityPlayerSP.updateMovementInput():
Reads the player's bound jump key (default Space, supports rebinding)
Calls Keyboard.isKeyDown(keyCode) to directly poll the hardware state
If physically pressed but movementInput.jump is still false, force it to true
LWJGL's keyDownBuffer is populated by WindowProc at a layer lower than WM_KEYDOWN, so IME interception of the event queue doesn't affect it. The fix is IME-agnostic — works for Sogou, Microsoft Pinyin, QQ Pinyin, Google Input, Japanese IME, Korean IME, etc.
请登录后举报
暂无评论,抢个沙发吧~