isKeyPressed method

  1. @Deprecated('Use HardwareKeyboard.instance.isLogicalKeyPressed instead. ' 'This feature was deprecated after v3.18.0-2.0.pre.')
bool isKeyPressed(
  1. LogicalKeyboardKey key
)

Returns true if the given LogicalKeyboardKey is pressed.

This method is deprecated and will be removed. Use HardwareKeyboard.isLogicalKeyPressed instead.

Implementation

@Deprecated(
  'Use HardwareKeyboard.instance.isLogicalKeyPressed instead. '
  'This feature was deprecated after v3.18.0-2.0.pre.',
)
bool isKeyPressed(LogicalKeyboardKey key) => RawKeyboard.instance.keysPressed.contains(key);