sendKeyUpEvent method
- LogicalKeyboardKey key, {
- String? platform,
- PhysicalKeyboardKey? physicalKey,
Simulates sending a physical key up event through the system channel.
This only simulates key up events coming from a physical keyboard, not from a soft keyboard.
Specify platform
as one of the platforms allowed in
Platform.operatingSystem to make the event appear to be from
that type of system. If not specified, defaults to "web" on web, and the
operating system name based on defaultTargetPlatform everywhere else.
Specify the physicalKey
for the event to override what is included in
the simulated event. If not specified, it uses a default from the US
keyboard layout for the corresponding logical key
.
Returns true if the key event was handled by the framework.
See also:
- sendKeyDownEvent and sendKeyRepeatEvent to simulate the corresponding key down and repeat event.
- sendKeyEvent to simulate both the key up and key down in the same call.
Implementation
Future<bool> sendKeyUpEvent(
LogicalKeyboardKey key, {
String? platform,
PhysicalKeyboardKey? physicalKey
}) async {
// Internally wrapped in async guard.
return simulateKeyUpEvent(key, platform: platform, physicalKey: physicalKey);
}