|
|
@ -122,6 +122,9 @@ export class GestureHandler { |
|
|
|
private lastClickTime: number = 0; // 上次点击时间戳(用于点击节流)
|
|
|
|
private readonly CLICK_INTERVAL = 500; // 点击最小间隔(ms)
|
|
|
|
|
|
|
|
private lastkeyTime: number = 0; |
|
|
|
private readonly sendkeyINTERVAL = 1500; // 全屏切换间隔
|
|
|
|
|
|
|
|
private app_store: any; // 存储应用状态,比如视频宽高、边界设置等
|
|
|
|
|
|
|
|
constructor() { |
|
|
@ -212,10 +215,10 @@ export class GestureHandler { |
|
|
|
try { |
|
|
|
const key_str = this.app_store.config.four_fingers_up_send || "f"; |
|
|
|
const now = Date.now(); |
|
|
|
if (now - this.lastFullScreenTime < this.FULL_SCREEN_INTERVAL) { |
|
|
|
if (now - this.lastkeyTime < this.sendkeyINTERVAL) { |
|
|
|
return; |
|
|
|
} |
|
|
|
this.lastFullScreenTime = now; |
|
|
|
this.lastkeyTime = now; |
|
|
|
|
|
|
|
this.triggerAction.sendKeys(key_str); |
|
|
|
} catch (error) { |
|
|
|