isDown static method

bool isDown(
  1. GKey key
)

Returns true if the specified GKey instance is currently pressed.

This method checks both regular keys and meta keys.

Implementation

static bool isDown(GKey key) {
  if (_metaKeys.containsKey(key)) {
    return _metaKeys[key]!();
  }
  return _pressed[key] ?? false;
}