Skip to content

Commit d37bd27

Browse files
committed
fix: alt + key not work
1 parent b05811f commit d37bd27

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- 尚未实现足够多的图形界面,无合适的候选框
2626
- 尚未实现基础设置功能,如重新部署、同步等(在搞定多线程问题之前,重新部署使用 `Reload` 作为临时方案)
2727
- 某些窗口拿不到输入光标所在的坐标,ToolTip 会跟随鼠标光标的位置显示
28-
- 注册热键的问题,例如,上档键输入的字符似乎需要额外注册;热键过多,注册会比较耗时等问题(已取消 Win 键的相关注册,应该有所缓解)
28+
- 注册热键的问题,例如,热键冲突(Alt + 单一按键无法返回给系统继续处理,因此暂时不注册 Alt + 单一按键)等
2929
- 并非使用系统的输入法接口,而是用热键的方式获取按键,可能导致一些问题,如,需要保留一个英文输入语言;退出玉兔毫时,可能无法恢复先前的输入法语言等
3030
- 管理员权限打开的窗口应该不起作用
3131
- Windows 远程桌面连接中,不应拦截切换 ascii mode 的热键,而是交给远程桌面控制

Rabbit.ahk

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ RegisterHotKeys() {
8989

9090
; Modifiers
9191
for modifier, _ in KeyDef.modifier_code {
92-
if modifier == "LWin" or modifier == "RWin"
93-
continue ; do not register Win keys for now
92+
if modifier == "LWin" or modifier == "RWin" or modifier == "LAlt" or modifier == "RAlt"
93+
continue ; do not register Win / Alt keys for now
9494
local mask := KeyDef.mask[modifier]
9595
Hotkey("$" . modifier, ProcessKey.Bind(modifier, mask))
9696
Hotkey("$" . modifier . " Up", ProcessKey.Bind(modifier, mask | up))
@@ -103,10 +103,12 @@ RegisterHotKeys() {
103103
Hotkey("$" . key, ProcessKey.Bind(key, 0))
104104
; need specify left/right to prevent fallback to modifier down/up hotkeys
105105
Hotkey("$<^" . key, ProcessKey.Bind(key, ctrl))
106-
if not key = "Tab"
107-
Hotkey("$<!" . key, ProcessKey.Bind(key, alt))
106+
; do not register Alt + single key now
107+
; if not key = "Tab" {
108+
; Hotkey("$<!" . key, ProcessKey.Bind(key, alt))
109+
; Hotkey("$>!" . key, ProcessKey.Bind(key, alt))
110+
; }
108111
Hotkey("$>^" . key, ProcessKey.Bind(key, ctrl))
109-
Hotkey("$>!" . key, ProcessKey.Bind(key, alt))
110112
Hotkey("$^!" . key, ProcessKey.Bind(key, ctrl | alt))
111113
Hotkey("$!#" . key, ProcessKey.Bind(key, alt | win))
112114

0 commit comments

Comments
 (0)