View Issue Details

IDProjectCategoryView StatusLast Update
0029432LazarusIDEpublic2021-02-28 14:59
Reporteruser268Assigned To 
Status newResolutionopen 
Product Version1.6RC1 
Summary0029432: Pressing 'm' in source editor form produce CRLF
DescriptionIn source editor, any press on 'm' is the same as pressing ENTER.

Debian release 1.6RC1 and 1.6RC2, FPC 3.0.0
Steps To Reproducevar
  temp: integer;

Result after typing:

p: integer;
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


related to 0029377 new LCL/all widgetset: ctrl flag is set in shift mask, after ctrl was released [[Now Ctrl, then Down give same keypress as Ctrl+Down 
related to 0029431 resolvedBart Broersma Duplicated characters in TEdit instances 
related to 0027401 feedbackZeljan Rikalo One keypress, two characters 
related to 0030863 assignedZeljan Rikalo keys typed in the source editor are duplicated 
has duplicate 0037430 resolvedMartin Friebe wrong in source code editor 



2016-01-17 14:31

reporter   ~0088991

Are you perhaps using hypervisor/virtualization environment software like VirtualBox? If so, try to repress host key and see if bug goes away.


2016-01-17 14:40


Not certain. Default installation of Kubuntu 14.04 LTS with only latest updates.

It behaves the same on any live distribution as: Mint, Ubuntu, Lubuntu and similar.

Bart Broersma

2016-01-17 16:01

developer   ~0088997

If I'm not istaken there is already a report about this.

Martin Friebe

2016-01-19 14:27

manager   ~0089069

Seems like it thinks it is ctrl-m

See related issue, can you reproduce that too?


2016-01-19 14:45


Last edited: 2016-01-19 14:50

View 4 revisions


This have nothing related with 0029377. Please do not speculate, but simply follow the description. Otherwise, please delete the ticket and I will avoid any further effort in order to help development. Lazarus is still far out from stable product, at least on Linux.

Martin Friebe

2016-01-19 15:48

manager   ~0089072

It is not a duplicate, so we do need 2 tickets.

But there could be a relationship. ctrl-m on some systems is a replacment for enter. It is not in SynEdit (least not in the IDE), but we do not know where in the key handling it goes wrong.

Bart Broersma

2016-01-19 15:59

developer   ~0089073

Does this happen in compiled programs as well with a TSynEdit and with a TMemo?


2016-01-19 16:36


Last edited: 2016-01-19 16:42

View 3 revisions

Again, this have nothing related with 0029377.

This is related with:

I have tested now, placed one TEdit and one TSynEdit.

1. If started with ./test
  - In TEdit instance on pressing text in description doubled characters are shown as reported in 0029431, including 'mm' (not CRLF)
  - In TSynEdit, all is the same as reported in description and IDE source editor

2. If started with GTK_IM_MODULE=ibus ./test, both inputs are correct.

When you fix this confusion with GTK_IM_MODULE, this problem will also be fixed.

BTW, is there a way to force usage of ibus inside application code (FormCreate or similar)? If yes, that would be enough as temporary solution.

At this Kubuntu environment, GTK_IM_MODULE value is 'xim'.


2017-03-16 23:11

reporter   ~0098951

Same issue here with Version 1.6.4, Lubuntu 16.04LTS

I changed the, which resolves the double chars:

function BlackListIMModule: boolean;
    cBlackList = 'scim-bridge,scim,xim';
    sVar: string;
    sVar := g_getenv('GTK_IM_MODULE');
    Result := Pos(','+sVar+',', ','+cBlackList+',')>0;
    // Result := g_getenv('GTK_IM_MODULE') = 'scim-bridge';
    Result := False;

A 'm' inserts a Ctrl-M, a 'M' the char 'M'. Starting with a script which exports GTK_IM_MODULE=ibus it seems that all inputs are correct.

export GTK_IM_MODULE=ibus
cd /home/tom/projects
./lazarus/startlazarus $1

Zeljan Rikalo

2017-06-03 15:12

developer   ~0100833

Please test against trunk with patch I've attached to (gtk2_im_module_fix.diff)


2020-04-10 21:00

reporter   ~0122064

Seeing this same issue with the 'fixes' versions as installed on 10th April 2020 by fpcupdeluxe, Lazarus version 2.0.7 svn revision 62901 and FPC 3.2.0, Linux Mint 64-bit v 19.3 with XFCE desktop, AMD 64 Phenom X2. Lower case 'm' produces a ctrl-M, upper case 'M' works as expected, lower case 'i' produces a tab AND an 'i', upper case 'I' works as expected. I've not been able to duplicate this in any other application, it's specific to Lazarus, and I'm just using a vanilla desktop environment, no VM or remote access or anything like that.

Issue History

Date Modified Username Field Change
2016-01-17 14:25 user268 New Issue
2016-01-17 14:31 Cyrax Note Added: 0088991
2016-01-17 14:40 user268 Note Added: 0088992
2016-01-17 16:01 Bart Broersma Note Added: 0088997
2016-01-19 03:47 Martin Friebe Relationship added related to 0029377
2016-01-19 14:27 Martin Friebe Note Added: 0089069
2016-01-19 14:45 user268 Note Added: 0089070
2016-01-19 14:45 user268 Note Edited: 0089070 View Revisions
2016-01-19 14:47 user268 Note Edited: 0089070 View Revisions
2016-01-19 14:50 user268 Note Edited: 0089070 View Revisions
2016-01-19 15:48 Martin Friebe Note Added: 0089072
2016-01-19 15:59 Bart Broersma Note Added: 0089073
2016-01-19 16:36 user268 Note Added: 0089074
2016-01-19 16:39 user268 Note Edited: 0089074 View Revisions
2016-01-19 16:42 user268 Note Edited: 0089074 View Revisions
2016-01-19 17:36 Juha Manninen Relationship added related to 0029431
2016-01-19 17:52 Bart Broersma Relationship added related to 0027401
2017-03-16 23:11 Tom Note Added: 0098951
2017-06-03 15:12 Zeljan Rikalo Note Added: 0100833
2017-06-03 16:48 Juha Manninen Relationship added related to 0030863
2020-04-10 21:00 Brian_Meadows Note Added: 0122064
2020-07-28 18:43 Martin Friebe Relationship added related to 0037430
2021-02-28 14:59 Juha Manninen Relationship replaced has duplicate 0037430