{"id":13784864,"url":"https://github.com/leanflutter/keypress_simulator","last_synced_at":"2025-05-07T13:42:19.714Z","repository":{"id":62458781,"uuid":"490312201","full_name":"leanflutter/keypress_simulator","owner":"leanflutter","description":"This plugin allows Flutter desktop apps to simulate key presses.","archived":false,"fork":false,"pushed_at":"2025-03-23T04:07:58.000Z","size":221,"stargazers_count":31,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T23:31:51.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/keypress_simulator","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leanflutter.png","metadata":{"files":{"readme":"README-ZH.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"liberapay":"lijy91"}},"created_at":"2022-05-09T14:13:36.000Z","updated_at":"2025-03-23T04:08:02.000Z","dependencies_parsed_at":"2024-01-18T18:25:36.788Z","dependency_job_id":"3e13a00e-e2ea-4894-a70e-60d3ef9b88cc","html_url":"https://github.com/leanflutter/keypress_simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanflutter%2Fkeypress_simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanflutter%2Fkeypress_simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanflutter%2Fkeypress_simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanflutter%2Fkeypress_simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanflutter","download_url":"https://codeload.github.com/leanflutter/keypress_simulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252889206,"owners_count":21820134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T19:00:53.458Z","updated_at":"2025-05-07T13:42:19.694Z","avatar_url":"https://github.com/leanflutter.png","language":"C++","readme":"\u003e **🚀 快速发布您的应用**: 试试 [Fastforge](https://fastforge.dev) - 构建、打包和分发您的 Flutter 应用最简单的方式。\n\n# keypress_simulator\n\n[![pub version][pub-image]][pub-url] [![][discord-image]][discord-url]\n\n[pub-image]: https://img.shields.io/pub/v/keypress_simulator.svg\n[pub-url]: https://pub.dev/packages/keypress_simulator\n[discord-image]: https://img.shields.io/discord/884679008049037342.svg\n[discord-url]: https://discord.gg/zPa6EZ2jqb\n\n这个插件允许 Flutter 桌面应用模拟按键操作。\n\n---\n\n[English](./README.md) | 简体中文\n\n---\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [平台支持](#%E5%B9%B3%E5%8F%B0%E6%94%AF%E6%8C%81)\n- [快速开始](#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)\n  - [安装](#%E5%AE%89%E8%A3%85)\n  - [用法](#%E7%94%A8%E6%B3%95)\n- [谁在用使用它？](#%E8%B0%81%E5%9C%A8%E7%94%A8%E4%BD%BF%E7%94%A8%E5%AE%83)\n- [许可证](#%E8%AE%B8%E5%8F%AF%E8%AF%81)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## 平台支持\n\n| Linux | macOS | Windows |\n| :---: | :---: | :-----: |\n|  ➖   |  ✔️   |   ✔️    |\n\n## 快速开始\n\n### 安装\n\n将此添加到你的软件包的 pubspec.yaml 文件：\n\n```yaml\ndependencies:\n  keypress_simulator: ^0.2.0\n```\n\n### 用法\n\n```dart\nimport 'package:keypress_simulator/keypress_simulator.dart';\n\n// 1. Simulate pressing ⌘ + C\n\n// 1.1 Simulate key down\nawait keyPressSimulator.simulateKeyDown(\n  PhysicalKeyboardKey.keyC,\n  [ModifierKey.metaModifier],\n);\n\n// 1.2 Simulate key up\nawait keyPressSimulator.simulateKeyUp(\n  PhysicalKeyboardKey.keyC,\n  [ModifierKey.metaModifier],\n);\n\n// 2. Simulate long pressing ⌘ + space\n\n// 2.1. Simulate key down\nawait keyPressSimulator.simulateKeyDown(\n  PhysicalKeyboardKey.space,\n  [ModifierKey.metaModifier],\n);\n\nawait Future.delayed(const Duration(seconds: 5));\n\n// 2.2. Simulate key up\nawait keyPressSimulator.simulateKeyUp(\n  PhysicalKeyboardKey.space,\n  [ModifierKey.metaModifier],\n);\n```\n\n\u003e 请看这个插件的示例应用，以了解完整的例子。\n\n## 谁在用使用它？\n\n- [Biyi (比译)](https://biyidev.com/) - 一个便捷的翻译和词典应用程序。\n\n## 许可证\n\n[MIT](./LICENSE)\n","funding_links":["https://liberapay.com/lijy91"],"categories":["Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanflutter%2Fkeypress_simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanflutter%2Fkeypress_simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanflutter%2Fkeypress_simulator/lists"}