I am regularly finding that even after releasing a movement key, I keep moving in that direction, in addition to any other movement I may be making. To stop it, I have to press and release the matching movement key again.
This was in 1.2, and seemed to have been fixed in 1.3, now it's back.
Related issues
is duplicated by
relates to
Attachments
Comments


A lot of people, me included, have been having this problem. I think it could be a problem in the LWJGL library, but I'm not sure.

i confirm this issue, which also applies to jumping. i usually handle it by pressing the "inventory" key.

> This was in 1.2, and seemed to have been fixed in 1.3, now it's back.
It was also in 1.3 for me.

Updating LWJGL doesn't make a difference for me.

I've had this problem on my ubuntu laptop before, but I had always thought it was because of performance issues.

upgrading lwjgl does not fix this issue.

I have this issue too, and it usually happens while pressing a key and clicking at the same time. I think Dinnerbone tweeted something about this, and I followed a link to update LWJGL manually, and found that I still had the problem. It happens most often in combat when you're trying to move and attack at the same time, and when keys stick, it makes it hard to impossible to fight.

I see this on Fedora 17 64-bit with Oracle JRE 1.7.0-b147 (32-bit). It caused me to fall into a lava lake in the Nether and lose all my loot. š

This stopped happening to me after I updated to lwjgl-2.8.5, but it would still be great if minecraft included the updated libraries by default.

According to the wiki (I think) it says that they can't include the updated libraries because it has some problems with Macs. Correct me if I'm wrong. The most recent time that I had this issue was with the latest stable version installed manually.

I have been having this problem on xubuntu 12.04, and it really detracts from the game. I had it previously as well. I hope a hard look at taken at this and they can squash this bug one way or another asap.

This is probably related to both MC-483 as well as MC-630. The control mapping system works in unpredictable ways and my guess (not having minecraft source code to confirm) is that there is broken keycode to charcode mapping at play; an unreliable layer of code trying to abstract something that probably shouldn't be abstracted. The result is lost key events (which are like keyUp+keyCode and keyDown+keyCode), key events handled in the wrong order or key events not handled because the handler is busy doing something else, like waiting for a chunk to load/generate or such.

OH!!! I thought this was a problem on my computer, but I guess it is a bug :/ For some dumb reason, that happens when I'm fighting multiple mobs, moving me infront of a creeper.

I tried updating LWJGL and this bug is still there. Most be some problem with Minecraft.

I updated LWJGL manually last night, and it works fine after update. Not sure why for some that clears it up but for others it does not.

Craig: Probably because the bug is unrelated to LWJGL. Just because you haven't happened to experience the bug for a while doesn't mean it's gone. As already guesstimated, the bug is probably related to CPU/GPU load as is the sibling of this event; MC-483 (keyboard events become unresponsive). Sometimes, on some machines (especially powerful enough machines) it might get temporarily fixed by a reboot or restart of minecraft, but on slower machines it happens more often because a freshly started minecraft already uses often more cpu/gpu cycles than available and prioritizes drawing or something else over handling events, which become lost and cause stickiness or entirely lost event handling.

@Juha-Jarmo Heinonen before updating the LWJGL libraries I would experience this every 10 minutes or so while doing heavy mining. After the update playing for a few hours doing nothing but mining I had no problems. This is directly related to the LWJGL libraries and nothing else it seems. Maybe why it does not work for others is they do not update the libraries properly, idk.

Craig: might still just be performance-related. LWJGL plays performance-wise a fairly central role and its optimizations affect minecraft performance. Just installing OptiFine might do the same trick, if your machine was just on the border of mostly enough performance. For others, minecraft just demand more power than the computer has, which wouldn't be an serious issue if it was just affecting drawing speed, but losing events is just unacceptable.

Minecraft.net recommends to use Oracle's java in linux. I have no such problem in Ubuntu but I do have the stuck shift key problem in Windows 7 (It was LWJGL related, don't use 2.8.5 , use 2.8.4 instead)

Previous description for your use: "I am regularly finding that even after releasing a movement key, I keep moving in that direction, in addition to any other movement I may be making. To stop it, I have to press and release the matching movement key again.
This was in 1.2, and seemed to have been fixed in 1.3, now it's back."
Hope that helps.

I am not quite sure but I think it's a problem of how much your computer can process. Whenever I press buttons too quick for the PC ā , sticky movement happens.

Restored original description.
LWJGL issue, we can't help it as we cannot update right now.

Resolving since not a Minecraft issue.

That happens to me all the time. It's especially fun when you get moved in front of a creeper and it explodes in your face, or you're really close to the edge of a cliff...:|
Not only that, but I find that sometimes the items in the inventory can't be moved freely, and instead act like you're shift-clicking. I've noticed both issues at least since 1.4's pre-release. Hopefully these issues get resolved soon. š

Still isn't resolved, I have this issue too...

Have this too, really annoying...

Have you read previous comments? Have you tried different versions of LWJGL? Try 2.8.4
Instructions: http://www.minecraftwiki.net/wiki/Tutorials/Update_LWJGL
2.8.4 http://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%202.8.4/lwjgl-2.8.4.zip/download

I have tried 2.8.4: I was still able to reproduce keys stuck down with that version.
I have tried 2.8.5: While I'm not sure I can reproduce stuck keys with this version, I can produce a much worse problem: clicking while a key is held releases that key.
I have tried 2.9.0 (a nightly build): I cannot reproduce keys stuck down, but I can reproduce keys stuck up. I don't have a concise recipe for reproducing it, but if I hold down the "left" key, and then mash some other keys while also clicking the mouse, and then release all keys except "left", I often find that my character is no longer moving to the left. Releasing and re-pressing the left key causes him to begin moving to the left again.

Move your .minecraft folder to a safe place. Run minecraft.exe for a clean install of minecraft, try to reproduce the problem with different versions of LWJGL and see what happens.

Marios: For each of those 3 versions, I completely deleted my .minecraft folder, allowed minecraft.exe to download a completely fresh copy, then I updated the LWJGL libraries.
I was able to reproduce my results. With 2.8.4 I still get keys stuck down; with 2.8.5, all keys are released when the mouse is clicked, and with 2.9.0, I can occasionally get keys stuck up.

Then I'm afraid I can't be of more help to you.

Why is this marked as āresolvedā? It certainly is not. I can still reproduce this with Minecraft 1.4.7, Java 1.7.0_10 and lwjgl 2.9.0 (nightly build). Once I press shift, the game acts as if shift is permanently held down. F11 cures it, but that's hardly a solution.
This may be relevant: Using xev I see this when pressing the left shift key:
KeyPress event, serial 41, synthetic NO, window 0x4600001,
root 0x266, subw 0x0, time 517573511, (18,-15), root:(1391,37),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
And this is the event upon release of the same key:
KeyRelease event, serial 41, synthetic NO, window 0x4600001,
root 0x266, subw 0x0, time 517573823, (18,-15), root:(1391,37),
state 0x1, keycode 50 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Note how the keysym value differs. I suspect that somewhere in LWJGL and/or Minecraft there's the assumption that releasing a key will send the same keysym as pressing it. That's why the game never sees the shift key released.

It certainly isn't resolved. It happens every time I play on my server and on single player. I agree that the issue must lie within the game's coding, and not with the users. I never use mods, always have a fresh install of the game, and have java updated regularly.

It is marked as resolved because it's a problem with LWJGL, not Minecraft. Therefore there's nothing that Mojang can do with it.

They can at least attempt to change the coding to work around the problem though. Coders do it all the time.

I think they tried it before and you couldn't move when you are clicking.

Isn't 2.8.4 working for you? It solved the problem for many people (but not for everyone, ok) including me.

Iāve been through all recent versions of lwjgl, no difference.
As for the issue being āresolvedā, I donāt agree. Minecraft is the one big game using lwjgl, and the library comes bundled with the game. So, in effect any bug in lwjgl is a bug in Minecraft and it needs to be tracked down and resolved properly for the good of both projects.

I agree with Zarquod. No version of LWJGL completely resolves this problem for me, a recent nightly snapshot is what I use, and it reduces the frequency of stuck keys, but it does not completely eliminate it.
Has anyone reported this problem to LWJGL? They have attempted to fix it. Do they even know they didn't completely fix it? It's been broken for many months. Maybe someone from Mojang will have to push the LWJGL guys to get it fixed, or go in and fix it themselves.

I agree with Zarquod also. Regardless of whether the source of the problem is within Minecraft's codebase, it's still an open issue.

I've talked with LWJGL on tweeter before, but when I mentioned about this bug (while talking about 2.8.4), they never replied. Strange.

I created a topic on their forums: http://lwjgl.org/forum/index.php/topic,4910.0.html

I can't help but feel like this is two different bugs both with similar symptoms. Updating LWJGL has always fixed the problem for me, but for others, it seems like something else is causing stuck keys?

@zol: There are actually 3 different things going on here:
#1: The version of LWJGL that is shipped with Minecraft has a big problem with keys getting stuck, they get stuck down frequently.
#2: LWJGL v2.8.4 has a different key problem. Occasionally, they get stuck UP. I'll be walking around and clicking as I play, and sometimes (pretty rarely), I'll end up holding down a key, but Minecraft is SURE that I've already released it. This is probably 10x less often than the problems in the version that is shipped with Minecraft, and it's often less catastrophic to your game if your key is stuck up, so many people might not notice this.
#3: v2.8.5 has yet-another problem: clicking the mouse releases all keys. This completely breaks many operations like shift-clicking items, and trying to attack someone while running after them.
#4: v2.9.0 (at least the nightly version from two months ago) has yet-another problem: keys can sometimes (but rarely) get stuck either up or down. I've been told that the newest nightly should be better, and I'm going to try it soon myself to see if it's really resolved.
So, to conclude: sticky movement is the bug. Every known version of LWJGL has this problem, but to different extents. That is why some people think they've fixed the problem when upgrading their LWJGL.

I just checked their latest nightly snapshot but it has nasty window focus related bugs, so I can't confirm this bug has been fixed yet.

I found out the window focus "bugs" are now "features". The nightly LWJGL load referenced in this issue report ( https://github.com/LWJGL/lwjgl/issues/1 ) seems to fix the problem for me.

this happens to me.. how is this INVALID?

Because it's a problem with LWJGL, not Minecraft.

⦠and the people over at LWJGL will tell you it's a problem with Minecraft, not LWJGL.
As I said before, it does not matter where the problem is located. As long as LWJGL comes bundled with Minecraft, it's a problem with Minecraft. Marking the issue as "resolved" (which is an outrage, really) will not make it go away.

Completely agree with Zarquod. If Mojang is going to be using LWJGL, then they need to code their game to work better with whatever issues LWJGL is having, and the same goes for LWJGL to work well with anything using their software.

LWJGL has already fixed the problem. You can install the newest version of it to fix the problem. We just need to convince Mojang to include the newest version with an update of Minecraft.

Rolf Campbell, so... if I update the LWJGL to the newest version, the problem is fixed? How can we update it? There is any tutorial? Thanks

So, the newest version of LWJGL is supposed to fix our problem? Well, today I thought I'd give it a try.
First stop, LWJGLās repository for nightly builds. Got the most recent packet, put it in place, started Minecraft ⦠got a crash. On closer inspection I found the Linux native library to be only a few hundred bytes in size. So, thatās a āsuccessful buildā?
Oh, well. I guess I can do this myself. So, I pulled the most recent version of LWJGL from GitHub and after some fiddling and installing of X header files got the whole thing to compile. In the process, I got this little tidbit:
[apply] /home/zarquod/misc/minecraft/lwjgl-git/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c: In function 'Java_org_lwjgl_opengl_LinuxKeyboard_keycodeToKeySym':
[apply] /home/zarquod/misc/minecraft/lwjgl-git/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c:81:2: warning: 'XKeycodeToKeysym' is deprecated (declared at /usr/include/X11/Xlib.h:1695) [-Wdeprecated-declarations]
Could this be related? I donāt know.
Anyway, I installed my newly compiled LWJGL, started Minecraft and ⦠no change. The Sticky Shift On Linux Bug is still there.
NOT RESOLVED

I often also get Ctrl key sticking when I switch my virtual desktops (Ctrl+Alt+Arrow). That is extremely annoying because of deleting text in the chat and dropping whole stacks of items.
Is that LWJGL problem? It seems Minecraft just doesn't care about losing focus, thus this is a bug I guess.

@Zarquod The latest stable (2.8.5), not the latest nightly build.

@GregFitzgerald. No, the v2.8.5 does not completely resolve the problem. You must use a nightly snapshot of v2.9.0.

@Zarquod: If you follow the link in my comment, you will find premade binaries with the problem fixed. These do NOT come from their normal nightly build repo.

@Greg Fitzgerald: When I wrote āIāve been through all recent versions of lwjgl, no difference.ā that included the latest stable version, of course.

@Rolf Campbell: What link are you referring to?

@Zarquod: The only link I've ever posted.

@Rolf Campbell: So, you were effectively referring to http://www.newdawnsoftware.com/jenkins/view/LWJGL-git/job/LWJGL-git/label=winxp642/ and http://www.newdawnsoftware.com/jenkins/view/LWJGL-git/job/LWJGL-git/label=apollo/ ?
Those builds donāt even contain liblwjgl.so/liblwjgl64.so. None whatsoever, not even broken ones like the recent nightly builds.
Just for clarification, Iām talking about Sticky Shift on Linux, not Sticky Movement on Windows.

@Zarquod: Oops, I assumed that the special builds I was referring to had Linux components as well. My apologies. I have no idea about Linux variants of the bug, I would suggest that you raise a bug on their GitHub issue tracker. That seems to be the only way to get their attention these days.

Confirmed with unaltered (I guess it uses the shipped version then) 1.5 and 1.5.1-pre in Linux.
$ uname -rms
Linux 3.8.3-2-ARCH x86_64
$ java -version
java version "1.7.0_17"
OpenJDK Runtime Environment (IcedTea7 2.3.8) (ArchLinux build 7.u17_2.3.8-1-x86_64)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

@ Dirk Sohler:
Mojang suggests to use Oracle's Java instead. I'm on Mint 13 x64, I uninstalled any preinstalled java and I used this method:
http://www.canato.org/2012/06/install-oracle-jdk-7-on-linux-mint-13-ubuntu-12-04/

The JRE does not make a difference for me. Iām currently using Oracleās implementation:
$ java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

Same here: No difference with Oracle Java (except the bad feeling about that Oracle package).

Well, if that's the case, then the people at LWJGL are wrong.

The Minecraft, OpenJDK, and LWJGL people have been pointing at each other as long as I've been following this issue. You'd think that Mojang would at least start shipping MC with current versions of LWJGL... but then, that would take away one of their excuses. I'm still seeing it in 1.5.1 myself.

Fun fact: When removing the shipped libraries and symlinking the libraries installed on the system (version 2.8.5) instead, it works perfectly with OpenJDK.

Looks like Iāve found ⦠well, not a solution, but a pretty good workaround for the specific flavor of this issue that I am experiencing.
Reminder: Pressing and releasing the left shift key gave me this output from xev:
KeyPress event, serial 41, synthetic NO, window 0x4800001,
root 0x266, subw 0x0, time 7862258, (20,-11), root:(1124,41),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 41, synthetic NO, window 0x4800001,
root 0x266, subw 0x0, time 7862370, (20,-11), root:(1124,41),
state 0x1, keycode 50 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
So, the KeyPress event and the KeyRelease event come with different symbolic key names. I guess thatās where Minecraft and/or LWJGL messes up, games and similar realtime applications SHOULD NOT use symbolic key names, but the raw keycodes.
Anyway, this is where we can swing our pickaxe. Looking at the output from xmodmap -pke
we find this:
keycode 50 = Shift_L Caps_Lock Shift_L Caps_Lock
keycode 62 = Shift_R Caps_Lock Shift_R Caps_Lock
As I read it, the KeyPress event occurs without any modifier, so the symbolic name is Shift_L. But releasing the key obviously happens while holding Shift (dāoh!), which is why it gets associated with Caps_Lock.
Now, this looks like it might be easy enough to fix. Just make a file modmap-fix
with this content:
keycode 50 = Shift_L Shift_L
keycode 62 = Shift_R Shift_R
Load it with xmodmap modmap-fix
and the Sticky Shift problem in Minecraft is gone.

Wait ⦠You get Shift_L on key press and Caps_Lock when releasing? Something is wrong with your setup I guess.
KeyPress event, serial 45, synthetic NO, window 0x1a00001,
root 0x1d5, subw 0x0, time 518751586, (-536,168), root:(1550,960),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 45, synthetic NO, window 0x1a00001,
root 0x1d5, subw 0x0, time 518752226, (-536,168), root:(1550,960),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
By default itās
keycode 50 = Shift_L NoSymbol Shift_L
keycode 62 = Shift_R NoSymbol Shift_R
⦠and the problem is not gone in general, because it has nothing to do with keysyms.

Thereās nothing wrong with my setup, Iām using Neo2 layout, which does not have an explicit caps lock key but uses the shift keys (pressed simultaneously) to activate caps lock.

Neo2 is weird and so not standards compliant ā¦

Why the heck was this bug closed as invalid? This is still an issue and the description and bug report itself is valid. The discussion about the weird Neo2 layout has nothing to do with that bug, that still happens all the time.

I am experiencing this issue at least once per every 2 minutes, sometimes up to 3 or 4 times in a single minute, since the latest release (1.5.2).

Use the new launcher, you'll be able to play 1.5.2 like with the old one:
http://s3.amazonaws.com/Minecraft.Download/launcher/MinecraftDev.exe

It came back in 16.1...........

Back for me too, new tickets get closed D: I have to restart my computer every time it happens but that doesnt always work

Confirmed in 1.7.4! It caused me to walk into lava in the nether and die! This has to get fixed. Why is it closed?

I understand that this problem might not even be fixable, but is this the official word? I only ask because I'm getting this problem pretty bad in 14w11b. I do agree with some of the above claiming it's probably computer performance related (keyboard events simply being prioritized below render tasks and such), so the solution is probably just to buy a fancy new computer.

Still occasionally affects Minecraft 1.8/LWJGL 2.9.1 (latest stable release since December 2013). Mostly getting this on my laptop.

confirmed for 16w02a

This isn't a minecraft bug, see @unknown's comment
[Mojang] Grum (Erik Broes) added a comment - 26/Dec/12 5:32 PM
LWJGL issue, we can't help it as we cannot update right now.

Confirmed for 1.10.2. It only recently started affecting me, and it's kind of making the game unplayable

How is this resolved?! I can replicate it in 1.8/1.10/1.11. Only in a server, works fine in single player.. And I'm running windows! I bought the game to play multiplayer and this is not letting me do it.

I'm also still having this issue. Similar to @tAb0rDa, it seems to predominantly only happen when I'm connecting to a server.

In 1.11.2? Also, it might be caused by Geforce Experience, try disabling it

Wow incredibly fast response @Urielsalis; and yes, that was actually it! I didn't even know the thing was running; it's a new laptop. ALT+Z, turn off instant replay. Fixed the issue! Turned it back on, and it was resolved.
Thanks!

It seems having any software that logs keys or detects keys in the background cause this.

I'm having an issue where the WASD movement keys become stuck released.
I can reproduce it by mashing WASD and leaving W pressed down. Occasionally I don't move forward until I release and re-press W.
I've attached a Manual Crash Log.
Please let me know if I should open a new issue.
ā System Details ā
Minecraft Version: 1.13 (Fresh Install)
Operating System: Linux (amd64) version 4.4.0-130-generic