mojira.dev
MC-22882

Ctrl + Q won't work on Mac

When I was trying to use Ctrl + Q to drop a stack of items in creative mode, it only dropped one item instead of the whole stack. I tried other stacks of items and I had the same problem. So, Ctrl + Q on a Mac won't drop a stack of items anymore in Minecraft 1.6.2 pre-release.

Related issues

Comments

darkjmknight

I second this issue and hope it's fixed soon as I use this feature all the time.
Meanwhile, MC-22622 appears to be a duplicate of this issue, altho it's description is more confusing.

Machiel van Dorst

I have the reverse of this: just pressing q drops the whole strack of items from time to time. It's usally fixed with a restart but the problem returns after a few more restarts.

OS 10.8.4 using Java 6 by Apple.

Michael Josh Villanueva

Agree. Same problem here. I'm on 1.6.2 on a Mac.

karl harding

I have both problems... sometimes it will just drop the whole stack... sometimes it will only drop one with control q.

Breon

I've experienced this, but have a workaround. It's awkward, but works.

Preconditions:

  • Have an item in your inventory; more than a few to a stack

Steps

  • User hovers mouse over item stack

  • User presses CONTROL+Q

    • One item drops

  • User presses COMMAND+Q

    • The rest of the stack drops

Expectations

  • Pressing CONTROL+Q should drop the entire stack initially

Torabi

Relates to MC-13695, specifically this comment by Grum:

"Fixed". I've hacked some rudimentary support for this into the game and tested the usual suspects of stack-splitting, single-item-dragging.
Side-effects:
1) Anything that use CTRL before now exclusively uses CMD on osx. (Meaning the default stack-drop-keybinding will quit your game ๐Ÿ˜ƒ)
2) Wonky button-states when releasing a 'fake'-rightmouse press.
Obviously bugs reported against those two issues will be pointed straight here ๐Ÿ™‚

Jesper the End

Finally, yay!

Torabi

If anybody didn't catch that... This is Working as Intended on Macs. Command+drop now drops a full stack (but also quits the game, if you leave drop set to the default of Q), so it's recommended that you change the keybind for drop to something other than Q.

Breon

I have changed my drop key to G. CMD + G die not drop a full stack.

Also, "drop stack" used to use the Control button. Control + Q would not quit the game.

Hawk J

After rebinding "Drop" to "G" it worked. Once. Then it wouldn't work anymore. After a few tries it worked again. Then, again, no more. It seemingly randomly doesn't work.

And I agree with Breon, why was this changed to Command+Drop in the first place? Ctrl+Q worked perfectly fine and everyone is used to using Ctrl now. Seems like Mojang fixed what ain't broke.

karl harding

No believe me it was broken before they changed it to Command+Q. So I think they are fixing things that need fixing.

Hawk J

Personally, Ctrl+Q worked perfectly fine, up until one of the updates.

Torabi

Ctrl+Q worked perfectly fine and everyone is used to using Ctrl now. Seems like Mojang fixed what ain't broke.

How do you explain MC-13695 and its 57 duplicates then? That's what prompted the change.

Hawk J

MC-13695 is about Ctrl+Click, not Ctrl+Q. Two different things. Anyway, when do you ever need to make a secondary click while pressing the "Drop" key? Never.

Let me reiterate that Ctrl+Q to drop stacks did work for me before. I'm not sure about Ctrl+Click because I use a mouse. (Who in their right mind plays with a trackpad?) Edit: (or a 1-button mouse)

Talven81

Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Hawk J

Yes, it's still an issue in 1.7.2. Ctrl+Q still won't drop whole stacks for me as it used to.

If I bind "drop item" to "G" and press Command+G, it works. Problem with this is that after I do it once it won't work again until I press "G" (without holding command) several times first.

I also can't use the default binding of "Q" because Command+Q is the universal OS X shortcut for quitting programs. If I could use Ctrl+Q there wouldn't be a problem as I'm already used to that shortcut from playing Minecraft since beta.

Alexander Albers

EDIT: Looked into the 1.7.4 code in class 'awe' (or GuiScreen). Seems that you splitted the method into two methods, but I think that should still work:
(last row in class (for me in jdgui)):
public static boolean p()
{
return (Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54));
}
Change 42 to 29 and 54 to 220 since these are the meta keys on mac and if you press the meta key + q minecraft closes. Please fix this bug in 1.7.5, thanks, Alex ๐Ÿ™‚

Old comment:
Solved!
The issue was that you used Keyboard.isKeyDown(219) what is the meta key and not the control key in the boolean isCtrlKeyDown(). The class name is (well for me with Minecraft MCP 1.6.4) GuiScreen.java.
The issue is in the public boolean isCtrlKeyDown()
So the boolean should actually look like this:
public static boolean isCtrlKeyDown() {
return Minecraft.isRunningOnMac ? Keyboard.isKeyDown(29)

Keyboard.isKeyDown(157) : Keyboard.isKeyDown(29)

Keyboard.isKeyDown(157);
}
(in: return Minecraft.isRunningOnMac ? Keyboard.isKeyDown(29)

Keyboard.isKeyDown(157))
Tried that out and it worked for me ๐Ÿ™‚
So it seems that there is no difference between mac and windows keyboard in lwjgl 2.9 so you could skip the if clause actually

Please fix the bug in Minecraft 1.7.3 because it really annoys a lot mac users especially when pvping.

Thanks in advance,

A happy Minecraft player and coder ๐Ÿ™‚

PS: wtf I'm only 14 and found out how to fix that bug ๐Ÿ˜›
PS2: LWJGL keys from here: http://minecraft.gamepedia.com/Key_codes

Hawk J

Yes, it is still a concern in 14w11b.

alex_dlc

I'm still having this problem in 14w20a. I accidentally closed Minecraft when I tried to drop a whole stack.

karl harding

This is a problem in snapshot 14w21b. But only in survival. It works as expected in creative.

a

Present in 1.8.7 (OS X 10.10.3 Java 8u45)
Does not work in Survival, Creative, or Adventure.

a

affects 15w31a
OS X 10.10.4 Java 8u51

Swekob

Is this still in 15w47c or later?

darkjmknight

Just tested latest snapshot 15w49a. Command-Q, of course, quits the game, but Q is definitely the most finger convenient key to press for dropping items. I changed the key to G and pressed Command-G and it dropped only one item the first time but then the whole stack on 3 additional attempts so perhaps I just fumbled the Command key the first time? This has been broken so long I've given up dropping stacks of items via the keyboard, which is really annoying... I either have to spam the Q key to drop a smaller stack, or I click the stack and drop it out the side of the inventory. Both are slower, but at least they don't quit the game or require remapping the game's default keys to function properly, which I think is the ultimate reason this is a bug. I understand the conflict between this bug and MC-13695, but perhaps you need two modifier variables, one used when clicking and one used when keyboarding? Altho then I suppose you run into Command-C/V for copy/pasting... :~\ Control C/V was fine, back in the day, but I expect you'd get some push back if you tried to change it back.

John

Confirmed for 16w39c.

bob

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

John

Confirmed for 1.11-pre1.

AceMcCrank

You have to use Command+Shift+Q while in Windowed mode, and close the system dialogue window that pops up. After that, any stack you hit 'Q' to drop will drop the full stack.
But yes, a pain, as it doesn't function as intended as with Windows.

bugmancx

Confirmed, still an issue in 17w43b on Mac.

dagwoodland

Still in 18w07c on Mac.

bugmancx

Still an issue - tested in 1.13-pre3

bugmancx

Confirmed- still an issue in 1.13-pre4

bugmancx

Confirmed in 1.13-pre6

bugmancx

Confirmed for 1.13-pre7

bugmancx

Affects 1.13

bugmancx

Affects 1.13.2-pre1

bugmancx

Affects 18w43a

bugmancx

Affects 18w43c

(Mods can you allow me to edit the "Affects version/s" field directly? I am happy to keep updating this bug with new releases.)

pokechu22

Bug is now yours to update, @unknown.

Hawk J

Same issue still in 19w03c.

RobinDinVienna

Ahm, isn't it cmd+q on mac? I have the drop key set as d and ifI press cmd+d it drops the stack... CTRL on Win = CMD on Mac.

bugmancx

cmd-q is reserved for quitting apps (like Alt-F4 in Windows.) CTRL on Windows and CMD on on a Mac are not interchangeable in the way you might be expecting.

Hawk J

Many cross-platform apps (like Blender, X11-based apps and web apps) still use Ctrl instead of Cmd. It's not ideal but Mac users are used to this (anyone who runs BootCamp or Windows VMs also knows this). Another game that I play, StarCraft II, lets you choose either Ctrl or Cmd and completely overrides Cmd+Q. (Fullscreen apps can still be quit with opt+cmd+escape.)

I would like Minecraft to take any of those approaches. Either make it an option or restore the old way of Ctrl+Q.

0.02ยข

Christopher Lewis

This is still an issue in Snapshot 20w07a

Christopher Lewis

And it was still an issue in snapshots ranging from 19w13a and beyond, counting all prereleases and official updates, patches, etc. All of 1.15, included.

pokechu22

I can't (easily) add earlier snapshots and that doesn't add too much additional information, but it affecting 1.15.2 is something I can add (and knowing that the latest stable and snapshot are affected is generally all that matters, barring the case that a previous snapshot wasn't affected)

Chris Leidich

This problem still occurs in 1.16.5

MacchuPicchu

I believe you're supposed to use Ctrl + Cmd + Q. This still triggers the quit-application key combination (so, still present in 1.19-pre2, I guess?) but if you do what I did and rebind Q to something else, you're still very much able to drop full stacks of items on macs.

mrjasonn

Still like this on 1.20.4

Deathwater

This is just how macs work; an program that uses the control key automatically uses the command key instead. so, if you want to drop a stack of items, just press Cmd + Q

Ryan Panganiban

bugmancx

(Unassigned)

Confirmed

Platform

Normal

UI

Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 13w47e, ..., 1.20.4, 24w05b, 24w14a, 1.21, 24w34a

Retrieved