TerminalModifiers

Bit mask vocabulary for UI keyboard modifiers accepted by terminal input.

These are internal encoder bits, not CSI modifier parameter values. CSI encoding applies the 1 + modifiers translation only at the wire boundary.

Properties

Link copied to clipboard
const val ALT: Int

Alt is active.

Link copied to clipboard
const val CTRL: Int

Control is active.

Link copied to clipboard
const val META: Int

Meta or command is active.

Link copied to clipboard
const val NONE: Int = 0

No keyboard modifiers are active.

Link copied to clipboard
const val SHIFT: Int

Shift is active.

Link copied to clipboard
const val VALID_MASK: Int

Mask containing every supported modifier bit.

Functions

Link copied to clipboard
fun hasAlt(modifiers: Int): Boolean

Returns true when Alt is present in modifiers.

Link copied to clipboard
fun hasCtrl(modifiers: Int): Boolean

Returns true when Control is present in modifiers.

Link copied to clipboard
fun hasMeta(modifiers: Int): Boolean

Returns true when Meta is present in modifiers.

Link copied to clipboard
fun hasShift(modifiers: Int): Boolean

Returns true when Shift is present in modifiers.

Link copied to clipboard
fun isValid(modifiers: Int): Boolean

Returns true when modifiers contains only supported modifier bits.

Link copied to clipboard
fun toCsiModifierParam(modifiers: Int): Int

Converts internal modifier bits to an xterm-style CSI modifier parameter.