mojira.dev
MC-78394

"Use Item" not working while sneaking and "Use Item" bound to NUMPAD0

I changed my controls to a configuration more comfortable for me. My new key map is as follows:
Use Item/Place Block = NUMPAD0
Sneak = RSHIFT

With this combination I am unable to place signs on specific items (e.g. place a sign on a chest). When I hold down the "sneak" key and press the "use item" key, the chest opens instead of placing the sign on the chest. If I want to place a sign on a chest, I have to change my "Use Item" key to PAGE DOWN, then change it back to NUMPAD0 when I'm done.


Code analysis by @unknown can be found in this comment

Linked issues

Comments 12

Can not confirm. Are you sure that you are actually sneaking when you press RSHIFT?

I confirm that I am indeed sneaking when I press RSHIFT. When exploring, I press RSHIFT to sneak to the edge of blocks so as to safely look over the edge. I also can see the point of view visibly change to indicate the change in body position.

Well, I tested with the controls you specified, didn't have any problems. Don't know what's going on. By the way, I'm curious as to why you wouldn't want to use the mouse for the "Use Item" function?

Odd that you don't have the same problem. It's not a major issue; it's just a bit inconvenient when placing signs.

As for my key bindings, I use the arrow keys for walking/strafing, left mouse click for attack, and right mouse click for jump. I use the Ctrl, Shift, and Number Pad keys around the arrows for any remaining functions. I guess I have a somewhat unique configuration, but it's one I've used for every game I've played for the past 20-odd years, so at this point it's entirely habitual.

Are you experiencing MC-54194 (Multiple key not recognized on certain keyboard layouts / with certain keyboard controllers) ?

2 more comments

Apologies; I searched for similar issues, but I didn't see MC-54194. However, after reading it I don't think my issue is quite the same. I just loaded Minecraft and tried to do other things while sneaking. When I sneak (using the RSHIFT key) I can't shoot a bow, open a chest, or place a block. Basically, anything that requires the "Use Item" function.

I tried sneaking while moving simultaneously forward and sideways (effectively walking at an angle), as well as sneaking while walking forward and then jumping at the same time. Both actions are successful.

Found MC-40227 - same issue with Mouse Button 4 instead Numpad 0

MC-40227 appears to have a specific cause related to mouse button detection, so this is a separate issue. However, a little testing reveals that the cause is simple: shift + NUMPAD0 = Insert.

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta:

SHIFT
  • Pressing SHIFT: Keyboard event SHIFT

  • Releasing SHIFT: Keyboard event SHIFT

SHIFT + NUMPAD0
  • Pressing SHIFT: Keyboard event SHIFT

  • Pressing NUMPAD0:

    • Keyboard event SHIFT

    • Keyboard event NUMPAD0

  • Releasing NUMPAD0:

    • Keyboard event NUMPAD0

    • Keyboard event SHIFT

  • Releasing SHIFT: Keyboard event SHIFT

It is very likely (probably even definitely) caused by LWJGL

Even though it is a key combination this does not look correct as it implies that before pressing NUMPAD0 you pressed / released SHIFT.
The strange thing is that NUMPAD5 reacts the same way even though (as far as I know) it does not have an special combination.

Chris Getteau

(Unassigned)

Confirmed

lwjgl

Minecraft 1.8.1, Minecraft 1.8.3, Minecraft 1.8.8, Minecraft 15w35c, Minecraft 1.9, Minecraft 1.10.2, Minecraft 16w43a, Minecraft 1.12.1, Minecraft 1.12.2

Minecraft 17w43a

Retrieved