isPressed abstract method

bool isPressed(
  1. int code1,
  2. [int code2,
  3. int code3,
  4. int code4,
  5. int code5,
  6. int code6]
)

Returns whether the provided key code combination is currently pressed.

A simple key code can be provided:

const enterKey = 0x0A;
if (bufferedKeys.isPressed(enterKey)) {
  print('Enter key is pressed!');
}

Or a combination of key codes can be provided:

const ctrlKey = 0x1D;
const cKey = 0x43;
if (bufferedKeys.isPressed(ctrlKey, cKey)) {
  print('Ctrl+C is pressed!');
}

Implementation

bool isPressed(
  int code1, [
  int code2,
  int code3,
  int code4,
  int code5,
  int code6,
]);