https://github.com/luanroger/virtual_keyboard
Simulate keystrokes with Win32 API.
https://github.com/luanroger/virtual_keyboard
Last synced: 18 days ago
JSON representation
Simulate keystrokes with Win32 API.
- Host: GitHub
- URL: https://github.com/luanroger/virtual_keyboard
- Owner: LuanRoger
- Created: 2022-07-25T21:37:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T11:19:59.000Z (over 1 year ago)
- Last Synced: 2025-03-26T06:43:30.624Z (about 1 month ago)
- Language: Dart
- Size: 9.77 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# virtual_keyboard
### Simulate keystrokes with Win32 API.## Features
- Simulate keystrokes.
- Press multiples keys with a determinated delay betwen them.
- Enable/Disable inputs from especific keyboard instance.## Dependencies
- [win32](https://pub.dev/packages/win32)
- [ffi](https://pub.dev/packages/ffi)## Example
This example writes keyboard with the 'o' being pressed for 30 milliseconds.
```dart
void main() async {
Keyboard mainKeyboard = Keyboard();
mainKeyboard.press(KeyboardKey.K);
mainKeyboard.press(KeyboardKey.E);
mainKeyboard.press(KeyboardKey.Y);
mainKeyboard.press(KeyboardKey.B);
await mainKeyboard.pressAndHold(
KeyboardKey.O, const Duration(milliseconds: 30));
mainKeyboard.press(KeyboardKey.A);
mainKeyboard.press(KeyboardKey.R);
mainKeyboard.press(KeyboardKey.D);
}
```## Documentation
Access the documentation [here](https://github.com/LuanRoger/virtual_keyboard/wiki)