diff --git a/public/styles.css b/public/styles.css index 31b1596..c625858 100644 --- a/public/styles.css +++ b/public/styles.css @@ -19,6 +19,7 @@ body { #game-draw { position: relative; + overflow: hidden; } #game-draw > * { diff --git a/src/core/main/custom/hotkey.ts b/src/core/main/custom/hotkey.ts index 9c18653..cca863c 100644 --- a/src/core/main/custom/hotkey.ts +++ b/src/core/main/custom/hotkey.ts @@ -228,9 +228,9 @@ export class Hotkey extends EventEmitter { // 检查全局启用情况 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;