KeyEvent .java

net.minecraft.client.input.KeyEvent (record): members: key, keycode, modifiers, shortcutKey, Action, input. imports: InputConstants, EnvType, Environment.

net.minecraft.client.inputrecord29 linesclient744 B

Implements

API Surface (2)

int input()
int shortcutKey()

Code Graph: Dependencies (2)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

KeyEvent.java29 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.input;
2
3
import com.mojang.blaze3d.platform.InputConstants;
4
import java.lang.annotation.ElementType;
5
import java.lang.annotation.Retention;
6
import java.lang.annotation.RetentionPolicy;
7
import java.lang.annotation.Target;
8
import net.fabricmc.api.EnvType;
9
import net.fabricmc.api.Environment;
10
11
@Environment(EnvType.CLIENT)
12
public record KeyEvent(@InputConstants.Value int key, int keycode, @InputWithModifiers.Modifiers int modifiers) implements InputWithModifiers {
13
	@Override
14
	public int input() {
15
		return this.key;
16
	}
17
18
	@Override
19
	public int shortcutKey() {
20
		return this.keycode;
21
	}
22
23
	@Retention(RetentionPolicy.CLASS)
24
	@Target(ElementType.TYPE_USE)
25
	@Environment(EnvType.CLIENT)
26
	public @interface Action {
27
	}
28
}
29

Decompiled Minecraft 26.3 source of KeyEvent (net/minecraft/client/input/KeyEvent.java) with Mojang official mappings, stored verbatim on the site.