Browse Source

send enter fix

gesture
Backpack 2 months ago
parent
commit
bda10ef218
2 changed files with 5 additions and 2 deletions
  1. BIN
      wavecontrol-test/src-py/router/__pycache__/ws.cpython-312.pyc
  2. +5
    -2
      wavecontrol-test/src/hand_landmark/gesture_handler.ts

BIN
wavecontrol-test/src-py/router/__pycache__/ws.cpython-312.pyc View File


+ 5
- 2
wavecontrol-test/src/hand_landmark/gesture_handler.ts View File

@ -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) {

Loading…
Cancel
Save