mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-08 05:34:30 +08:00
fix: 方向键持续触发
This commit is contained in:
1 parent
392a391b75
commit
203fde1fbc
2 files changed
+2
-1
No files matched your search
@@ -228,9 +228,9 @@ export class Hotkey extends EventEmitter<HotkeyEvent> {
|
||||
// 检查全局启用情况
|
||||
if (!this.enabled) return false;
|
||||
const when = this.conditionMap.get(this.scope)!;
|
||||
if (type === 'up') this.checkPressEnd(key);
|
||||
if (!when()) return false;
|
||||
if (type === 'down') this.checkPress(key);
|
||||
else this.checkPressEnd(key);
|
||||
const toEmit = this.keyMap.get(key);
|
||||
if (!toEmit) return false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user