isLogicalKeyPressed method
Returns true if the given LogicalKeyboardKey is pressed, according to the HardwareKeyboard.
Implementation
@override
bool isLogicalKeyPressed(LogicalKeyboardKey key) {
return switch (key) {
LogicalKeyboardKey.shift || LogicalKeyboardKey.shiftLeft || LogicalKeyboardKey.shiftRight => isShiftPressed,
LogicalKeyboardKey.alt || LogicalKeyboardKey.altLeft || LogicalKeyboardKey.altRight => isAltPressed,
LogicalKeyboardKey.control ||
LogicalKeyboardKey.controlLeft ||
LogicalKeyboardKey.controlRight =>
isControlPressed,
LogicalKeyboardKey.meta || LogicalKeyboardKey.metaLeft || LogicalKeyboardKey.metaRight => isMetaPressed,
_ => super.isLogicalKeyPressed(key)
};
}