Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-03

Keyboard handling messed up in LCL (recent change)

19 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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.

Reply by email

JuuS
to Michael Van Canneyt: I don't know how best to explain this problem. Platform: Linux, 64 bit PC. GTK Today, I…

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...

Michael Van Canneyt wrote 52 lines
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 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Michael Van Canneyt
to JuuS
JuuS wrote 7 lines
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.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: I don't know how best to explain this problem. Platform: Linux, 64 bit PC. GTK Today, I…
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/

Reply by email

JuuS
to JuuS: What a coincidence!~ I just wrote a message to board about this...it is ibus. go to…

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.

JuuS wrote 70 lines
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 > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

zeljko
to Michael Van Canneyt: Indeed, it solves the problem. Amazing. I completely de-installed ibus and all problems…
Michael Van Canneyt wrote 20 lines
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

Reply by email

Michael Van Canneyt
to zeljko
zeljko wrote 23 lines
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.

Reply by email

Marc Weustink
to Michael Van Canneyt: No, but I use KDE as a desktop. So I assume it will affect Qt as well. Quite possible one…
Michael Van Canneyt wrote 41 lines
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

Reply by email

Michael Van Canneyt
to Marc Weustink
Marc Weustink wrote 47 lines
On March 21, 2015 2:48:52 PM CET, Michael Van Canneyt 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.

Reply by email

JuuS
to JuuS: While testing RC1 and 2 I followed the suggestion to open a published project and see how…

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?

JuuS wrote 31 lines
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.

Reply by email

Toan Pham
to Michael Van Canneyt: Yes. I noticed ibus plugins for gtk and Qt were installed. That's why I said it is bad…

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.

Reply by email

Giuliano Colla
to Toan Pham

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

Reply by email

Giuliano Colla
to Toan Pham

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?

Reply by email

Michael Van Canneyt
to Giuliano Colla
Giuliano Colla wrote 7 lines
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.

Reply by email

swwei
to Michael Van Canneyt: I don't know how best to explain this problem. Platform: Linux, 64 bit PC. GTK Today, I…

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 by email