Re: [Lazarus] Lazarus eats comment characters using Swedish keyboard

2015-10-11 Thread Mark Morgan Lloyd

Martin Frb wrote:

On 11/10/2015 17:33, Bo Berglund wrote:

I have investigated further now and when I use the Pi directly
(monitor connected to Pi and keyboard/mouse too) then the {} keys do
work.
When I noticed the problem I was using TightVNC to remotely access the
GUI. So somehow VNC might be involved here.



http://bugs.freepascal.org/view.php?id=17820

Never had time to work on it, and probably wont have anytime soon.

See note in bug. I dont know if same timestamp is allowed or if that is 
an issue in VNC. But in the LCL (for any custom control) it is 
interpreted as, this is the same keystroke, therefore it was already 
handled.


There's been an issue with shift keys- particularly multiple shift keys- 
in VNC for a long time, and I think that more testing is in order before 
blaming Lazarus.


Specifically, back in the Delphi days I'd use a doubleclick on something 
with three shift keys pressed to enter "guru mode" (e.g. to resize 
windows that were normally locked), and I'm pretty sure that when I 
started accessing our application servers over VNC I had to relax this 
to any two shift keys.


If there's a shift-key problem under VNC, but it does not show up with 
any non-VNC connection (i.e. local X11 session, remote X11 session using 
e.g. XDMCP, or X11 tunneled over SSH) then it's definitely not a Lazarus 
issue.


If a Lazarus/LCL program works properly on a local X11 session, and 
there's shift key problems over one or more of the remote X11 connection 
types (remote using e.g. XDMCP, X11 tunneled over SSH) then it's 
probably worth looking whether anything in Lazarus or the LCL could be 
improved.


There's at least two VNC implementations in Debian and derivatives: Real 
VNC on everything except ARM as the default, and TightVNC on (I think) 
almost everything; there's also RDP implementations in most desktop 
environments for remote support purposes. The open source RealVNC 
implementation is now falling behind reality, VNC (Ltd, or Inc, or 
whatever they call themselves) are only maintaining a closed source 
version although I believe binaries are available for free download for 
small-scale use. I don't know to what extent TightVNC is in a better 
position.


If this continues to be a problem for anybody, I'd suggest duplicating 
it on an x86 system using RealVNC, and then seeing if it's fixed in 
their closed-source version. If it is, then confer with the Debian 
(etc.) VNC maintainers.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus eats comment characters using Swedish keyboard

2015-10-11 Thread Martin Frb

On 11/10/2015 17:33, Bo Berglund wrote:

I have investigated further now and when I use the Pi directly
(monitor connected to Pi and keyboard/mouse too) then the {} keys do
work.
When I noticed the problem I was using TightVNC to remotely access the
GUI. So somehow VNC might be involved here.



http://bugs.freepascal.org/view.php?id=17820

Never had time to work on it, and probably wont have anytime soon.

See note in bug. I dont know if same timestamp is allowed or if that is 
an issue in VNC. But in the LCL (for any custom control) it is 
interpreted as, this is the same keystroke, therefore it was already 
handled.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus eats comment characters using Swedish keyboard

2015-10-11 Thread Bo Berglund
On Sun, 11 Oct 2015 14:40:50 +0100, Martin Frb 
wrote:

>On 10/10/2015 23:33, Bo Berglund wrote:
>> I wanted to comment out a number of lines so I hit the key combination
>> to produce the { } pair. But nothing was printed in the Lazarus
>> editor.
>> If I switched to the text editor in the GUI the keys produced the
>> wanted characters.
>>
>> So something in Lazarus eats the key presses needed in Sweden to
>> produce the braces (RightAlt-7 and RightAlt-0).
>> Is there a configuration somewhere to stop this from happening so one
>> can enter comments in Lazarus?
>>
>This sometimes happens, if the key combo matches a configured shortcut. 
>You can check this in tools > options> editor > keyboard
>
>Right Alt = AltGr ? that is usually seen as equal to ctrl-alt.
>
>Though I am not aware of anything an ctrl-alt 7 or 0 by default. 
>Bookmarks are on ctrl-0 to 9. Maybe test this, set bookmark 7 and see if 
>your key combo jumps there.

Yes, what I meant was the AltGr key to the right of the space key.

I have investigated further now and when I use the Pi directly
(monitor connected to Pi and keyboard/mouse too) then the {} keys do
work.
When I noticed the problem I was using TightVNC to remotely access the
GUI. So somehow VNC might be involved here.
OTOH, to safeguard against that I tried with the Raspbian text editor
in the VNC controlled GUI and there were no problems in that editor.
Only the Lazarus code editor shows this.

Another observation:
If I select a button on a form and go to the Caption property (n.b.
inside Lazarus) the { can be entered as a caption character!

I guess that there must be some key mapping in Lazarus that does this,
but I have not even looked at any customization of Lazarus yet...


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus eats comment characters using Swedish keyboard

2015-10-11 Thread Martin Frb

On 10/10/2015 23:33, Bo Berglund wrote:

I wanted to comment out a number of lines so I hit the key combination
to produce the { } pair. But nothing was printed in the Lazarus
editor.
If I switched to the text editor in the GUI the keys produced the
wanted characters.

So something in Lazarus eats the key presses needed in Sweden to
produce the braces (RightAlt-7 and RightAlt-0).
Is there a configuration somewhere to stop this from happening so one
can enter comments in Lazarus?

This sometimes happens, if the key combo matches a configured shortcut. 
You can check this in tools > options> editor > keyboard


Right Alt = AltGr ? that is usually seen as equal to ctrl-alt.

Though I am not aware of anything an ctrl-alt 7 or 0 by default. 
Bookmarks are on ctrl-0 to 9. Maybe test this, set bookmark 7 and see if 
your key combo jumps there.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus eats comment characters using Swedish keyboard

2015-10-11 Thread Mark Morgan Lloyd

Bo Berglund wrote:

A problem surfaced just a moment ago...
I was writing code in Lazarus ver 1.5 running on a Raspberry Pi2 with
Raspbian Jessie.
I wanted to comment out a number of lines so I hit the key combination
to produce the { } pair. But nothing was printed in the Lazarus
editor.
If I switched to the text editor in the GUI the keys produced the
wanted characters.

So something in Lazarus eats the key presses needed in Sweden to
produce the braces (RightAlt-7 and RightAlt-0).
Is there a configuration somewhere to stop this from happening so one
can enter comments in Lazarus?


Is it only those, or are any of the other keys that require  affected?

This sounds unfortunate since some things only with with { } comment 
markers rather than (* *).


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus