Raven B4
  • Main Page
  • Guide
    • Setup
    • Examples
  • Documentation
    • imports
    • events
    • client
    • entity
    • network
    • world
    • render
    • gl
    • modules
    • config
    • keybinds
    • inventory
    • tile entity
    • util
    • bridge
    • http
    • json
    • packets
    • objects
Powered by GitBook
On this page
  • getKeycode
  • getKeyIndex
  • getMousePosition
  • isKeyDown
  • isMouseDown
  • isPressed
  • leftClick
  • rightClick
  • setPressed
  1. Documentation

keybinds

Last updated 4 months ago

Minecraft Keycodes:

getKeycode

int code = keybinds.getKeycode(String key);

Returns the keycode for a specified minecraft keybind.

getKeyIndex

int code = keybinds.getKeyIndex(String key);

Returns the keycode for a specified key.

getMousePosition

int[] position = keybinds.getMousePosition();

Returns the position of the cursor as an array [x, y].

isKeyDown

boolean keyDown = keybinds.isKeyDown(int key);

Returns true if the specified key is being pressed.

isMouseDown

boolean mouseDown = keybinds.isMouseDown(int mouseButton);

Returns true if the specified mouse button is currently pressed. Use 0 for left click, 1 for right click, and 2 for middle click.

isPressed

boolean isPressed = keybinds.isPressed(String key);

Returns true if the specified keybind is being pressed.

leftClick

keybinds.leftClick();

Simulates a left click on the mouse.

rightClick

keybinds.rightClick();

Simulates a right click on the mouse.

setPressed

keybinds.setPressed(String key, boolean pressed);

Sets the pressed state of a specified keybind. Taken from %appdata%/.minecraft/options.txt.

https://minecraft.fandom.com/wiki/Key_codes