Skip to content

Commit 3fa644e

Browse files
authored
Merge pull request #325 from taojy123/dev
document update
2 parents 045ddb0 + 9250d30 commit 3fa644e

File tree

8 files changed

+143
-124
lines changed

8 files changed

+143
-124
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ permissions:
1010
contents: read
1111

1212
env:
13-
keymousego-version: _v5_1_1
13+
keymousego-version: _v5_2
1414

1515
jobs:
1616
build-windows:
1717
runs-on: windows-latest
1818
steps:
1919
- uses: actions/checkout@main
20-
- name: Set up Python 3.7
20+
- name: Set up Python 3.10
2121
uses: actions/setup-python@main
2222
with:
23-
python-version: "3.7"
23+
python-version: "3.10"
2424
- name: Install dependencies
2525
run: |
2626
pip3 install -r requirements-windows.txt
@@ -41,10 +41,10 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@main
44-
- name: Set up Python 3.7
44+
- name: Set up Python 3.10
4545
uses: actions/setup-python@main
4646
with:
47-
python-version: "3.7"
47+
python-version: "3.10.16"
4848
- name: Install dependencies
4949
run: |
5050
pip3 install -r requirements-universal.txt
@@ -61,14 +61,38 @@ jobs:
6161
name: linux
6262
path: ${{ github.workspace }}/artifact/
6363

64+
build-linux-arm64:
65+
runs-on: ubuntu-24.04-arm
66+
steps:
67+
- uses: actions/checkout@main
68+
- name: Set up Python 3.10
69+
uses: actions/setup-python@main
70+
with:
71+
python-version: "3.10.16"
72+
- name: Install dependencies
73+
run: |
74+
pip3 install -r requirements-universal.txt
75+
pip3 install pyinstaller
76+
- name: Bundle Packages
77+
run: |
78+
pyinstaller -Fw --add-data './assets:assets' KeymouseGo.py
79+
- name: Copy artifact
80+
run: |
81+
mkdir artifact && mv dist/KeymouseGo ./artifact/KeymouseGo${{ env.keymousego-version }}-linux-aarch64
82+
- name: Artifact
83+
uses: actions/upload-artifact@main
84+
with:
85+
name: linux-aarch64
86+
path: ${{ github.workspace }}/artifact/
87+
6488
build-macos:
6589
runs-on: macos-latest
6690
steps:
6791
- uses: actions/checkout@main
68-
- name: Set up Python 3.7
92+
- name: Set up Python 3.10
6993
uses: actions/setup-python@main
7094
with:
71-
python-version: "3.7"
95+
python-version: "3.10.11"
7296
- name: Install dependencies
7397
run: |
7498
pip3 install -r requirements-universal.txt

Changelog.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
## v5.2
2+
- 新的插件系统,__不兼容旧版插件__
3+
- 脚本格式改用`json5`,用于更好地编写脚本以及支持插件功能,兼容旧版脚本。
4+
- UI和脚本执行逻辑重构
5+
- 支持自定义热键
6+
- 修正翻译错误
7+
- 移除原本程序的`执行速度`,可用wiki中的插件样例作为替代
8+
- 程序界面显示当前鼠标坐标
9+
-
10+
## v5.1
11+
12+
+ 支持在Linux和Mac环境下运行
13+
+ 支持在多屏环境下运行(仅Windows)
14+
+ 修复程序在执行连点操作时有概率崩溃的问题
15+
+ 修复文件选择器选择脚本后选项卡未更新的问题
16+
17+
## v5.0
18+
19+
+ 初步实现自定义扩展功能
20+
+ 可调整提示音音量
21+
+ 增加脚本重命名/编辑子窗口
22+
+ 添加英文文档
23+
+ 增加简单日志窗口
24+
+ 适应高分辨率(在高分辨率情况下放大窗口)
25+
26+
## v4.1
27+
28+
+ 添加 命令行运行能力
29+
30+
31+
## v4.0
32+
33+
+ 使用 PySide2 重写 UI
34+
+ 快捷键支持鼠标中键与侧键
35+
+ 相关 issue 提出的功能需求实现
36+
+ 4.0 代码基本由 <a href="https://github.com/Monomux">Monomux</a> 贡献,KeymouseGo 的整体品质有了较大提升。感谢付出!
37+
38+
39+
## v3.2.2
40+
41+
+ 修复了 input 事件无法输入内容的 bug
42+
43+
## v3.2.1
44+
45+
+ 修复了中文注释无法解析的 bug
46+
47+
48+
## v3.2
49+
50+
+ 脚本文件中可使用 `//` 进行内容注释
51+
+ 可录制鼠标轨迹(`mouse move` 事件),并可在软件中设置轨迹精度,填 0 即不录制轨迹。
52+
53+
54+
## v3.1
55+
56+
针对这个 issue(https://github.com/taojy123/KeymouseGo/issues/39) 增加了两个功能点
57+
58+
+ 命令行启动模式中可以随时按下 `F9` 热键,来终止脚本运行
59+
+ 模拟鼠标点击的脚本语句中可以设定坐标点为 `[-1, -1]`, 用以表示在鼠标当前位置直接点击
60+
61+
62+
## v3.0
63+
64+
因为兼容 macOS 遇到的很大的阻碍,最终放弃跨平台,血泪史可参看这两个 issue:
65+
https://github.com/taojy123/KeymouseGo/issues/24
66+
https://github.com/moses-palmer/pynput/issues/55
67+
68+
+ 改回使用 `win32api` 来模拟事件,只支持 windows 系统
69+
+ 解决了 `shift` + `上下左右` 的回放问题,见 https://github.com/taojy123/KeymouseGo/issues/27
70+
+ 增加了录制鼠标路径功能,需求来源 https://github.com/taojy123/KeymouseGo/issues/33
71+
+ 增加了文字输入功能,需求来源 https://github.com/taojy123/KeymouseGo/issues/34
72+
+ 因为使用了 `win32api`,不需要再手动设置屏幕缩放比例了
73+
+ 录制脚本语法有部分改动,不向前兼容
74+
75+
76+
## v2.2
77+
+ 优化了脚本格式,将动作时间间隔,放到每行脚本的首位,逻辑更加合理
78+
+ 默认录制的第一个动作不加时间间隔,即按下启动按钮后立即执行第一个动作
79+
+ 如果重复多次执行,可修改脚本中第一个动作的时间(单位毫秒)来决定每轮动作之间的相隔时间
80+
81+
82+
## v2.1
83+
+ 增加了屏幕缩放配置,兼容了修改过屏幕缩放比例的 win10 系统
84+
+ 优化代码,兼容 `Python3`
85+
86+
## v2.0
87+
+ 代码优化重构
88+
+ 使用 `pynput` 实现动作捕捉和执行,不再需要安装 `pywin32``pyhook`
89+
+ 兼容 macOS (需要在隐私设置中允许程序控制电脑)
90+
+ `pynput` 似乎不兼容 WinXP,暂时没法打包 `x86` 版本
91+
92+
## v1.5
93+
+ 修复自定义缩放后录制定位偏移 Bug
94+
95+
## v1.4
96+
+ 增加命令行运行方式
97+
98+
## v1.3
99+
+ Bug 修复
100+
101+
## v1.2
102+
+ UI 更新
103+
+ 移除了 `后台模式`
104+
+ 简化了录制脚本,增强了可读性
105+
+ 脚本文件名优化,可录制多个脚本,避免误操作覆盖了辛辛苦苦录制的脚本
106+
+ 可自定义 `启动热键``终止热键`

README.md

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
+ [脚本语法说明](#脚本语法说明)
3535
+ [关于作者](#关于作者)
3636
+ [开源贡献者](#开源贡献者)
37-
+ [更新说明](#更新说明)
3837

3938
# 安装
4039

@@ -173,115 +172,3 @@ chmod -R 770 ~/.qt_material
173172
感谢 JetBrains 免费提供开发工具
174173

175174
<a href="https://www.jetbrains.com/?from=KeymouseGo"><img src="https://raw.githubusercontent.com/taojy123/KeymouseGo/master/jetbrains-variant-2.png" height="80"></a>
176-
177-
----------------------
178-
179-
# 更新说明
180-
181-
暂时没法打包 `x86` 版本,32 位系统的同学请自行源码编译,或 [下载v1.5老版本](https://github.com/taojy123/KeymouseGo/releases/tag/v1.5) 使用
182-
183-
## v5.1
184-
185-
+ 支持在Linux和Mac环境下运行
186-
+ 支持在多屏环境下运行(仅Windows)
187-
+ 修复程序在执行连点操作时有概率崩溃的问题
188-
+ 修复文件选择器选择脚本后选项卡未更新的问题
189-
190-
## v5.0
191-
192-
+ 初步实现自定义扩展功能
193-
+ 可调整提示音音量
194-
+ 增加脚本重命名/编辑子窗口
195-
+ 添加英文文档
196-
+ 增加简单日志窗口
197-
+ 适应高分辨率(在高分辨率情况下放大窗口)
198-
199-
## v4.1
200-
201-
+ 添加 命令行运行能力
202-
203-
204-
## v4.0
205-
206-
+ 使用 PySide2 重写 UI
207-
+ 快捷键支持鼠标中键与侧键
208-
+ 相关 issue 提出的功能需求实现
209-
+ 4.0 代码基本由 <a href="https://github.com/Monomux">Monomux</a> 贡献,KeymouseGo 的整体品质有了较大提升。感谢付出!
210-
211-
212-
## v3.2.2
213-
214-
+ 修复了 input 事件无法输入内容的 bug
215-
216-
## v3.2.1
217-
218-
+ 修复了中文注释无法解析的 bug
219-
220-
221-
## v3.2
222-
223-
+ 脚本文件中可使用 `//` 进行内容注释
224-
+ 可录制鼠标轨迹(`mouse move` 事件),并可在软件中设置轨迹精度,填 0 即不录制轨迹。
225-
226-
227-
## v3.1
228-
229-
针对这个 issue(https://github.com/taojy123/KeymouseGo/issues/39) 增加了两个功能点
230-
231-
+ 命令行启动模式中可以随时按下 `F9` 热键,来终止脚本运行
232-
+ 模拟鼠标点击的脚本语句中可以设定坐标点为 `[-1, -1]`, 用以表示在鼠标当前位置直接点击
233-
234-
235-
## v3.0
236-
237-
因为兼容 macOS 遇到的很大的阻碍,最终放弃跨平台,血泪史可参看这两个 issue:
238-
https://github.com/taojy123/KeymouseGo/issues/24
239-
https://github.com/moses-palmer/pynput/issues/55
240-
241-
+ 改回使用 `win32api` 来模拟事件,只支持 windows 系统
242-
+ 解决了 `shift` + `上下左右` 的回放问题,见 https://github.com/taojy123/KeymouseGo/issues/27
243-
+ 增加了录制鼠标路径功能,需求来源 https://github.com/taojy123/KeymouseGo/issues/33
244-
+ 增加了文字输入功能,需求来源 https://github.com/taojy123/KeymouseGo/issues/34
245-
+ 因为使用了 `win32api`,不需要再手动设置屏幕缩放比例了
246-
+ 录制脚本语法有部分改动,不向前兼容
247-
248-
249-
## v2.2
250-
+ 优化了脚本格式,将动作时间间隔,放到每行脚本的首位,逻辑更加合理
251-
+ 默认录制的第一个动作不加时间间隔,即按下启动按钮后立即执行第一个动作
252-
+ 如果重复多次执行,可修改脚本中第一个动作的时间(单位毫秒)来决定每轮动作之间的相隔时间
253-
254-
255-
## v2.1
256-
+ 增加了屏幕缩放配置,兼容了修改过屏幕缩放比例的 win10 系统
257-
+ 优化代码,兼容 `Python3`
258-
259-
## v2.0
260-
+ 代码优化重构
261-
+ 使用 `pynput` 实现动作捕捉和执行,不再需要安装 `pywin32``pyhook`
262-
+ 兼容 macOS (需要在隐私设置中允许程序控制电脑)
263-
+ `pynput` 似乎不兼容 WinXP,暂时没法打包 `x86` 版本
264-
265-
## v1.5
266-
+ 修复自定义缩放后录制定位偏移 Bug
267-
268-
## v1.4
269-
+ 增加命令行运行方式
270-
271-
## v1.3
272-
+ Bug 修复
273-
274-
## v1.2
275-
+ UI 更新
276-
+ 移除了 `后台模式`
277-
+ 简化了录制脚本,增强了可读性
278-
+ 脚本文件名优化,可录制多个脚本,避免误操作覆盖了辛辛苦苦录制的脚本
279-
+ 可自定义 `启动热键``终止热键`
280-
281-
282-
283-
284-
285-
286-
287-

Recorder/WindowsRecorder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def get_mouse_event(event):
7272
delay = 0
7373
globalv.latest_time = globalv.current_ts()
7474

75+
record_signals.cursor_pos_change.emit(pos)
7576
if not flag_multiplemonitor:
7677
x, y = pos
7778
pos = (x / SW, y / SH)
@@ -83,7 +84,6 @@ def get_mouse_event(event):
8384
'action': pos
8485
})
8586
record_signals.event_signal.emit(sevent)
86-
record_signals.cursor_pos_change.emit(pos)
8787
return True
8888

8989

Recorder/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
if system() == 'Windows':
66
import Recorder.WindowsRecorder as _Recorder
7+
_Recorder.globalv.key_combination_trigger = ['lwin', 'lshift', 'rshift', 'lcontrol', 'rcontrol', 'lmenu', 'rmenu']
78
elif system() in ['Linux', 'Darwin']:
89
import Recorder.UniversalRecorder as _Recorder
10+
_Recorder.globalv.key_combination_trigger = ['win', 'shiftright', 'shift', 'ctrlright', 'ctrl', 'altright', 'alt']
911
else:
1012
raise OSError("Unsupported platform '{}'".format(system()))
1113

Recorder/globals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from PySide6.QtCore import Signal, QObject
55
swapmousemap = {'mouse left down': 'mouse right down', 'mouse left up': 'mouse right up',
66
'mouse right down': 'mouse left down', 'mouse right up': 'mouse left up'}
7-
key_combination_trigger = ['win', 'shiftright', 'shift', 'ctrlright', 'ctrl', 'altright', 'alt']
7+
key_combination_trigger = []
88
latest_time = -1
99
mouse_interval_ms = 200
1010

requirements-universal.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pynput==1.7.6
44
pyperclip==1.8.0
55
pyautogui==0.9.53
66
future==0.18.3
7-
PySide6==6.4.3
7+
PySide6==6.5.3
88
qt-material==2.11
99
loguru==0.6.0
1010
json5==0.9.10

requirements-windows.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pywin32==302
44
pyWinhook==1.6.2
55
pyperclip==1.8.0
66
future==0.18.3
7-
PySide6==6.4.3
7+
PySide6==6.5.3
88
qt-material==2.11
99
loguru==0.6.0
1010
json5==0.9.10

0 commit comments

Comments
 (0)