Skip to content

Commit

Permalink
Merge pull request #105 from Marszzz1116/master
Browse files Browse the repository at this point in the history
input_message方法增加auto_backspace参数
  • Loading branch information
mikigo authored Sep 5, 2024
2 parents 7f41446 + 9ff9829 commit 4f2f06b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mouse_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def input_message(
interval: [int, float] = 0.2,
wayland_shift: bool = False,
_ydotool: bool = False,
auto_backspace: bool = True,
):
"""
输入字符串
Expand Down Expand Up @@ -279,7 +280,8 @@ def check_chinese():
_hk.insert(1, "shift")
cls.hot_key(*_hk)
# 目前的方案中,粘贴内容后会在末尾会多出一个空格,临时处理:去掉末尾空格
cls.press_key("backspace")
if auto_backspace:
cls.press_key("backspace")
else:
for key in message:
if _ydotool:
Expand Down

0 comments on commit 4f2f06b

Please sign in to comment.