ctrlJ method

LegacyKeyEncoding ctrlJ(
  1. bool v
)

Toggles Ctrl+J mapping (newline/enter) when v is true.

When false (default), LF (0x0A) is reported as Enter. When true, LF is reported as Ctrl+J.

Implementation

LegacyKeyEncoding ctrlJ(bool v) =>
    LegacyKeyEncoding(v ? (bits | _flagCtrlJ) : (bits & ~_flagCtrlJ));