with vnc no altgr keys [,],~,|,@,{,} in code editor
Original Reporter info from Mantis: xblades
-
Reporter name:
Original Reporter info from Mantis: xblades
- Reporter name:
Description:
I have problems with the keys generated with altgr in the code editor ( [,],{,],~,@ )
Connected locally with keyboard works fine, connected by vnc the keys are missing in the code editor only.
Every other program/terminal or the Object-Inspector or a TEdit works.
Sometimes i am able to get a key when pressing it in very short time. It seems to be a question of received keys in LCL in gtk or the way the code editor decodes this. It has a timing dependend component.
Steps to reproduce:
- installed lazarus 1.2.4 on raspberry pi, got similar issues even worse (shift ins didn't work, altgr keys didn't work)
- copied 1.2.6 and compiled from source : (altgr keys are missing in code editor, shift ins is working)
- tightvnc server
- ultravnc or tightvnc client on windows 8.1 / german keyboard
Additional information:
I have added a debug output in ./lcl/interfaces/gtk2proc.pp :
in TLCLHandledKeyEvent.Create i added at the end :
writeln('Key ',thetype,' ',keyval,' ',time);
This produces with locally connected keyboard for altgr+7 (which gives a {) :
Key 8 65027 28106502
Key 8 65027 28106502
Key 8 123 28108710
Key 8 0 28108710
Key 8 0 28108710
Key 9 123 28108830
Key 9 123 28108830
Key 9 65027 28112398
Key 9 65027 28112398
connected by vnc the output is :
Key 8 65507 3866257045
Key 8 65507 3866257046
Key 8 65507 3866257046
Key 8 65514 3866257049
Key 8 65514 3866257049
Key 8 65514 3866257049
Key 8 65514 3866257049
Key 8 65507 3866257201
Key 8 65507 3866257201
Key 8 65514 3866257201
Key 8 65514 3866257201
Key 8 65507 3866257210
Key 8 65507 3866257210
Key 8 65514 3866257210
Key 8 65514 3866257210
Key 8 65507 3866257211
Key 8 65507 3866257211
Key 8 65514 3866257211
Key 8 65514 3866257211
Key 9 65514 3866257211
Key 9 65514 3866257211
Key 8 65514 3866257212
Key 8 65514 3866257212
Key 9 65507 3866257212
Key 9 65507 3866257212
Key 9 65514 3866257212
Key 9 65514 3866257212
Key 8 65505 3866257212
Key 8 65505 3866257212
Key 8 123 3866257212
Key 8 123 3866257212
Key 9 65505 3866257212
Key 9 65505 3866257212
Key 8 65507 3866257212
Key 8 65507 3866257212
Key 9 91 3866257251
Key 9 91 3866257251
Key 9 65507 3866257596
Key 9 65507 3866257596
Key 9 65514 3866257597
Key 9 65514 3866257597
It seems, that the multiple switch on and off of keycodes at the same time is decoded to a valid { in the code editor
Similar Keycodes work in TEdit or the Object Inspector
a very short altgr+7 works :
Key 8 65507 3866798816
Key 8 65507 3866798816
Key 8 65514 3866798820
Key 8 65514 3866798820
Key 9 65507 3866799006
Key 9 65507 3866799006
Key 9 65514 3866799006
Key 9 65514 3866799006
Key 8 123 3866799007
Key 8 0 3866799007
Key 8 0 3866799007
Key 8 65514 3866799007
Key 8 65514 3866799007
Key 8 65507 3866799007
Key 8 65507 3866799007
Key 9 65507 3866799007
Key 9 65507 3866799007
Key 9 65514 3866799007
Key 9 65514 3866799007
Key 9 91 3866799007
Key 9 91 3866799007
It is interesting, that the keycode 0 is transmitted by VNC in this case - maybe this the reason for correct decoding. But other applications (Object inspector or terminal) can handle the other cases, too.
At the moment i have no clue, where this is decoded for the code editor.
This behaviour is maybe related to
http://forum.lazarus.freepascal.org/index.php/topic,10281.0.html
http://forum.lazarus.freepascal.org/index.php/topic,11296.msg56685.html#msg56685
Bugtracker issue 0014716
I tried the patch of issue 0014716, but it didn't work for me.
When i give a sequenz in very short time :
altgr down
7 down
altgr up
7 up
then VNC sends the 0 Keycode and decoding works.
If the sequenz is too long, then 7 is decoded.
If the sequenz is :
altgr down
7 down
7 up
altgr up
then no 0 Keycode is sent by VNC and decoding fails.