-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] Pop-up windows: Problem with "lack of focus" / "click out" #105
Comments
I am not able to find a solution for now. I have something (https://github.com/nbonamy/witsy-autolib) that works in Dev but for whatever reason does work in Production. Unable to know why. For now I am adding a very ugly bar with close button so you can click it. ![]() |
Maybe found a fix. Available in 2.0.0-rc1: |
Bravo! "click out" normal works, but "ai commands" window appears again for 3-4 seconds - can we fix it? if the speed of appearance has dropped due to calculations in which program the text is selected - it is possible to disable this in the settings |
The only added delay for this is 250ms witsy/src/main/windows/commands.ts Line 45 in ddc770e
On my install which is Windows running in a virtual machine on a Mac (so far from ideal condition), I measured a delay of 50 frames on this 60fps video so 830ms total. Screen.Recording.2025-03-07.at.08.31.53.movAnd no I am not going to add another setting. |
Okay, we can write it off to the fact that I don't have a powerful hardware on my computer, but there is a fact that other windows appear very quickly and this one needs 3 seconds to appear - maybe a feature of electron |
maybe 250ms => 100ms |
Remember: it is a hack to mitigate an electron issue... |
As predicted, had to reverse things for now. I fear this is going to end as a known-bug with no fix planned. I cannot workaround electron / OS issues. |
The funny thing is that now "ai commands" start up in ~1.5 to 2 seconds and "click out." works, but after changing the layout to Russian - 1 time is called - and then on each call starts the bug "Please higlight text...", even if you change back to en layout - the bug does not go away. upd: I just saw a message about "Alternative Method" |
Can we implement somehow neatly work for non-latin keyboards? because when you select "alternative method" - "click out" doesn't work (just for the default version you only need to add non-latin kb support) |
The problem is this one: when you activate "Alternate copy/paste method" for non-latin keyboard, it uses the Powershell script which spawns a separate process which creates the focus issue for which I don't have a solution as once again this is an electron/OS level issue and no good workaround is available. And honestly I have spent enough time on this for now 😀 |
You can ask their repository - why doesn't it work and we have to write crutches, or the solution exists, but we just don't know about it |
It is very important to emphasize that when you change the layout from English to Russian and press hotkey - window "ai command" is called 1 time before the bug - well, how is it possible that 1 time it works (i.e. it reads keys correctly) and then the bug starts? |
Moreover, if you change Hotkey, then the bug disappears (Changing the hotkey triggers something that resets the bug) - maybe the best solution to this problem lies in this UPD: Maybe with "alternate copy" enabled, we can reset the Hotkey every time we change keyboard layouts (or after calling the "ai commands" window), or you can come up with a more elegant option. |
Just to be sure: the "Alternate Copy/Paste Method" thing should make the shortcut work with non-latin keyboards. The only issue remaining is the lack of focus on 1st display. Right? |
The only problem is that the "click out" doesn't work with the alternate method to close called windows, the rest works But the best implementation is default, and I suggest to focus on the fact that when you change the hotkey in the settings - it resets and removes the bug, so maybe with the alternative method don't write sidercar solutions but just reset the hotkey when you change the layout or after every window call? (because even on non-latin layout windows are called 1 time, and only from the 2nd time the bug starts). |
Problem with "lack of focus". is back - when I call the "ai command" or "new prompt" then "click out." does not close the window - you need to click on this window and only then "click out" or "escape." will close it down
And sometimes the focus is triggered:
I've figured out in what cases: After I explicitly click on the window and hit "escape," - for the next window call - "click out". will work, but for subsequent times it will not work until I explicitly click on the window again and press "escape".
The text was updated successfully, but these errors were encountered: