WritingTools icon indicating copy to clipboard operation
WritingTools copied to clipboard

Request and Issues: Do not show icon on Taskbar + Ability to assign any hotkeys + Bugs

Open needcoder opened this issue 11 months ago • 4 comments

  • [ ] Do not show icon on Taskbar It is necessary that when calling the window using Hotkey, the icon on Taskbar does not appear (or the option in the settings)

  • this does not make sense because when clicking on this icon the window disappears

  • the icon constantly appears and disappears when the Hotkey presses - and this is annoying

  • It is desirable that there is only one icon in the system tray - this is enough

and it is possible to make that when double-clicking on the program icon in the tray - call the ai window


  • [ ] Ability to assign any hotkeys At the moment, only "Ctrl+Space" can be assigned if you assign "Ctrl+Shift" | "Alt+Shift" | "Alt+Q" | "Alt+1" then, for example, when highlighting the text in telegrams - the text is discarded there, or if the text is not selected, then the symbol "C" is printed Upd: In sublime text, when ai window is called, the selected text is deleted and "cc" is printed

  • [ ] Prohibit running multiple instances of the program - one is enough - when trying to start the second instance, you can call the ai window to show that the program is already running

After all this, you can already think to add the history of input and generations (previous window calls) (encrypt or not - give a choice to the user in the settings for example) Windows 10

needcoder avatar Feb 21 '25 10:02 needcoder

Hello! Thank you for taking the time to extensively document things.

It is desirable that there is only one icon in the system tray - this is enough.

Your first point of weird behaviour is due to having multiple instances of the program running.

So if you close the second instance of Writing Tools, it should work normally.

This leads me directly to your third point - yep! I'm working to prevent multiple instances of the program being launched, so it should fix this accidental edge case.


About the hotkeys: Certain custom hotkeys will not work due to the fact that the text selection is lost when pressing them, or affecting the text selection behaviour.

There are many that work, including "ctrl+`" or "ctrl+j" as mentioned in the README.

Let me know if those fix your third issue!

Thanks for reaching out, and I'll fix your point about launching multiple instances in a future update.

theJayTea avatar Feb 22 '25 05:02 theJayTea

Would it be possible to detect the windows key with your current approach and will that also break the selection?

As currently Ctrl is the only Modifier key that can be used that doesn't break the selection which limits the shortcuts extremely. From your mentioned options: "ctrl+j" -> opens downloads on Edge "ctrl+`" -> not possible sometimes in certain keyboard layouts as that key is different (maybe could be mitigated by allowing for multiple hotkeys to be registered, but still not great) "ctrl+space" -> Used in almost all IDEs, so not possible for a dev...

Realistically most applications have many shortcuts with the ctrl key so collisions are likely. (The easier to type that is. You can always set to something like ctrl+*, its just not convenient.)

P.S. Also looked at your code and you are just calling the copy operation to get the selected text, so everything that changes the focus will break it.

Not familiar with Python, but could there be some libraries that can call into native Windows APIs, as there are options to read selections that way. Also it could allow native registration of shortcuts that could be stopped to not occur in other applications even.

abdonkov avatar Feb 27 '25 11:02 abdonkov

@abdonkov you can use the Windows key. See: https://github.com/theJayTea/WritingTools/discussions/59

We're using Python for the code (so it runs cross-platform, and I'm really familiar with it), and it isn't easy to use Windows native APIs here.

As you noted, the copy approach works great until it loses focus with some hotkeys. But:

  • I'm not certain that even Windows-native APIs would work when the window isn't focused
  • and importantly, many programs implement their own boutique selection systems that don't use any Windows components. Microsoft Word, for instance, has its own selection system (with their own selection animations, actions, etc.) that just wouldn't be detected by any Windows API.
  • and of course, we want Linux support.

Let me know how the Windows key shortcuts work for you :)

theJayTea avatar Feb 28 '25 06:02 theJayTea

OK, cmd_l is indeed the windows key. Only cmd also works.

However, sadly this doesn't fix the problem as selection is lost with the Windows key as well. So only the ctrl key remains as an option for shortcuts.

I will just have to move my hand a little more I guess. :)

abdonkov avatar Mar 04 '25 11:03 abdonkov