mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-11-28 16:58:41 +01:00
- binary bikecontrol, application id app.bikecontrol.BikeControl - .deb: /opt/bikecontrol, launcher, icon, bikecontrol:// handler and the udev rule for /dev/uinput; AppImage for other distros - single instance, so a bikecontrol:// link reaches the running app - CI builds on Ubuntu 22.04 (x64 via Shorebird, arm64) and publishes to the version's release and the rolling linux-latest release - keypress_simulator_linux: no std::clamp (plugins build as C++14) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚀 Ship Your App Faster: Try Fastforge - The simplest way to build, package and distribute your Flutter apps.
keypress_simulator
This plugin allows Flutter desktop apps to simulate key presses.
English | 简体中文
Platform Support
| Linux | macOS | Windows |
|---|---|---|
| ➖ | ✔️ | ✔️ |
Quick Start
Installation
Add this to your package's pubspec.yaml file:
dependencies:
keypress_simulator: ^0.2.0
Usage
import 'package:keypress_simulator/keypress_simulator.dart';
// 1. Simulate pressing ⌘ + C
// 1.1 Simulate key down
await keyPressSimulator.simulateKeyDown(
PhysicalKeyboardKey.keyC,
[ModifierKey.metaModifier],
);
// 1.2 Simulate key up
await keyPressSimulator.simulateKeyUp(
PhysicalKeyboardKey.keyC,
[ModifierKey.metaModifier],
);
// 2. Simulate long pressing ⌘ + space
// 2.1. Simulate key down
await keyPressSimulator.simulateKeyDown(
PhysicalKeyboardKey.space,
[ModifierKey.metaModifier],
);
await Future.delayed(const Duration(seconds: 5));
// 2.2. Simulate key up
await keyPressSimulator.simulateKeyUp(
PhysicalKeyboardKey.space,
[ModifierKey.metaModifier],
);
Please see the example app of this plugin for a full example.
Who's using it?
- Biyi (比译) - A convenient translation and dictionary app.