Skip to content

Commit 5569029

Browse files
committed
feat: add app
1 parent baf44f2 commit 5569029

29 files changed

+3094
-1
lines changed

.gitignore

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Build results
2+
[Bb]in/
3+
[Oo]bj/
4+
[Dd]ebug/
5+
[Rr]elease/
6+
x64/
7+
x86/
8+
installer/
9+
10+
# Visual Studio
11+
.vs/
12+
.vscode/
13+
.config/
14+
*.user
15+
*.suo
16+
*.userosscache
17+
*.sln.docstates
18+
*.userprefs
19+
20+
# Rider
21+
.idea/
22+
23+
# VS Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
30+
# NuGet
31+
*.nupkg
32+
*.snupkg
33+
.nuget/
34+
packages/
35+
36+
# Windows
37+
Thumbs.db
38+
ehthumbs.db
39+
Desktop.ini
40+
$RECYCLE.BIN/
41+
42+
# Mac
43+
.DS_Store
44+
.AppleDouble
45+
.LSOverride
46+
47+
# User-specific files
48+
*.rsuser
49+
*.suo
50+
*.user
51+
*.userosscache
52+
*.sln.docstates
53+
54+
# Test results
55+
[Tt]est[Rr]esult*/
56+
[Bb]uild[Ll]og.*
57+
*.VisualState.xml
58+
TestResult.xml
59+
60+
# Publish output
61+
publish/
62+
out/
63+
64+
# Coverage
65+
coverage/
66+
*.coverage
67+
*.coveragexml
68+
69+
# Logs
70+
logs/
71+
*.log
72+
73+
# Temp
74+
*.tmp
75+
*.temp
76+
~$*
77+
78+
# Application data (for development)
79+
# Uncomment if you want to ignore local profile data
80+
# AppData/

KeyPilot.sln

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyPilot", "src\KeyPilot\KeyPilot.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
EndGlobal

README.md

Lines changed: 199 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,200 @@
11
# 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>

docs/logo.png

73.4 KB
Loading

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.0",
4+
"rollForward": "latestMajor",
5+
"allowPrerelease": true
6+
}
7+
}

src/KeyPilot/App.xaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Application x:Class="KeyPilot.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
Startup="Application_Startup"
5+
Exit="Application_Exit">
6+
<Application.Resources>
7+
<ResourceDictionary>
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="Themes/Styles.xaml"/>
10+
</ResourceDictionary.MergedDictionaries>
11+
</ResourceDictionary>
12+
</Application.Resources>
13+
</Application>

0 commit comments

Comments
 (0)