Closed pintassilgo closed 1 year ago
Test program for Qt5, linux-64. tst-KeyDown.zip
it shows hex codes of chars when you press them. please test with dead keys and tell me the - a) what it shows for normal accented keys? b) what it shows for dead keys?
Updated test program: tst-KeyDown.zip
It only shows non-accented keys, with the exception of Ç because, as I said, it's the only natively accented key of my keyboard. Other accented letters require a combination with dead keys and aren't recognized by this program.
So...
a) It doesn't show normal accented keys. i.e. when I press ~
followed by a
, it shows nothing for ~
and shows just a
after a
.
b) Nothing.
This was with the first test program, I'll try now with the updated version.
My keyboard layout (Portuguese, ABNTII) for reference
With the updated program:
Same results, but now with keydown: #
lines.
So if I press just A
, it shows
keydown: 65
keypress: a, hex: 61
If I press ~
followed by A
, which should produce ã
, the output is the same:
keydown: 65
keypress: a, hex: 61
The program doesn't recognize keydown/keypress when I press ~
(or any dead key).
Please aslo see https://wiki.freepascal.org/CudaText#Linux:_Keyboard_input_problems maybe you can adjust OS settings to fix it?
Already tried that, unfortunately it doesn't work.
Actually, it doesn't make sense for me to be OS issue because typing accented letters always work on Cuda when autocomplete popup isn't open. So it should be something on how Cuda handles keyboard input when autocomplete popup is open.
Just adding: typing accented letters work even on dialog text input, like Command palette.
The issue is when autocomplete popup is open and focus should be in editor, but it's probably in the autocomplete popup so that Cuda currently needs to pass the input to the editor, I guess. Similar to issues such as #5004.
Maybe you could create an invisible text input when autocomplete popup is open to correctly intercept typed content and then pass it to editor?
It would be ugly hack and ugly code in app... I won't do hidden fields
If GTK2 version has this bug, I can understand why: ATSynEdit has GTK2 specifig IME code:
{$ifdef LCLGTK2}
{$ifdef GTK2_IME_CODE}
// fcitx IM
procedure TATSynEdit.WM_GTK_IM_COMPOSITION
For Qt5 , I don't know the reason of accent problem.
This bug only affects Qt5.
- add: auto-completion window is now parented in the main window: 1) no more separate shadow, 2) main window don't loose focus and don't blink, 3) no more showing of autocomplete-window in Alt+Tab list (thanks d0vgan)
Reading this, I have a little hope it will cause focus to stay in editor instead of switching to autocomplete popup so that maaaybe this issue is fixed, supposing Cuda no longer needs to pass key inputs from autocomplete popup to editor, which I believe is somehow the cause of the issue. Could you please provide a qt5 build for me to test?
Sure, cudatext-q.zip
Yes! It was fixed! Thanks.
padr pad
, so that autocomplete will show up suggestingpadr
.~
+a
to produceã
, or´
+e
to inserté
...Result: the letter is inserted without the accent, like
pada
orpade
instead ofpadã
andpadé
.Natively accented key doesn't count on this issue, for instance my keyboard has the key
Ç
that is not affected by the issue. It must be a combination of dead key + letter.This issue only happens when both conditions below are filled: