[][src]Constant rubidium::KEYINPUT

pub const KEYINPUT: ReadOnlyVolAddr<LowActiveKeys>;

The register that lets you read the current state of all the keys.

The convention for this data is "low active", where (for each bit) 0 means pressed and 1 means released. You probably want to convert data read from here to a "high active" convention (where 1 = pressed) before using it. See LowActiveKeys and HighActiveKeys.

This responds instantly to key changes, so for a consistent user experience you should generally read this register once per frame and then process the entire frame using that one read. This helps prevent any minor tremors in the button signal from creating inconsistent game input.