Hotbar Automatic-Switching Bug

MonsterMo

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Windows 10
Terraria Version
1.4.1.1
Controls Used
Keyboard/Mouse
I've had this bug for a while now and attempted to solve it myself but alas I failed ^^.
Essentially, sometimes when I use an item (weapon, potion, summon, anything) that's in my hotbar, once I stop pressing left click the hotbar will automatically switch to whatever is in the 9th slot (see video).

I've tested this and believe alt tabbing out of Terraria to check discord or the wiki causes this problem, which is really annoying. I've made sure the shift key on my keyboard is working fine, stick keys is off, and even used a new keyboard and mouse to make sure it wasn't those that were causing the problem.
But, even after doing this the problem still persists.
Here is everything I have currently tried:
  1. Try new keyboard and mouse.
  2. Delete and re-install Terraria.
  3. Delete and re-install my keyboard and mouse drivers.
  4. Made sure Terraria's controls were set to default, and checked the default setting against the wiki to make sure they matched.
  5. Ensured no controllers were plugged in
  6. Verifying the integrity of the game files via Steam
It is worth noting that sometimes this bug will occur even once I launch Terraria, without having even alt tabbed out of it at all.
Also, I am running vanilla Terraria, no mods are installed.
The only way I know to fix this problem whenever it occurs is to restart my computer, which obviously is something I despise doing.

If anyone can help me with this, that would be much appreciated :)

Bug Showcase Video
 
Last edited:
i myself a having this issue aswell have you found a fix for it?
the only solution i found is restarting the pc fixes it but as soon as i tab out the game it starts happening again.
 
I have seen a similar report in the past - does this sound below report sound like it's applicable to you? Example steps to reproduce:
1. Place a Magic Mirror in the hotbar, e.g. 9
2. Place a pickaxe in the same column as the Magic Mirror
3. Hold down Shift for tool auto-select
4. Mouse over a block. Notice the pickaxe is selected.
5. Move the cursor to a blank space. Hotbar item #9 (the Magic Mirror) is selected
 
I posted a bug report a while back about this issue, but was talking about specifically while mining using smart cursor. Which just causes the issue excessively, but have since narrowed it down to what you're describing, i.e., selecting any item while also moving. Is very frustrating. But yeah, i've been experiencing the issue for a long time. I can't say for certain, but i'm pretty sure it was even before 1.4, although, there was a long gap that i didn't play prior to 1.4 being released, so memory isn't as definitive.

Also, I have noticed no difference of alt-tabbing vs not, but i have Terraria set in borderless window, so don't actually ever alt-tab. Instead, just open inventory and move mouse to my 2nd monitor. Tbh, considering the nature of the bug, i kind of assumed everybody would have same issue/be able to replicate. But I was unaware that some ppl were able to temporarily fix it by starting the game and not alt-tabbing.
I'm going to test this out, but am curious, for those who say alt-tabbing causes the prob; do you have Terraria set to fullscreen?
 
Last edited:
Yeah i do and i played just fine during 1.4 it only started now, althoe back then i was on a older pc so now im on a newer more power heavy rig so i cant imagine performance is the issue.
Im sorry to hear uve been having this issue since b4 1.4. You have some really good patience as ive already destroyed a keyboard from sheer frustration lol.
 
Yeah i do and i played just fine during 1.4 it only started now, althoe back then i was on a older pc so now im on a newer more power heavy rig so i cant imagine performance is the issue.
Im sorry to hear uve been having this issue since b4 1.4. You have some really good patience as ive already destroyed a keyboard from sheer frustration lol.
Yeah it is annoying but i've noticed that i play different because of it. I automatically (without deliberately thinking) stop moving, that is, let go of directional keys, when switching items in the hotbar. I've been dealing w/ it for so long that I developed a clunky habit of stopping/letting go of buttons just to change items lol. It's weird.

You aren't by chance using Razer peripherals are you? I've been using razer keyboards and mice since first time playing Terraria, but have replaced both keyboard and mouse (2 keyboards & 3 or 4 mice). I'd be pretty surprised if the hardware has anything to do with it though.
 
I posted a bug report a while back about this issue, but was talking about specifically while mining using smart cursor. Which just causes the issue excessively, but have since narrowed it down to what you're describing, i.e., selecting any item while also moving. Is very frustrating. But yeah, i've been experiencing the issue for a long time. I can't say for certain, but i'm pretty sure it was even before 1.4, although, there was a long gap that i didn't play prior to 1.4 being released, so memory isn't as definitive.

Also, I have noticed no difference of alt-tabbing vs not, but i have Terraria set in windowless border, so don't actually ever alt-tab. Instead, just open inventory and move mouse to my 2nd monitor. Tbh, considering the nature of the bug, i kind of assumed everybody would have same issue/be able to replicate. But I was unaware that some ppl were able to temporarily fix it by starting the game and not alt-tabbing.
I'm going to test this out, but am curious, for those who say alt-tabbing causes the prob; do you have Terraria set to fullscreen?

I actually set up my second monitor today, and yeah even with a second monitor, the problem still persists. Like you, I run in windowed borderless, and instead of alt tabbing I just click on second monitor.
Glad I'm not the only one who has this problem.
 
Yeah it is annoying but i've noticed that i play different because of it. I automatically (without deliberately thinking) stop moving, that is, let go of directional keys, when switching items in the hotbar. I've been dealing w/ it for so long that I developed a clunky habit of stopping/letting go of buttons just to change items lol. It's weird.

You aren't by chance using Razer peripherals are you? I've been using razer keyboards and mice since first time playing Terraria, but have replaced both keyboard and mouse (2 keyboards & 3 or 4 mice). I'd be pretty surprised if the hardware has anything to do with it though.

I highly doubt it's to do with hardware, because the keyboard and mouse I'm using now I plugged into my desktop pc at home. And running Terraria was fine - no problems.
I'm fairly certain it can't be to do with pc specs either, because I'm using a gaming laptop which is able to run The Witcher 3 at 1080, 60 perfectly fine.
 
I'm fairly certain it can't be to do with pc specs either, because I'm using a gaming laptop which is able to run The Witcher 3 at 1080, 60 perfectly fine.
Yeah this doesn't sound like a problem that could ever be affected by performance. Nonetheless, my machine is also is way more than Terraria will ever need.
I highly doubt it's to do with hardware, because the keyboard and mouse I'm using now I plugged into my desktop pc at home. And running Terraria was fine - no problems.
Are you saying that on your desktop pc, you don't have the bug at all? No issues with the game switching the selected hotbar item, regardless if you've alt-tabbed or whatever? Or perhaps you were just saying there were no performance problems?
 
Are you saying that on your desktop pc, you don't have the bug at all? No issues with the game switching the selected hotbar item, regardless if you've alt-tabbed or whatever? Or perhaps you were just saying there were no performance problems?

Yeah exactly, on my desktop pc I don't have this issue at all.
Thing is, that raises the question: what the bloody hell is causing the bug on my laptop?
 
Yeah exactly. Was hoping that wasn't what you were saying. I can see it being tossed aside as "a problem with our computers" or something. Well, before seeing this thread that you started, I sort of accepted that it was never going to be fixed, but maybe if someone knowledgeable has any ideas on what to do to isolate what is causing the problem, let us know?
 
Its fairly unclear what is causing this issue, it may be a situation that is similar to some other issues that have cropped up lately, specifically that your device (probably a program or peripheral) are creating a stray input that Terraria is picking up.

This issue has taken MANY forms, but what it basically boils down to is that somewhere in your computer's system, something is sending a constant input which your computer normally recognizes and ignores properly, so you never notice it. Sometimes this has been found to be Streaming apps, sometimes its been special input overlays, sometimes it has been peripherals with unique inputs.

But because its sending an "input" and Terraria doesn't know to discard said input, it has an impact. Sometimes this takes the form of UI issues, but its also caused an issue where people couldn't walk at all because it was locking out "legitimate" inputs from even moving the character. Its a really tricky situation because there is no way for us to track down what is causing these inputs. Even adding a debug keylogger only showed something like a vague "None" key being pressed ("None" being any unusual key input that Terraria doesn't recognize). And since it can come from a variety of sources, there's virtually nothing we can do to specifically find the source.

Yorai indicates that it might be worth trying to rebind/reset the keybinding on the Auto Select option in your Control settings, to see if it has any impact on the issue.
 
Its fairly unclear what is causing this issue, it may be a situation that is similar to some other issues that have cropped up lately, specifically that your device (probably a program or peripheral) are creating a stray input that Terraria is picking up.

This issue has taken MANY forms, but what it basically boils down to is that somewhere in your computer's system, something is sending a constant input which your computer normally recognizes and ignores properly, so you never notice it. Sometimes this has been found to be Streaming apps, sometimes its been special input overlays, sometimes it has been peripherals with unique inputs.

But because its sending an "input" and Terraria doesn't know to discard said input, it has an impact. Sometimes this takes the form of UI issues, but its also caused an issue where people couldn't walk at all because it was locking out "legitimate" inputs from even moving the character. Its a really tricky situation because there is no way for us to track down what is causing these inputs. Even adding a debug keylogger only showed something like a vague "None" key being pressed ("None" being any unusual key input that Terraria doesn't recognize). And since it can come from a variety of sources, there's virtually nothing we can do to specifically find the source.

Yorai indicates that it might be worth trying to rebind/reset the keybinding on the Auto Select option in your Control settings, to see if it has any impact on the issue.

In that case, I'll try and disable as many inputs as I can via Device Manager (without obviously rendering my laptop unusable lol), and see if that fixes anything, I'll also try rebinding the Auto-Select option and will let you know if this fixes anything.
Thanks for the suggestion <3
 
Its fairly unclear what is causing this issue, it may be a situation that is similar to some other issues that have cropped up lately, specifically that your device (probably a program or peripheral) are creating a stray input that Terraria is picking up.

This issue has taken MANY forms, but what it basically boils down to is that somewhere in your computer's system, something is sending a constant input which your computer normally recognizes and ignores properly, so you never notice it. Sometimes this has been found to be Streaming apps, sometimes its been special input overlays, sometimes it has been peripherals with unique inputs.

But because its sending an "input" and Terraria doesn't know to discard said input, it has an impact. Sometimes this takes the form of UI issues, but its also caused an issue where people couldn't walk at all because it was locking out "legitimate" inputs from even moving the character. Its a really tricky situation because there is no way for us to track down what is causing these inputs. Even adding a debug keylogger only showed something like a vague "None" key being pressed ("None" being any unusual key input that Terraria doesn't recognize). And since it can come from a variety of sources, there's virtually nothing we can do to specifically find the source.

Yorai indicates that it might be worth trying to rebind/reset the keybinding on the Auto Select option in your Control settings, to see if it has any impact on the issue.

In that case, I'll try and disable as many inputs as I can via Device Manager (without obviously rendering my laptop unusable lol), and see if that fixes anything, I'll also try rebinding the Auto-Select option and will let you know if this fixes anything.
Thanks for the suggestion <3

Okay, so I've tried both disabling as many drivers as possible and re-binding auto-select but none solved the issue.
There is obviously another possible solution which would be completely re-installing Windows 10, which would clean up the entire system. However, that is a last resort.

Are there any other possible things you could suggest?
 
Okay, so I've tried both disabling as many drivers as possible and re-binding auto-select but none solved the issue.
There is obviously another possible solution which would be completely re-installing Windows 10, which would clean up the entire system. However, that is a last resort.

Are there any other possible things you could suggest?
Just want to point out that the last time I played, I wasn't having the bug. I got so used to not switching items while moving that I may not have had the bug at times but just assumed I did. I'll continue to deliberately test it and let you know if I figure out what causes it for me.

Something that keeps coming to mind as a possible cause is having my phone connected to my PC via WiFi to use the phone as a remote and via Bluetooth (for no particular reason), which i disconnected a while back.
 
Just want to point out that the last time I played, I wasn't having the bug. I got so used to not switching items while moving that I may not have had the bug at times but just assumed I did. I'll continue to deliberately test it and let you know if I figure out what causes it for me.

Something that keeps coming to mind as a possible cause is having my phone connected to my PC via WiFi to use the phone as a remote and via Bluetooth (for no particular reason), which i disconnected a while back.

Been a while mate.
I just thought of something that could be causing the issue.
I've just updated my BIOS for my laptop to see if that fixes anything, also I'm gonna try re-install my video card drivers.

I'll let you know if either of these work
 
Its fairly unclear what is causing this issue, it may be a situation that is similar to some other issues that have cropped up lately, specifically that your device (probably a program or peripheral) are creating a stray input that Terraria is picking up.

This issue has taken MANY forms, but what it basically boils down to is that somewhere in your computer's system, something is sending a constant input which your computer normally recognizes and ignores properly, so you never notice it. Sometimes this has been found to be Streaming apps, sometimes its been special input overlays, sometimes it has been peripherals with unique inputs.

But because its sending an "input" and Terraria doesn't know to discard said input, it has an impact. Sometimes this takes the form of UI issues, but its also caused an issue where people couldn't walk at all because it was locking out "legitimate" inputs from even moving the character. Its a really tricky situation because there is no way for us to track down what is causing these inputs. Even adding a debug keylogger only showed something like a vague "None" key being pressed ("None" being any unusual key input that Terraria doesn't recognize). And since it can come from a variety of sources, there's virtually nothing we can do to specifically find the source.

Yorai indicates that it might be worth trying to rebind/reset the keybinding on the Auto Select option in your Control settings, to see if it has any impact on the issue.

Back when I used to play a lot of world of warcraft, I used to use the wow wiki a lot and that required tabbing out. World of warcraft would always hold, as you said an endless stream of whatever last few keys I had inputted. My theory is that you should input the input for the slot of the hot bar that it continuously swaps to. Say it is slot 7 and you input slot 7. Sometimes this leads to it auto switching to another slot so then I input that slot to. I have done a small amount of testing on my theory, and while I know it works for me I cannot confirm it works for everyone. I can only grasp at straws as to why, but I have also be able to replicate this issue with movement and grappling as well. All with the same fix. I am wondering how this works for other people. And merry Christmas--Happy Holidays to all of those reading this at the time of posting.
 
bump I have this exact same glitch, I try to fix it by removing the hardware and restarting the pc, but it comes back after a few minutes or a few hours. Please help!
 
Back
Top Bottom