mojira.dev
MC-68399

Pressing the '<' key takes screenshot on certain keyboard layouts

Reproduce:
1) Place a sign
2) Press the '<' key

This might happen only using "Spanish - International" on windows key distribution.

See screnshots:

Linked issues

MC-68522 Taking Screenshot when pressing < (German Layout) MC-68648 Game takes screenshot when pressing '<' MC-68757 On a Swedish keyboard the '<' button beside left shift takes screencpas. MC-69054 Write "<" on Singn make a Screenschoot MC-69115 Pressing < does the same thing as pressing f2 MC-69314 Unintentional screenshots MC-69537 Pressing < makes screenshots (even when set to F2) - German keyboard MC-69574 [Hungarian keyboard] Alt+í takes a screenshot MC-70193 Pressing "<" do screenshot MC-70527 < button makes screenshots MC-71106 The "<" on french keyboard make a screenshot! MC-73047 Bug whit < or > button MC-73106 < control makes a screenshot MC-73283 [<] = F2 ? MC-75241 Screenshot bug MC-75272 Screenshot bug MC-77469 keys on AZERTY keyboards do screenshots MC-77759 The game takes a screenshot when pressing the "<|>" key MC-80267 Press "<" make screenshot MC-80444 Issue with a "special" key taking screenshots when pressed MC-82664 Special nordic keyboard button takes screenshot MC-84882 The key " <>" allows to make screenshots MC-85250 Screenshot with taste "F2" AND "<" MC-91435 the key "<" take a screenshot MC-92265 taking screenshot when not needed MC-92533 Random Screenshots in Windoes 10 MC-97955 Pressing "<" key takes screenshots.

Attachments

Comments

galaxy_2alex

Confirmed

mlakuss

Single player too

Berni U

Not only while writing a sign, for me it happens every time I press the key.

galaxy_2alex

Potentially a LWJGL issue.

Rebecca König

Happens to me on a Ubuntu 14.04 and German keyboard layout as well.

DarkPhantom

It happens to me too. In Windows XP SP3, keyboard layout "International Spanish"

Rebecca König

Still happening in pre-release 3.

Marvin

Also happens by using German keyboard layout, not just with the spanish one.

Marcos Silva

Also happens using Portuguese (portugal) keyboard layout

Rebecca König

Confirmed for Minecraft 1.8.

violine1101

It also happens outside of the Sign interface, but it doesn't happen if 'F2' isn't set as screenshot key.
(German keyboard layout, Windows 8.1, Minecraft 1.8)

Can someone update the description please?

EDIT: When changing to English (US) keyboard layout, MC doesn't take a screenshot when typing '<'. When changing to French (FR) or back to German (DE), it takes one.

2ND EDIT: Affected keyboard layouts are:
Belgian (BE), Catalan (ES), Croatian (HR), Danish (DA), Estonian (EE), Finnish (FI), French (FR), German (DE), Hungarian (HU), Icelandic (IS), Italian (IT), Luxembourgish (LU), Norwegian (NO), Portuguese (PT) and Spanish (ES)
And some more I didn't try, I guess.

3RD EDIT: It doesn't take a screenshot if 'Shift' or 'Control' ('AltGr' too) are pressed.

LazyMasterGamer

Does the same with Belgian layout 🙂 (Win 8.1, MC1.8)
The "<" key is just next to my "Q" key which is the AZERTY equivalent of the "A" key on QWERTY, I'm taking 20 screenshot per day xD

Philippe Miguet

I've got a British keyboard, set to German. Same issue.

marcono1234

@Philippe Miguet:
But not when set to the default settings or?

Philippe Miguet

Depends what you understand under default settings. The only thing I changed in Minecraft is the video settings (highest) and sound settings (mute music) and start chat with ENTER rather than T. However I did a setting reset... same issue. So technically... my MC setup is (almost) default. 🙂

Ah, and I forgot: I installed MC on my laptop when going on holiday, German keyboard, German setting... same issue with a virgin install.

Hun_Norberto

It also affects Hungarian (HU) layout.

Rickard Åberg

Same with Swedish QWERTY layout in Windows 8.1.

Very very annoying as I often by mistake press that key.

metarmask

Maybe add all keyboards to the description/environment for easier access? @Alejandro Bentivengo

violine1101

@metarmask - I already wrote all keyboard layouts I found out that they are affected into the comments. Read the older comments to see them.

pablete1234

fix this please, it's really annoying to make screenshots every thime you try to make a arrow (<<<<----->>>>) or whatever

Stefan Bornewasser

Affected Versions
1.8.1pre 4
1.8.1pre 3

Please fix it it's really annoying to make screenshots every thime you try to make a arrow (<<<<----->>>>) or whatever

Stefan Bornewasser

Updated Affected Versions
1.8.1 pre 5

violine1101

Confirmed for 1.8.1.
Reminder: I also wrote some more details into the comments. Read the older comments to see them.
Hint: Change your screenshot key if you want to bypass this bug.

pablete1234

Really annoying bug, really easy to fix, please MC developers fix this

Joel Puig Rubio

This so annoying x_x
Please fix it.

Pieter Van Meerbeeck

This affect every 1.8 version

Lucas Ignacio Morrison Osorio

It once happened to me in a laptop. Not in the desktop PC I usually use though.

Oskar Edholm

Can confirm for Minecraft 1.8.2-pre1.

user-fddbf

confirm

Brandcraft06

Confirm for 1.8.2-pre 6 please fix it !

Plancke

Confirm: laptop AZERTY keyboard, BE layout, 1.8+

Martin

Happening to me on Windows 8.1. System language is English, keyboard layout is German. Very annoying. Workaround:

Binding the key to something else and saving the layout works. Unfortunately it just seems to be temporary as I'm taking screenshots again and it worked yesterday. You can rebind it again though.

violine1101

Reminder to avoid further comment duplicates: I wrote some more details into the comments. Read the older comments to see them.

Martin

My comment was not a duplicate as:

  • my system language is English and yours is probably German.

  • for me rebinding only works temporary and for you it seems to be a permanent workaround

In my opinion this makes it additional information and not a duplicated comment.

Another thing I just noticed is that it seems to be happening on greater than, not on less than. So Shift + < is taking screenshots for me. It does not matter if it is the left or the right Shift key though.

violine1101

I didn't specificly name your comment as duplicate and it's not really constructive to discuss about comment duplicates.
Also, I don't think that the system language has something to do with the system language, it's definitely an inputting issue.
The workaround only works temporary, you say? Maybe you're switching versions sometimes because when you switch to a version below 1.7, some controls get resetted, including the control to take a screenshot.

However, the issue description is very insufficient and it would be great if a mod would update the description or at least add a disclaimer because this issue has many duplicates and it is - at least in my opinion - important to fix.

Also confirmed for Minecraft 1.8.3.

Erik Faxén

I got this problem too on my keyboard with Swedish standard.
When writing < on a signpost or in the chat board my game takes a screenshot. It's really annoying.
However, when making a > sign (e.i. shift + <) does not make a screenshot for me. Only the < sign.
And this doesn't respond to the keyboard settings menu were it's still only set to take screenshot with standard F2.
I play version 1.8.3.

I hope this get fixet soon. < and > is kind of the most used letters on signpost in minecraft when making arrows. 🙂
---->

Matti Ruohonen

From my understanding, this bug occurs due to the following change in the client Minecraft class:

In 1.7.10 the keyboard input is read like so (using MCP names):
public void func_152348_aa()
{
int i = Keyboard.getEventKey();
...
}

Whereas in 1.8 it is read like:
public void dispatchKeypresses()
{
int i = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() : Keyboard.getEventKey();
...
}

This means that if the result from getEventKey() is 0, then the result from getEventCharacter() is used instead.
From a simple debug print (using a FI (= SWE?) keyboard/layout):

When pressing (and releasing) F2:
[06:12:57] [Client thread/INFO] [STDOUT]: eventCharacter: eventKey: 60 state: true
[06:12:57] [Client thread/INFO] [STDOUT]: eventCharacter: eventKey: 60 state: false

When pressing (and releasing) '<':
[06:13:19] [Client thread/INFO] [STDOUT]: eventCharacter: < eventKey: 0 state: true
[06:13:19] [Client thread/INFO] [STDOUT]: eventCharacter: eventKey: 0 state: false

So this means that when a user is pressing '<', the value of getEventKey() is zero, so the result of getEventCharacter() is used instead.
Now if you look at the ASCII table (for example at http://www.asciitable.com), you can see that the ASCII code for '<' is 60, which is the getEventKey() value for F2.
There may also be other collisions, where a "missing" getEventKey() value results in using the getEventCharacter() value of another key.

So the problem here is that the getEventKey() and getEventCharacter() values are not aligned, they should not be used in the same context like this.

Dobypeti

Can confirm on a HU/Hungarian keyboard...

Reds Bone

Confirmed on Slovenian keyboard. A screenshot is taken with < not only when typing it in chat and signs, but also when no GUI is open and even when the game is paused (ESC).

marcono1234

@unknown's explanation makes sense, but I cannot confirm it for other keys (1.8.4)

See also http://minecraft.gamepedia.com/Key_codes

Relates to:

Jonathan Gutiérrez

Confirmed using Spanish-LatAm keyboard on 1.8.4.
Edit: Also happening in 1.8.6

MiningCreeper

Confirmed using German keyboard on 1.8.7

Dobypeti

Also confirmed on 1.8.7 using Hungarian (HU) keyboard.

Realised that only 'AltGr + í ' takes a screenshot.
(Pressing 'AltGr + M' does not takes a screenshot)

Wululululu

Confirmed for 1.8.8 and 15w31a, German Keyboard on Windows 7
Edit: and 15w31b

Joel Puig Rubio

They should try to fix this in tomorrow's snapshot, this bug is really annoying.

Pyry-Pekka Ronkainen

Confirmed with Finnish layout/keyboard.

So annoying.

ZockerAxel

Still in 15w31c on German Keyboard

Wululululu

Another week, another version it's in.
This time 15w32a on Windows 10 though,
Edit2: and 15w32b
Edit3: and 15w32c
Edit1: I just checked again. 1.7.10 was the last full release that didn't contain this bug and 1.8 was the first that did.

ZockerAxel

Fixed in 15w34a (at least on German Keyboards)

kumasasa

@@unknown: No, this was fixed in 15w33c - see the top of this ticket.

Dobypeti

Fixed on Hungarian keyboard, too. (Tested in 15w34a though)

Manel Almeida

NOT resolved... 1.8.9 portuguese layout still taking screenshots...

violine1101

It will be resolved in 1.9 (in fact, it is already in the 1.9 development versions). The only change in 1.8.9 was the Realms integration, so in 1.8.9 there were no bug fixes. There is no reason to reopen this issue since it is already fixed.

Martin Salthe

Still getting error, I using a Nordic layout

Dlawso the Really Lucky Rabbit

Martin, is this only on 1.8.9?

Tjo

So basically:

To quick fix this, A: Use English keyboard setting.
To quick fix this, B: Switch the f2 button.

To fix it permanently in 1.8.9:

 Find the faulty file

  1. In your Minecraft folder, you will find the folder "versions"

  2. Go to "1.8.9".

  3. Open the "1.8.9.jar" with WinRAR (or whatever)

  4. And extract the "ave.class"

Patch the faulty file

  1. Download reJ: https://sourceforge.net/projects/rejava/

  2. In reJ: Open the "ave" class you have extracted.

  3. Find (ctrl+f): "public void Z()"

  4. You will see this somewhere at the start of that text:

    invokestatic int Keyboard.getEventKey()
    ifne label_12
    invokestatic char Keyboard.getEventCharacter()
    goto label_15
  1. Remove those 4 lines.

  2. Save. Now you got a patched "ave.class" file.

 Replace faulty with the patched file

  1. Open the "1.8.9.jar" with WinRAR (or whatever)

  2. Put the patched "ave.class" file into WinRAR to replace it.

  3. Delete META-INF folder.

  4. I use this json to accompany the jar: https://pastebin.com/GX7P95c1

  5. DONE. Start Minecraft.

Alejandro Bentivengo

(Unassigned)

Confirmed

Minecraft 14w34c, Minecraft 14w34d, Minecraft 1.8-pre1, Minecraft 1.8-pre2, Minecraft 1.8-pre3, ..., Minecraft 15w31c, Minecraft 15w32a, Minecraft 15w32b, Minecraft 15w32c, Minecraft 1.8.9

Minecraft 15w33c

Retrieved