mojira.dev
MC-49755

OS X: Pressing arrow or Fn keys in sign/command block/book and quill inserts invisible characters

While typing a command into a command block, if you press either the up or down arrow key, it will insert an invisible character into the command block that can cause the command to not execute correctly.

Steps to Reproduce:
1. Place down a command block
2. Type in a command, like "/say" then type the up or down arrow, then continue with " hi"
3. Power the command block with redstone and it says unknown command because pressing the arrow key inserted a character after "say", so the command block saw "say(character here)" and didn't recognize the command. (An invisible character was inserted into the command. You can tell because if you hit backspace on it, then the cursor doesn't move.)

Or, alternatively:
1. Place a sign
2. Enter some text on the first line
3. Hit the down arrow to switch to the second line
4. Hit the up arrow to go back to the first line
5. Hit backspace, nothing happens - only when hitting backspace again or typing something before will backspace work

Also affects book and quills.

More info: https://bugs.mojang.com/browse/MC-49755?focusedCommentId=312775&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-312775

Postponed until Minecraft has updated to LWJGL 3 according to @unknown.

Linked issues

MC-44509 Mac client adds unprintable character to sign when using down arrow Resolved MC-46854 '<some number>' is not a valid number - caused by pressing Fn keys while typing command Resolved MC-50029 Command isn't working in command block Resolved MC-53890 When sign is placed playing on Mac OS X hidden character is inserted (utf8) Resolved MC-68461 OS X: Pressing the down arrow in a command block inserts an invisible character Resolved

Attachments

Comments 47

Cannot observe this behavior on the PC version, may be a Mac issue.

Confirmed for 14w10b

I confirmed this issue on Mac OS X 10.9.2 with Java 1.6/1.7 environments + Minecraft 1.7.9 vanilla. It does not happen on Windows.
The invisible characters are actually Apple's own PUA (private use area) characters representing arrow key inputs, 0xF700 to 0xF703.
More details are here: http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CORPCHAR.TXT
I suspect this is related with an issue with keyboard input handling for MacOS platforms.

37 more comments

Confirmed for 1.10.

This is always breaking my command blocks. Hit the up or down arrow by mistake and spend a few ages tracking it down.

These are all the invisible characters I've been able to enter in signs, FWIW:

U+F700 ↑
U+F701 ↓
U+F702 ←
U+F703 →
U+F704 F1
U+F705 F2
U+F706 F3
U+F707 F4
U+F708 F5
U+F709 F6
U+F70A F7
U+F70B F8
U+F70C F9
U+F70D F10
U+F70E F11
U+F70F F12
U+F710 F13
U+F711 F14
U+F712 F15
U+F713 F16
U+F714 F17
U+F715 F18
U+F716 F19
U+F728 delete
U+F729 ↖︎ (home)
U+F72B ↘︎ (end)
U+F72C ⇞ (page up)
U+F72D ⇟ (page down)
U+F739 ⌧ (clear, where num lock would be)

Confirmed in Command Block for:
Minecraft 1.10.2
OS X El Capitan 10.11.4

Can someone please check if this is still an issue in the latest snapshot 17w43b?

Fixed in 17w43b, as tested with books, signs, and command blocks.

Nicolas Chan

(Unassigned)

Confirmed

lwjgl

Minecraft 1.7.4, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, ..., Minecraft 1.10.1, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w35a, Minecraft 16w36a

Minecraft 17w43a

Retrieved