View Issue Details

IDProjectCategoryView StatusLast Update
0023140LazarusWidgetsetpublic2016-12-11 16:21
Reportere.turishev Assigned ToZeljan Rikalo  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0023140: double charcter input in many text input components
DescriptionIn Lazarus IDE and in compiled application components (TComboBox, TMemo, TEdit)
one key press gives two characters input. ab -> aabb, 123 -> 112233 ...
Only using GTK2 widgets, with QT - OK.
Additional Informationgtk2 2.24.11 archlinux x64
lazarus 1.0 fpc 2.6.0 x86_64-linux-gtk 2
TagsNo tags attached.
Fixed in Revision44697
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0015185 resolvedZeljan Rikalo if envement GTK_IM_MODULE set to scim-bridge, input in lazarus is doubled 
related to 0024990 resolvedJuha Manninen [regression] Ctrl or Shift key repeats the last entered letter 
has duplicate 0031104 resolvedJuha Manninen All keys come twice 
has duplicate 0030863 assignedZeljan Rikalo keys typed in the source editor are duplicated 
related to 0026926 feedbackZeljan Rikalo Problem with doubled chars still exists see Bug 0023140 
related to 0027401 feedbackZeljan Rikalo One keypress, two characters 

Activities

Bart Broersma

2012-10-16 22:51

developer   ~0063215

Do you have GTK_IM_MODULE set to scim-bridge?
See issue 0015185 for details.

e.turishev

2012-10-19 09:45

reporter   ~0063287

I dont have scim-bridge.
I use only scim-gtk, scim, scim-pinyin, scim-libs, scim-tables.

Usually enviroment:
XMODIFIERS=@im=SCIM
GTK_IM_MODULE=scim
QT_IM_MODULE=scim

however I set
bash-4.2$ export GTK_IM_MODULE=
bash-4.2$ export QT_IM_MODULE=
bash-4.2$ export XMODIFIERS=

In that case everything is OK (but I cant input chines characters).
The situation is not normal.

Zeljan Rikalo

2012-10-19 11:31

developer   ~0063293

What happens with "normal" gtk applications when GTK_IM_MODULE is enabled ?
GtkEntry (TEdit) should be handled by gtk when inputting keys, so I'm wondering how LCL can repeat chars in that case .

e.turishev

2012-10-19 12:19

reporter   ~0063294

Last edited: 2012-10-19 12:29

Others GTK2 GTK3 application work fine, and also GTK2-Perl, GTK2-Python apps (system-config-user for example).
Trouble only with LCL-apps (doublecmd http://doublecmd.sourceforge.net/ for example).

I use Fedora 17 x86 and Archlinux x86_64 - the same situation

e.turishev

2012-10-21 07:41

reporter   ~0063335

I comment call CheckDeadKey in function HandleGTKKeyUpDown gtk2proc.pp:2247
rebuild LCL - all work fine.
Latin chars not duplicate and input chines characters with scim also work.

GTK_IM_MODULE=scim

Zeljan Rikalo

2012-10-21 11:54

developer   ~0063342

hm..problem is that I cannot reproduce it with any input method (scim, scim-bridge, xim, iBus, simple).
Please try next: make CheckDeadKey function
function CheckDeadKey: Boolean;
begin
  Result := False;
  ...current code....
  change
  gtk_im_context_filter_keypress (im_context, AEvent);
  to:
  Result := gtk_im_context_filter_keypress (im_context, AEvent);
end;

at the place where CheckDeadKey is called say:
Result := CheckDeadKey;

if that doesn't work correct then try
if CheckDeadKey then
  exit(True);

e.turishev

2012-10-21 18:26

reporter   ~0063356

with line
  if CheckDeadKey then exit(True);
work fine !

latin, russian (keyboard), chines (scim) characters input is OK


I try do similar modification, but with
  if CheckDeadKey then exit;
that did not work;

Zeljan Rikalo

2012-10-22 09:52

developer   ~0063370

But with CheckDeadKey then exit(True) does not work here (with simple input).
So, we must find the way to find out what im_context is used (it does not have any function which returns im name).

Zeljan Rikalo

2014-04-12 11:56

developer   ~0074343

Please test and close if ok.

Issue History

Date Modified Username Field Change
2012-10-16 12:01 e.turishev New Issue
2012-10-16 12:01 e.turishev Widgetset => GTK 2
2012-10-16 22:51 Bart Broersma LazTarget => -
2012-10-16 22:51 Bart Broersma Note Added: 0063215
2012-10-16 22:51 Bart Broersma Status new => feedback
2012-10-19 09:45 e.turishev Note Added: 0063287
2012-10-19 11:31 Zeljan Rikalo Note Added: 0063293
2012-10-19 12:19 e.turishev Note Added: 0063294
2012-10-19 12:21 e.turishev Note Edited: 0063294
2012-10-19 12:29 e.turishev Note Edited: 0063294
2012-10-19 14:06 Bart Broersma Relationship added related to 0015185
2012-10-21 07:41 e.turishev Note Added: 0063335
2012-10-21 11:54 Zeljan Rikalo Note Added: 0063342
2012-10-21 18:26 e.turishev Note Added: 0063356
2012-10-22 09:52 Zeljan Rikalo Note Added: 0063370
2013-09-13 21:18 Martin Friebe Relationship added related to 0024990
2014-04-12 11:56 Zeljan Rikalo Fixed in Revision => 44697
2014-04-12 11:56 Zeljan Rikalo Note Added: 0074343
2014-04-12 11:56 Zeljan Rikalo Status feedback => resolved
2014-04-12 11:56 Zeljan Rikalo Resolution open => fixed
2014-04-12 11:56 Zeljan Rikalo Assigned To => Zeljan Rikalo
2014-10-22 16:20 Reinier Olislagers Relationship added related to 0026926
2015-02-03 23:45 Juha Manninen Relationship added related to 0027401
2016-12-11 15:31 Juha Manninen Relationship added has duplicate 0031104
2016-12-11 16:21 Juha Manninen Relationship added has duplicate 0030863