[Lazarus] Keyboard handling messed up in LCL (recent change)

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Keyboard handling messed up in LCL (recent change)

Michael Van Canneyt

Gentlemen,

I don't know how best to explain this problem.

Platform: Linux, 64 bit PC. GTK

Today, I started a recent lazarus 1.5 on a new PC and started working in it.
After some time I noticed the m key (on an azerty keyboard) no longer worked in the source editor.
Prior to that I had not touched the M key.

In synedit, The M behaves as a 'ctrl-m' key: a CR (^13) is inserted !
I know the synedit is a bit special. So I decided to test the key in another edit control.

Pressing shift-M works as expected and inserts a capital M.

When typing in the "project options", "title" option edit control, I got double m characters.

So, I then updated lazarus from SVN to todays version and recompiled. The problem persisted.
Then, when typing in any edit box, now I get double letters (a -> aa etc)

as soon as I touch the m key, all input just stops, I can no longer edit anything.
Restarting lazarus allows me to type characters, until I touch the M key outside of synedit.

I had several older lazarus binaries on this machine, so I tried that: there the 'm' key works fine.

The strange thing is, if I go to 'keyboard mappings' 'Find key combination' and press 'Grab key'
then the key is displayed fine.

The m key works as expected in all other programs:
I am typing this mail on the same machine, and the M key works just fine.

All this makes me pretty confident it is a Lazarus issue, probably trying to handle the
CTRL-M (CR) key in some special (global) way.

Suggestions for fixing this ?

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Bart
On 3/21/15, Michael Van Canneyt <[hidden email]> wrote:

> When typing in the "project options", "title" option edit control, I got
> double m characters.

Maybe related to http://bugs.freepascal.org/view.php?id=15185 ?

Bart

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

JuuS
In reply to this post by Michael Van Canneyt
What a coincidence!~

I just wrote a message to board about this...it is ibus.

go to terminal: type: ibus exit

Your problems will go away...



On 03/21/2015 11:26 AM, Michael Van Canneyt wrote:

>
> Gentlemen,
>
> I don't know how best to explain this problem.
>
> Platform: Linux, 64 bit PC. GTK
>
> Today, I started a recent lazarus 1.5 on a new PC and started working in
> it. After some time I noticed the m key (on an azerty keyboard) no
> longer worked in the source editor.
> Prior to that I had not touched the M key.
>
> In synedit, The M behaves as a 'ctrl-m' key: a CR (^13) is inserted !
> I know the synedit is a bit special. So I decided to test the key in
> another edit control.
>
> Pressing shift-M works as expected and inserts a capital M.
>
> When typing in the "project options", "title" option edit control, I got
> double m characters.
>
> So, I then updated lazarus from SVN to todays version and recompiled.
> The problem persisted.
> Then, when typing in any edit box, now I get double letters (a -> aa etc)
>
> as soon as I touch the m key, all input just stops, I can no longer edit
> anything.
> Restarting lazarus allows me to type characters, until I touch the M key
> outside of synedit.
>
> I had several older lazarus binaries on this machine, so I tried that:
> there the 'm' key works fine.
>
> The strange thing is, if I go to 'keyboard mappings' 'Find key
> combination' and press 'Grab key' then the key is displayed fine.
>
> The m key works as expected in all other programs:
> I am typing this mail on the same machine, and the M key works just fine.
>
> All this makes me pretty confident it is a Lazarus issue, probably
> trying to handle the
> CTRL-M (CR) key in some special (global) way.
>
> Suggestions for fixing this ?
>
> Michael.
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Michael Van Canneyt


On Sat, 21 Mar 2015, JuuS wrote:

> What a coincidence!~
>
> I just wrote a message to board about this...it is ibus.
>
> go to terminal: type: ibus exit
>
> Your problems will go away...

Indeed, it solves the problem. Amazing.
I completely de-installed ibus and all problems are solved.
Must have been pulled in with some program I installed (I suspect gnome-music) recently.

@Laz team:
How to explain that Lazarus (in Fact LCL programs, I tested that) are the only programs
affected, is IBus used in Lazarus on linux ? Or is it an artifact of GTK and QT ?

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Graeme Geldenhuys-3
In reply to this post by Michael Van Canneyt
On 2015-03-21 10:26, Michael Van Canneyt wrote:
> I don't know how best to explain this problem.

Funny you mention this (strange is why I didn't report it). I've also
updated my Lazarus this week and Ctrl+O stopped working - yet in other
programs like Firefox or gEdit it works just fine. Pressing the O key on
its own worked and Alt+O worked. I think the issue is with the Ctrl key.
Because Ctrl+Z was acting as if the Tab key was pressed. This drove me nuts

I was using CentOS 6.6 64-bit and Lazarus IDE compiled with GTK2.

No matter how many times I recompiled the IDE, the problem didn't go
away. I eventually found a work-around and that was to switch my
keyboard layout in Gnome. Toggling between two layouts (Qwerty & Dvorak)
and it corrected itself. If this is going to last, I don't know.

Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Default ico handling and recent debugger errors

JuuS
In reply to this post by JuuS

While testing RC1 and 2 I followed the suggestion to open a published
project and see how the release candidates were doing with them.

Upon doing this I got an immediate debugger error, which has been traced
down now (as of last night) with the help of Martin and is fixed.

The problems origins were (and still are to some extent)...weird.

Before a debugger solution was found I could stop the error by simply
removing the "default icon" line from the published project's LPI file,
then no debugger error.

During all the research I could see that while the LPI file had a
"default icon" line, the publishing process did not copy the ico file to
the published diretory.

So there was always a background silent error due to the fact that the
icon file didn't exist, the silent exception (seen when debugging
Lazarus) was on trying to open this nonexisting file.

How this all caused the debugger error is, as I have said, still not
entirely understood.

So it just brings to my mind that even though this error has no effect
in most cases it may be best to either copy the ico file on publishing
the project, or not writing a "default icon" line in LPI, or checking
that the ico file actually does exist and recreating it if not; just in
case it has other effects that will cause other "weird" errors down the
line.




On 03/21/2015 02:04 PM, JuuS wrote:

> What a coincidence!~
>
> I just wrote a message to board about this...it is ibus.
>
> go to terminal: type: ibus exit
>
> Your problems will go away...
>
>
>
> On 03/21/2015 11:26 AM, Michael Van Canneyt wrote:
>>
>> Gentlemen,
>>
>> I don't know how best to explain this problem.
>>
>> Platform: Linux, 64 bit PC. GTK
>>
>> Today, I started a recent lazarus 1.5 on a new PC and started working in
>> it. After some time I noticed the m key (on an azerty keyboard) no
>> longer worked in the source editor.
>> Prior to that I had not touched the M key.
>>
>> In synedit, The M behaves as a 'ctrl-m' key: a CR (^13) is inserted !
>> I know the synedit is a bit special. So I decided to test the key in
>> another edit control.
>>
>> Pressing shift-M works as expected and inserts a capital M.
>>
>> When typing in the "project options", "title" option edit control, I got
>> double m characters.
>>
>> So, I then updated lazarus from SVN to todays version and recompiled.
>> The problem persisted.
>> Then, when typing in any edit box, now I get double letters (a -> aa etc)
>>
>> as soon as I touch the m key, all input just stops, I can no longer edit
>> anything.
>> Restarting lazarus allows me to type characters, until I touch the M key
>> outside of synedit.
>>
>> I had several older lazarus binaries on this machine, so I tried that:
>> there the 'm' key works fine.
>>
>> The strange thing is, if I go to 'keyboard mappings' 'Find key
>> combination' and press 'Grab key' then the key is displayed fine.
>>
>> The m key works as expected in all other programs:
>> I am typing this mail on the same machine, and the M key works just fine.
>>
>> All this makes me pretty confident it is a Lazarus issue, probably
>> trying to handle the
>> CTRL-M (CR) key in some special (global) way.
>>
>> Suggestions for fixing this ?
>>
>> Michael.
>>
>> --
>> _______________________________________________
>> Lazarus mailing list
>> [hidden email]
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

zeljko
In reply to this post by Michael Van Canneyt
On 03/21/2015 02:19 PM, Michael Van Canneyt wrote:

>
>
> On Sat, 21 Mar 2015, JuuS wrote:
>
>> What a coincidence!~
>>
>> I just wrote a message to board about this...it is ibus.
>>
>> go to terminal: type: ibus exit
>>
>> Your problems will go away...
>
> Indeed, it solves the problem. Amazing. I completely de-installed ibus
> and all problems are solved.
> Must have been pulled in with some program I installed (I suspect
> gnome-music) recently.
>
> @Laz team: How to explain that Lazarus (in Fact LCL programs, I tested
> that) are the only programs affected, is IBus used in Lazarus on linux ?
> Or is it an artifact of GTK and QT ?

1.Have you tested with Qt ?
2.Nobody implemented ibus methods for gtk2 and qt.

zeljko


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Michael Van Canneyt


On Sat, 21 Mar 2015, zeljko wrote:

> On 03/21/2015 02:19 PM, Michael Van Canneyt wrote:
>>
>>
>> On Sat, 21 Mar 2015, JuuS wrote:
>>
>>> What a coincidence!~
>>>
>>> I just wrote a message to board about this...it is ibus.
>>>
>>> go to terminal: type: ibus exit
>>>
>>> Your problems will go away...
>>
>> Indeed, it solves the problem. Amazing. I completely de-installed ibus
>> and all problems are solved.
>> Must have been pulled in with some program I installed (I suspect
>> gnome-music) recently.
>>
>> @Laz team: How to explain that Lazarus (in Fact LCL programs, I tested
>> that) are the only programs affected, is IBus used in Lazarus on linux ?
>> Or is it an artifact of GTK and QT ?
>
> 1.Have you tested with Qt ?

No, but I use KDE as a desktop. So I assume it will affect Qt as well.

Quite possible one must scratch Qt from the above :)

> 2.Nobody implemented ibus methods for gtk2 and qt.

So in fact the presence of ibus must be detected and corrective action must be taken ?
That would be bad news :(

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

zeljko
> So in fact the presence of ibus must be detected and corrective action
> must be taken ?

Yes.

zeljko

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Marc Weustink-3
In reply to this post by Michael Van Canneyt


On March 21, 2015 2:48:52 PM CET, Michael Van Canneyt <[hidden email]> wrote:

>
>
>On Sat, 21 Mar 2015, zeljko wrote:
>
>> On 03/21/2015 02:19 PM, Michael Van Canneyt wrote:
>>>
>>>
>>> On Sat, 21 Mar 2015, JuuS wrote:
>>>
>>>> What a coincidence!~
>>>>
>>>> I just wrote a message to board about this...it is ibus.
>>>>
>>>> go to terminal: type: ibus exit
>>>>
>>>> Your problems will go away...
>>>
>>> Indeed, it solves the problem. Amazing. I completely de-installed
>ibus
>>> and all problems are solved.
>>> Must have been pulled in with some program I installed (I suspect
>>> gnome-music) recently.
>>>
>>> @Laz team: How to explain that Lazarus (in Fact LCL programs, I
>tested
>>> that) are the only programs affected, is IBus used in Lazarus on
>linux ?
>>> Or is it an artifact of GTK and QT ?
>>
>> 1.Have you tested with Qt ?
>
>No, but I use KDE as a desktop. So I assume it will affect Qt as well.
>
>Quite possible one must scratch Qt from the above :)
>
>> 2.Nobody implemented ibus methods for gtk2 and qt.
>
>So in fact the presence of ibus must be detected and corrective action
>must be taken ?
>That would be bad news :(
>

Weird, that having an im I installed but not used affects keypress handling. This means it is deeply hooked into gtk/x.
Before we receive the keypresses. :(

Marc

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Michael Van Canneyt


On Sat, 21 Mar 2015, Marc Weustink wrote:

>
>
> On March 21, 2015 2:48:52 PM CET, Michael Van Canneyt <[hidden email]> wrote:
>>
>>
>> On Sat, 21 Mar 2015, zeljko wrote:
>>
>>> On 03/21/2015 02:19 PM, Michael Van Canneyt wrote:
>>>>
>>>>
>>>> On Sat, 21 Mar 2015, JuuS wrote:
>>>>
>>>>> What a coincidence!~
>>>>>
>>>>> I just wrote a message to board about this...it is ibus.
>>>>>
>>>>> go to terminal: type: ibus exit
>>>>>
>>>>> Your problems will go away...
>>>>
>>>> Indeed, it solves the problem. Amazing. I completely de-installed
>> ibus
>>>> and all problems are solved.
>>>> Must have been pulled in with some program I installed (I suspect
>>>> gnome-music) recently.
>>>>
>>>> @Laz team: How to explain that Lazarus (in Fact LCL programs, I
>> tested
>>>> that) are the only programs affected, is IBus used in Lazarus on
>> linux ?
>>>> Or is it an artifact of GTK and QT ?
>>>
>>> 1.Have you tested with Qt ?
>>
>> No, but I use KDE as a desktop. So I assume it will affect Qt as well.
>>
>> Quite possible one must scratch Qt from the above :)
>>
>>> 2.Nobody implemented ibus methods for gtk2 and qt.
>>
>> So in fact the presence of ibus must be detected and corrective action
>> must be taken ?
>> That would be bad news :(
>>
>
> Weird, that having an im I installed but not used affects keypress handling. This means it is deeply hooked into gtk/x.
> Before we receive the keypresses. :(

Yes. I noticed ibus plugins for gtk and Qt were installed.
That's why I said it is bad news :(

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Default ico handling and recent debugger errors

JuuS
In reply to this post by JuuS

A bit more information on this topic if anyone is interested.

The debugger error occurred on three machines (however all three are
Kubuntu 14.04's).

I tried a test with a debug Lazarus IDE itself on one of the other
machines that still has the unfixed debugger unit. Making sure the
Lazarus IDE was shut down I renamed lazarus.ico to lazarus.xxxico.

I then opened lazarus (the missing ico file exception is silent) and
then tried to run lazarus IDE as a slave from this master. And the
debugger error comes up immediately and the IDE is broken.

Again this won't happen if the new debugger code has been added to the
system.

It just seems to me this may be of interest in that it caused such a
fatal error in debugging and breaks the program. Maybe it has other
unforeseen effects?

Can anyone reproduce or is is just my Universe?


On 03/21/2015 02:32 PM, JuuS wrote:

>
> While testing RC1 and 2 I followed the suggestion to open a published
> project and see how the release candidates were doing with them.
>
> Upon doing this I got an immediate debugger error, which has been traced
> down now (as of last night) with the help of Martin and is fixed.
>
> The problems origins were (and still are to some extent)...weird.
>
> Before a debugger solution was found I could stop the error by simply
> removing the "default icon" line from the published project's LPI file,
> then no debugger error.
>
> During all the research I could see that while the LPI file had a
> "default icon" line, the publishing process did not copy the ico file to
> the published diretory.
>
> So there was always a background silent error due to the fact that the
> icon file didn't exist, the silent exception (seen when debugging
> Lazarus) was on trying to open this nonexisting file.
>
> How this all caused the debugger error is, as I have said, still not
> entirely understood.
>
> So it just brings to my mind that even though this error has no effect
> in most cases it may be best to either copy the ico file on publishing
> the project, or not writing a "default icon" line in LPI, or checking
> that the ico file actually does exist and recreating it if not; just in
> case it has other effects that will cause other "weird" errors down the
> line.
>


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Toan Pham
In reply to this post by Michael Van Canneyt
I am also affected by the keyboard issue.  This issue affects the two
version of lazarus I've tested (1.2.4 & 1.4.0), and both 32bit & 64bit
OSes.  I did not know it was ibus until I read this mailing list.
Thank you for sharing guys.


Michael, as for me, I also find that if I run lazarus as root,
keyboard input would work fine.  I am still suspecting that the bug is
in lazarus for this reason.  When you have time, would you please test
with ibus enabled, and run lazarus as root?  thank you.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Giuliano Colla
Il 14/05/2015 16:59, Toan Pham ha scritto:
> I am also affected by the keyboard issue.  This issue affects the two
> version of lazarus I've tested (1.2.4 & 1.4.0), and both 32bit & 64bit
> OSes.  I did not know it was ibus until I read this mailing list.
> Thank you for sharing guys.

It's a known issue of Ubuntu 14, which messed up ibus input methods.
You should locate where input methods are defined (somewhere in keyboard
settings) and set to "none", unless you need a specific one.
If you do, just hope that your input method isn't one of those which
have been messed up, or google for an update!

Giuliano

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Toan Pham
> It's a known issue of Ubuntu 14

This bug also exists in Ubuntu 15, vivid.  I am not sure of the
root-cause (not just settings related), it could be in GTK+.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Giuliano Colla
Il 14/05/2015 23:31, Toan Pham ha scritto:
> This bug also exists in Ubuntu 15, vivid.  I am not sure of the
> root-cause (not just settings related), it could be in GTK+.

You could rule out GTK by compiling the IDE with Qt WS, and switching to
KDE desktop (which is Qt based).
If it's just a GTK issue, you wouldn't have anything GTK related in the way.

Giuliano


--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Michael Van Canneyt


On Fri, 15 May 2015, Giuliano Colla wrote:

> Il 14/05/2015 23:31, Toan Pham ha scritto:
>> This bug also exists in Ubuntu 15, vivid.  I am not sure of the
>> root-cause (not just settings related), it could be in GTK+.
>
> You could rule out GTK by compiling the IDE with Qt WS, and switching to KDE
> desktop (which is Qt based).
> If it's just a GTK issue, you wouldn't have anything GTK related in the way.

I had the problem too, on KDE. I just disabled ibus.

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

swwei
In reply to this post by Michael Van Canneyt
Yes, I got the some problem today. While I'm busy with my time pressing software project, all of sudden, I found my m-key became a <CR> key. I've tried every possible way I can think of to fix it, but in vain.

Interesting enough, I happen to have another version of Lazarus installed under the same user account with  its own configuration directory.  so I turned to that version, to see if it is OK. And I found out it now had the same problem.  

My guess is somehow Lazarus mess up user's GTK environment setting file(s).

My temporary solution is switching to another user account, rebuilt my project there to keep my work going.

Very annoying, Indeed!  It's not a minor bug!
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Keyboard handling messed up in LCL (recent change)

Free Pascal - Lazarus mailing list
On 29/03/2017 06:14, swwei via Lazarus wrote:
> Yes, I got the some problem today. While I'm busy with my time pressing
> software project, all of sudden, I found my m-key became a <CR> key. I've
> tried every possible way I can think of to fix it, but in vain.
>
http://bugs.freepascal.org/view.php?id=29432

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus