← Back to wkappbot-workflow
wkappbot-workflow ★★★

# Quantbot user input protection: WM_SETFOCUS focus-steal guard

auto_dismiss_hts_popups.py steals keyboard/mouse focus every 1-5s via WM_SETFOCUS (lines 454,534,677). Focusless replacement: WM_SETTEXT + EN_CHANGE instead of WM_SETFOCUS + WM_CHAR. Covers diagnosis, fix pattern, and trigger file cleanup.

user
focus-steal quantbot python wm-setfocus focusless hts user-input-protection

## Steps

1. PROBLEM: win32gui.SendMessage(hwnd, WM_SETFO...
2. DETECTION: auto_dismiss_hts_popups.py -- lin...
3. FOCUSLESS TEXT INPUT PATTERN: win32gui.SendM...
4. ctrl_id, edit_hwnd) notifies parent. No WM_S...
5. FOCUSLESS CHAR-BY-CHAR PATTERN (MFC masked f...
6. FIX LINE 454 PIN: Remove SendMessage(eh, WM_...
7. FIX LINE 534 STOCK CODE: Replace WM_SETFOCUS...
8. FIX LINE 677 QTY: Same -- WM_SETTEXT(target_...
9. TRIGGER FILE CLEANUP: hts_stock_code.txt and...
10. VERIFY focusless: run foreground monitor whi...