|
1 | 1 | # KeyPilot |
2 | | -KeyPilot is a lightweight Windows automation tool that lets you bind keyboard shortcuts to clickable screen positions. Supports global hotkeys, multi-monitor setups, and profile export/import. |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + <img src="docs/logo.png" alt="KeyPilot Logo" width="128"/> |
| 5 | +</p> |
| 6 | + |
| 7 | +**Ứng dụng Windows cho phép gán phím tắt để click vào các vị trí trên màn hình.** |
| 8 | + |
| 9 | +Giúp thao tác nhanh hơn trong game, công việc và automation. |
| 10 | + |
| 11 | +## ✨ Features |
| 12 | + |
| 13 | +### Core Features (v1.0) |
| 14 | + |
| 15 | +- ⌨️ **Add key bind** - Gán phím bàn phím để click chuột |
| 16 | +- 🎯 **Capture screen coordinate** - Chọn vị trí click trực quan trên màn hình |
| 17 | +- 🌐 **Global hotkey hook** - Hoạt động toàn hệ thống, kể cả trong game |
| 18 | +- 🖱️ **Click execution** - Hỗ trợ Left Click, Right Click, Middle Click, Double Click |
| 19 | +- 💾 **Profile save** - Lưu các bind thành profile |
| 20 | +- 📤 **Profile export/import** - Xuất/nhập profile dạng JSON |
| 21 | +- 🔀 **Toggle binds ON/OFF** - Bật/tắt từng bind hoặc toàn bộ |
| 22 | +- 📌 **Tray mode** - Chạy nền qua System Tray |
| 23 | + |
| 24 | +### Quality-of-life |
| 25 | + |
| 26 | +- 📁 Multi-profile support |
| 27 | +- 🔄 Reload profiles instantly |
| 28 | +- ⚠️ Duplicate bind check |
| 29 | +- 🔒 Disable individual bind |
| 30 | + |
| 31 | +## 🚀 Quick Start |
| 32 | + |
| 33 | +### Installation |
| 34 | + |
| 35 | +#### Option 1: Installer (Recommended) |
| 36 | + |
| 37 | +1. Tải file `KeyPilot-Setup-1.0.0.exe` từ [Releases](https://github.com/Hyper-Tech-Studio/KeyPilot/releases/latest) |
| 38 | +2. Chạy installer và làm theo hướng dẫn |
| 39 | +3. Có thể chọn tạo shortcut Desktop và khởi động cùng Windows |
| 40 | + |
| 41 | +#### Option 2: Portable |
| 42 | + |
| 43 | +1. Tải file `KeyPilot-Portable-1.0.0.zip` từ [Releases](https://github.com/Hyper-Tech-Studio/KeyPilot/releases/latest) |
| 44 | +2. Giải nén vào thư mục bất kỳ |
| 45 | +3. Chạy `KeyPilot.exe` |
| 46 | + |
| 47 | +#### Option 3: Build from Source |
| 48 | + |
| 49 | +```bash |
| 50 | +git clone https://github.com/Hyper-Tech-Studio/KeyPilot.git |
| 51 | +cd KeyPilot/src/KeyPilot |
| 52 | +dotnet build --configuration Release |
| 53 | +``` |
| 54 | + |
| 55 | +### Usage |
| 56 | + |
| 57 | +1. **Mở ứng dụng** - KeyPilot sẽ hiện cửa sổ chính |
| 58 | +2. **Thêm Bind** - Click "Add Bind" |
| 59 | +3. **Chọn phím** - Nhấn phím bạn muốn gán |
| 60 | +4. **Chọn vị trí** - Click vào nút capture và chọn vị trí trên màn hình |
| 61 | +5. **Lưu** - Click "Save" |
| 62 | +6. **Thu nhỏ** - Click X để minimize to tray |
| 63 | +7. **Sử dụng** - Nhấn phím đã gán để click tự động |
| 64 | + |
| 65 | +## 📋 System Requirements |
| 66 | + |
| 67 | +- **OS**: Windows 10/11 (64-bit) |
| 68 | +- **Runtime**: Không cần cài thêm (self-contained) |
| 69 | +- **RAM**: 50 MB |
| 70 | +- **Disk**: 200 MB |
| 71 | +- **Quyền**: Không cần Administrator (trừ khi click trong ứng dụng elevated) |
| 72 | + |
| 73 | +## 🎮 Use Cases |
| 74 | + |
| 75 | +| Persona | Use Case | |
| 76 | +| ------------------------- | -------------------------------------- | |
| 77 | +| **Gamer** | Kích skill, ability, button trong game | |
| 78 | +| **Office** | Automation tác vụ đơn giản | |
| 79 | +| **Streamer** | Bấm nút trong OBS, streaming tools | |
| 80 | +| **Developer/QA** | Test UI lặp lại | |
| 81 | +| **Automation Enthusiast** | Tự động hóa workflow | |
| 82 | + |
| 83 | +## 📁 Project Structure |
| 84 | + |
| 85 | +``` |
| 86 | +KeyPilot/ |
| 87 | +├── src/ |
| 88 | +│ └── KeyPilot/ |
| 89 | +│ ├── Models/ # Data models (KeyBind, Profile, Settings) |
| 90 | +│ ├── Services/ # Core services (Keyboard, Mouse, Profile) |
| 91 | +│ ├── ViewModels/ # MVVM ViewModels |
| 92 | +│ ├── Views/ # WPF Windows and Controls |
| 93 | +│ ├── Converters/ # Value converters |
| 94 | +│ ├── Themes/ # Styles and resources |
| 95 | +│ └── Assets/ # Icons and images |
| 96 | +├── docs/ # Documentation |
| 97 | +└── README.md |
| 98 | +``` |
| 99 | + |
| 100 | +## 🔧 Configuration |
| 101 | + |
| 102 | +Profiles và settings được lưu tại: |
| 103 | + |
| 104 | +``` |
| 105 | +%APPDATA%/KeyPilot/ |
| 106 | +├── profiles.json |
| 107 | +└── settings.json |
| 108 | +``` |
| 109 | + |
| 110 | +### Export/Import Profile |
| 111 | + |
| 112 | +Profiles có thể export ra file `.json` để chia sẻ hoặc backup: |
| 113 | + |
| 114 | +```json |
| 115 | +{ |
| 116 | + "version": "1.0", |
| 117 | + "exportedAt": "2026-01-26T12:00:00", |
| 118 | + "profile": { |
| 119 | + "name": "My Profile", |
| 120 | + "binds": [ |
| 121 | + { |
| 122 | + "keyName": "F1", |
| 123 | + "keyCode": 112, |
| 124 | + "x": 500, |
| 125 | + "y": 300, |
| 126 | + "action": "LeftClick", |
| 127 | + "delayMs": 0, |
| 128 | + "isEnabled": true |
| 129 | + } |
| 130 | + ] |
| 131 | + } |
| 132 | +} |
| 133 | +``` |
| 134 | + |
| 135 | +## ⚙️ Settings |
| 136 | + |
| 137 | +| Setting | Description | |
| 138 | +| ------------------- | ---------------------------------- | |
| 139 | +| `StartMinimized` | Khởi động ẩn vào system tray | |
| 140 | +| `StartWithWindows` | Tự động chạy khi Windows khởi động | |
| 141 | +| `MinimizeToTray` | Minimize vào tray thay vì taskbar | |
| 142 | +| `ShowNotifications` | Hiện notification khi click | |
| 143 | + |
| 144 | +## 🛠️ Development |
| 145 | + |
| 146 | +### Prerequisites |
| 147 | + |
| 148 | +- .NET 8.0 SDK |
| 149 | +- Visual Studio 2022 hoặc VS Code với C# extension |
| 150 | + |
| 151 | +### Build |
| 152 | + |
| 153 | +```bash |
| 154 | +dotnet build |
| 155 | +``` |
| 156 | + |
| 157 | +### Run |
| 158 | + |
| 159 | +```bash |
| 160 | +dotnet run --project src/KeyPilot |
| 161 | +``` |
| 162 | + |
| 163 | +### Publish |
| 164 | + |
| 165 | +```bash |
| 166 | +dotnet publish -c Release -r win-x64 --self-contained true |
| 167 | +``` |
| 168 | + |
| 169 | +## 📝 Keyboard Shortcut Reference |
| 170 | + |
| 171 | +| Key | Action | |
| 172 | +| ------- | ---------------------------- | |
| 173 | +| ESC | Cancel coordinate capture | |
| 174 | +| Any key | Can be bound to click action | |
| 175 | + |
| 176 | +## ⚠️ Known Limitations |
| 177 | + |
| 178 | +- Fullscreen exclusive games có thể không hoạt động (sử dụng Borderless Windowed) |
| 179 | +- Multi-monitor: toạ độ có thể âm cho màn hình bên trái |
| 180 | +- Một số ứng dụng elevated có thể không nhận click |
| 181 | + |
| 182 | +## 📄 License |
| 183 | + |
| 184 | +MIT License - xem file [LICENSE](LICENSE) để biết thêm chi tiết. |
| 185 | + |
| 186 | +## 🤝 Contributing |
| 187 | + |
| 188 | +Contributions are welcome! Please feel free to submit a Pull Request. |
| 189 | + |
| 190 | +1. Fork the Project |
| 191 | +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) |
| 192 | +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) |
| 193 | +4. Push to the Branch (`git push origin feature/AmazingFeature`) |
| 194 | +5. Open a Pull Request |
| 195 | + |
| 196 | +--- |
| 197 | + |
| 198 | +<p align="center"> |
| 199 | + Made with ❤️ by <b>Hyper Tech Studios</b> |
| 200 | +</p> |
0 commit comments