isPressed abstract method
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,
]);