Discussion:
[Lazarus] Lazarus still not usable with VNC under Raspbian
Joe via Lazarus
2018-04-27 09:05:49 UTC
Permalink
Hi, community,

on Pi computers under Raspbian controlled over VNC the Lazarus code
editor doesn't recognize keystrokes with AltGr and therefore characters
like {[]}\ can't be put in. That's a known issue since 2016
(https://bugs.freepascal.org/view.php?id=30544#c107874).

Unfortunately, this report is still unassigned and it seems nobody of
the developers cares about it. So, the 70+ million Raspberry Pi users
all over the world cant' develop Lazarus programs when controlling their
Pis over the VNC Server built into Raspbian.

The contributor of the VNC Server built into Raspian Stretch is RealVNC.
I asked them for help concerning this problem. Yesterday I got this from
Linda, RealVNC Product Support:

"We did manage to reproduce this from Windows with a German keyboard
layout. We can confirm that it only affects this particular application.
Lazarus does appear to discard key events with the same timestamp, which
I think is not correct behaviour, which they would need to fix to make
this work. There's not really much we can do to fix this, since we don't
explicitly generate the timestamps on the events - the X server is doing
this. Given that the X server is ok with sending the key events to the
Lazarus application with the same timestamp, I think it should be
handling this ...
Please log a bug with the Lazarus developer."

Steps to reproduce the problem:
Prepare a SD card with Raspbian Stretch, current version, and boot a Pi
with it. Enable VNC and install Lazarus (current version under Raspian
 is Lazarus 1.6.2). Now, from a Windows 10 computer, using VNCViewer
6.0.3. x64 from RealVNC, connect to the Pi, open Lazarus, click in the
code Editor Window and depress AltGr + {. The charcter is not shown.

Please, could one of the developers have a look at this?

Regards --  Joe
Mattias Gaertner via Lazarus
2018-04-29 06:43:29 UTC
Permalink
On Fri, 27 Apr 2018 11:05:49 +0200
Post by Joe via Lazarus
[...]
on Pi computers under Raspbian controlled over VNC the Lazarus code
editor doesn't recognize keystrokes with AltGr and therefore characters
like {[]}\ can't be put in. That's a known issue since 2016
(https://bugs.freepascal.org/view.php?id=30544#c107874).
I added a comment. Can you help me?

Mattias
--
Joe via Lazarus
2018-04-29 09:56:09 UTC
Permalink
This post might be inappropriate. Click to display it.
Mattias Gaertner via Lazarus
2018-04-29 16:39:44 UTC
Permalink
On Sun, 29 Apr 2018 11:56:09 +0200
Post by Joe via Lazarus
[...]
Unfortunately, actually I don't know how to get and compile Lazarus
code. Is there a step by step introduction anywhere how to do it under
Raspian Stretch or a script helping with this?
Try this:
http://wiki.freepascal.org/Getting_Lazarus#Getting_Lazarus_SVN_development_version


svn co https://lazarus.svn.sourceforge.net/svnroot/lazarus/trunk lazarus
cd lazarus
make clean all OPT=-dLCLGtk2Fix30544
./lazarus

Mattias
--
Joe via Lazarus
2018-05-11 18:30:04 UTC
Permalink
As tested, with revision 57898, the AltGr problem under Raspbian is
fixed now.
Thank you, Mattias and Ondrej.
--  Joe
--

R0b0t1 via Lazarus
2018-04-29 16:00:08 UTC
Permalink
On Fri, Apr 27, 2018 at 4:05 AM, Joe via Lazarus
Post by Joe via Lazarus
Hi, community,
on Pi computers under Raspbian controlled over VNC the Lazarus code editor
doesn't recognize keystrokes with AltGr and therefore characters like {[]}\
can't be put in. That's a known issue since 2016
(https://bugs.freepascal.org/view.php?id=30544#c107874).
This sounds like an issue with VNC. Can you ask there? VNC needs to
accurately reproduce what you are typing for Lazarus to see it.

Cheers,
R0b0t1
--
Bo Berglund via Lazarus
2018-04-30 15:44:01 UTC
Permalink
On Fri, 27 Apr 2018 11:05:49 +0200, Joe via Lazarus
Post by Joe via Lazarus
on Pi computers under Raspbian controlled over VNC the Lazarus code
editor doesn't recognize keystrokes with AltGr and therefore characters
like {[]}\ can't be put in. That's a known issue since 2016
(https://bugs.freepascal.org/view.php?id=30544#c107874).
In actual fact it is older than this....
I stareted a few threads on this very issue years ago:

2015-10-11: "Lazarus eats comment characters using Swedish keyboard"
2015-10-24: "Clipboard problem with Lazarus using VNC"
2016-02-24: "Keys not recognized by Lazarus 1.6 code editor"

I made extensive tests to narrow down the problem and it condenses to
this:

1) Appears when the Raspberry Pi is accessed via VNC (TightVNC in
these discussions, I never tested RealVNC at the time).
When using the RPi in console mode with a display and keyboard
attached there are no problems at all.

2) Problem: The non-US characters cannot be entered into the Lazarus
code editor window, nothing at all happens when one tries.

3) But in the Lazarus property editor window they arrive just fine!
So Lazarus itself can handle them but the code editor apparently
discards these characters if sent via VNC.

4) In all other editors or other applications I tested that are
bundled with Raspbian there are no problems whatsoever with these
characters. So the characters are properly supplied to the operating
system and should appear inside Lazarus as well, but do no.

5) There is also a clipboard problem, where the copied text needs to
be passed through for example GEdit in order to be possible to paste
into the Lazarus code editor

Since the community was not able to come up with a solution I have had
to use the GEdit trick such that I open a Gedit window in Raspbian and
there I enter the problem characters. Then when I need them in Lazarus
I switch to GEdit, copy the appropriate character and then return to
the Lazarus code editor to paste it in. This works, but is a bit of a
tedious workaround.
--
Bo Berglund
Developer in Sweden

--
Joe via Lazarus
2018-04-30 21:54:38 UTC
Permalink
Post by Bo Berglund via Lazarus
Since the community was not able to come up with a solution I have had
to use the GEdit trick such that I open a Gedit window in Raspbian and
there I enter the problem characters.
Bo, there is another (ugly?) work around:

In the code editor, type Control+Shift+M to open the Character Map, and
in this map click on the character you want to insert.

--  Joe
--
Joe via Lazarus
2018-05-02 11:43:24 UTC
Permalink
The same or a similar problem I see using Lazarus 1.6 under Ubuntu 16.04
LTS, running X11 VNC Server 0.9.13-1.2build1.

I connected from a windows 10 computer with VNCViewer 6.1.0 from RealVNC
to the Ubuntu machine, opened Lazarus and tried to insert a '[' char
with AltGr+8 in the Lazarus code editor window. Alternately, no char or
wrong chars were inserted. The same happened, when I tried to insert
other AltGr combinations like { and ].

Added a note to case 30544 in the Lazarus Bug Tracker.

-- Joe
--
Joe via Lazarus
2018-05-02 11:56:17 UTC
Permalink
The same or a similar problem I see using Lazarus 1.6 under Ubuntu 16.04
LTS, running X11 VNC Server 0.9.13-1.2build1.

I connected from a windows 10 computer with VNCViewer 6.1.0 from RealVNC
to the Ubuntu machine, opened Lazarus and tried to insert a '[' char
with AltGr+8 in the Lazarus code editor window. Alternately, no char or
wrong chars were inserted. The same happened, when I tried to insert
other AltGr combinations like { and ]. Country and keyboards settings on
both machines: Germany.

Added a note to case 30544 in the Lazarus Bug Tracker.

-- Joe
Joe via Lazarus
2018-05-02 16:12:39 UTC
Permalink
Post by Joe via Lazarus
The same or a similar problem I see using Lazarus 1.6 under Ubuntu
16.04 LTS, running X11 VNC Server 0.9.13-1.2build1.
Under Ubuntu 18.04 LTS with Lazarus 1.8.2+dfsg-3 and FPC 3-04 the AltGr
keystroke combinations work fine. Same VNC-Server and VNC-Viewer.
--  Joe
--
Loading...