Class KeyEvent

java.lang.Object
org.jline.terminal.KeyEvent

public class KeyEvent extends Object
Represents a keyboard event in a terminal.

The KeyEvent class encapsulates information about keyboard actions in a terminal, including the type of key pressed, any modifier keys that were held, and the raw sequence that was received from the terminal.

Key events include:

  • Character - A printable character was typed
  • Arrow - An arrow key was pressed (Up, Down, Left, Right)
  • Function - A function key was pressed (F1-F12)
  • Special - A special key was pressed (Enter, Tab, Escape, etc.)
  • Unknown - An unrecognized key sequence