efck icon indicating copy to clipboard operation
efck copied to clipboard

No direct pasting into last active application on Windows 11

Open MarkL1969 opened this issue 1 year ago • 2 comments

Describe the bug On Windows, when clicking on an emoji, it should be inserted into the last active window / input field bevor opening efck - but it doesn't.

To Reproduce Steps to reproduce the behavior:

  1. Open notepad (or any other application / input line)
  2. Click strg+alt+.
  3. click on an emoji in efck
  4. efck closes, the focus returns to the previously active windows but no emoji is inserted

Expected behavior The clicked emoji should be inserted in the last active window / input field.

Versions Specify versions: OS: Windows 11 Pro, 10.0.22631 Build 22631 Qt: EFCK: 6.1.7601.17514

When activating "Force clipboard" the selected emoji is placed into the clipboard. But direct pasting would be much nicer...

MarkL1969 avatar Feb 11 '24 14:02 MarkL1969

Thanks for the issue report!

This worked for me on Windows 10 and was last tested working on Windows Server 2022. Maybe something broke with Win 11.

Unfortunately, I don't currently have Windows 11 to test/debug myself. If you know a little of Python and you're interested in helping out, this is the relevant part that types out characters on Windows: https://github.com/efck-chat-keyboard/efck/blob/b695b8a3b4f3ce280b5f5ed5e5e9a84f884d0cdb/efck/output.py#L131-L196 Can you check whether the function types out anything when used standalone in a Python interpreter? E.g.

>>> ...  # paste the function body with all its required imports
>>> _type_windos('test')
>>> # should type "test" here

Alternatively, this had proven before to be the flaky part: https://github.com/efck-chat-keyboard/efck/blob/b695b8a3b4f3ce280b5f5ed5e5e9a84f884d0cdb/efck/gui.py#L318-L327 Maybe see if changing/increasing WM_SWITCH_ACTIVE_WINDOW_SLEEP_MS duration fixes anything.

You can find the source code files in the designated Program Files subdirectory in the base_library.zip file. Then again, the built Windows EXE is not the best distribution to debug/develop on ...

kernc avatar Feb 12 '24 13:02 kernc

sorry but I can only use the pre-build versions.

MarkL1969 avatar Feb 13 '24 08:02 MarkL1969