Files
hpr-knowledge-base/hpr_transcripts/hpr1008.txt

108 lines
8.3 KiB
Plaintext
Raw Normal View History

Episode: 1008
Title: HPR1008: Fix the "Sticky Keys" Bug in Minecraft
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1008/hpr1008.mp3
Transcribed: 2025-10-17 17:17:56
---
Oh.
Hello, this is Windigo and this episode is about the Minecraft Sticky Keys Bugs in Linux.
Okay, so first things first. If you're not a fan of Minecraft or you do not play Minecraft
on Linux, you can probably tune this one out. This is a very specific problem that only
affects Minecraft on Linux. So to start out, I think I should describe a little bit of
what the Sticky Keys bug is in Minecraft. If you've ever encountered this bug, you probably
know exactly what I'm talking about. Whenever you attempt to do anything complicated like
fighting a monster or doing a particularly tricky stint of building, you will be pressing
a couple separate keys like Forward and Crouch and maybe clicking somewhere in there and
something terrible happens. When you let go of one of the keys, for instance, one of the
directional keys, Forward or Backwards, Minecraft doesn't register that you let go of that key.
So you will forever be going in that direction until you mash on whatever key is responsible
for that direction or that action. Since usually this occurs when something complex or dangerous
is happening, this is a very, very frustrating bug. Many, many Linux Minecraft players have
been lost to this bug, this very bug, after being thrown into pits of lava or run into the
waiting arms of a creeper or thrown off of that giant sky-level tower they were about
to build. So now that we've identified the bug and the pain and torment it can cause people
trying to play Minecraft on Linux, we should probably discuss the solution, right?
So right off the bat, I would like to thank Psychedelic Squid. He's a P-Squid on StatusNet
and in IRC and anywhere else you might encounter him really. And he was the one that
tipped me off to how to fix this bug. So all credit, all thanks, all praise, all gifts of wealth
should be directed to him. So it turns out that the bug is not inside of the Minecraft code
itself, but inside some of the libraries that Minecraft uses for things like video display,
audio display, and accepting input from keyboards and mice. These libraries are called lightweight
lava game libraries or LWJGL for short. Doesn't make it much easier to pronounce, but what are we
going to do? The fix itself really just involves replacing the older libraries that come standard
with Minecraft with a newer copy from the project's home page. Well, not necessarily their home
page. The LWJGL home page does a really good job at pointing you towards the latest
version of their drivers. However, in my experience, using the very latest version that they've
put out, the latest one as of this recording is 2.8.3 usually comes with its own issues.
For instance, the last time I tried the latest version, it whited out all of the icons in my inventory,
so I had no idea what items I was picking. One of the versions before that made it nearly impossible
to escape the inventory or crafting screens, which isn't as bad as the sticky keys bug,
but just as fatal depending on which situation you're in. So it turns out replacing these
drivers is very simple. The first thing you need to do is download a newer version of the
LWJGL drivers from the home page. I've had the most luck with version 2.8.0, and this will
all be linked in the show notes in case you don't want to scribble this down on a piece of scrap
paper. There are a couple newer versions, but those are some of the ones that I ran into
errors with. So I'll be using 2.8.0, and when you download the drivers you get a nice
tidy zip archive. And inside of that archive, inside of the main LWJGL folder,
there's four directories. There's docs which I'm assuming contain documentation,
jar, which contains Java jar files, native, which contains the specific drivers for each
platform, and res, which probably contains some other type of files. Don't really know
what are in there, but it doesn't matter, we don't need them. The two folders that were
interested in are the jar folder and the native folder. If you open up the jar folder,
there's nine of these jar files inside the jar folder of the library. And right about
now would be a great time to open up your Minecraft folder. We're going to be extracting these
into our Minecraft folder, which in Linux is dot Minecraft in your home directory. You
might have to turn on hidden files in your file browser, but somehow you need to get to this
home slash your user slash dot Minecraft, because that's where we're going to be
dropping these. So inside your dot Minecraft folder, there's a bunch of other
folders. The one we're concerned about is the bin folder. That's where we're going
to be copying all of these files. We only need three of the new LWJGL jar files
copied into our Minecraft directory. And those are jinput dot jar, LWJGL dot jar,
and LWJGL underscore util util dot jar. And again, these are all going to be in the
show notes. So if you want the short and sweet version, you can just skip straight
there. So once you have those three files selected in the newer version of LWJGL
that we downloaded, just copy right over the old ones that come with Minecraft.
Usually when you're copying over system files like this, even in Minecraft, you'd
want to make a backup copy. But since Minecraft allows you to re-download the
client at any time, I say don't worry about it. Let's live on the edge, forget about
it. So just copy those newer files right over top of the old ones. Once you've
extracted the jar files, I need you to go back into the main directory of the new
LWJGL version. And once you're in there, you'll see the native folder once again.
That's the second half of the library that we'll need to copy over.
So if you go into the native directory, you'll see four operating systems listed.
Mac OSX, Solaris, Windows, and Linux, which is the one we're looking for.
Because as far as I know, the sticky he's bug really only affects Linux.
If you hop into the Linux directory, you'll see a bunch of .so files.
And it looks like all of those are used, or at least all of them are shipped with
Minecraft. So you want to copy every single one over the ones that come with
Minecraft. If you go into the .mincraft directory, again, inside the bin directory,
there's a sub directory of that called natives. And again, this is exciting, exciting
podcasting. If you want to skip over all of these details, that's fine.
They'll all be in the show notes. But inside that native's directory,
there are all of the same .so files. And you just need to copy right over those.
And once you've done that, you should be able to boot Minecraft.
And hopefully you don't have any instance of the sticky he's bug anymore.
It should be pretty apparent if you can get into a similar situation that causes
the sticky keys bug, whether or not it's been fixed. If you do run into other bugs,
for instance, the inventory glitch, or the items glitch that I mentioned before,
try a different LWJGL version. They're very easy to download. It's pretty easy to swap
in and out. So go for it. Experiment around, see what works for you.
Hopefully, that should have you sorted out. And your Minecraft experience on Linux
should be a lot more pleasant. Well, that's all from me right now.
Keep your ears open, though, because I do have another Minecraft episode in mind
that does not include as many file paths or different file extensions.
But instead talks about different ways to play Minecraft and things from inside the game.
So until then, this is Wendigo. I'll see you later.
You have been listening to Hacker Public Radio or Hacker Public Radio.
Those are, we are a community podcast network that releases shows every weekday
Monday through Friday. Today's show, like all our shows, was contributed by a
HBR listener by yourself. If you ever consider recording a podcast,
then visit our website to find out how easy it really is. Hacker Public Radio was founded
by the Digital Dark Pound and the Infonomicom Computer Club.
HBR is funded by the binary revolution at binref.com. All binref projects are
crowd-responsive by linear pages. From shared hosting to custom private
clouds, go to lunarpages.com for all your hosting needs.
Unless otherwise stasis, today's show is released under creative comments,
attribution, share alike, free those own license.