View Issue Details

IDProjectCategoryView StatusLast Update
0022703LazarusLCLpublic2014-03-24 16:39
ReporterGiulio Bernardi Assigned ToZeljan Rikalo  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinux x86_64, fpc 2.6.0 OSLinux x86_64  
Product Version1.1 (SVN) 
Summary0022703: CN_SYSCHAR not handled by LCL => some keys don't work in GTK2 SynEdit
DescriptionAs you can see here:
http://frontype.com/keyboarding/540px-Computer-keyboard-Italian.svg.png
on italian keyboards { and } keys are inserted by pressing "Alt Gr" + "Shift" + "è" and "Alt Gr" + "Shift" + "+" respectively. [ and ] keys are inserted with "Alt Gr" + "è" and "Alt Gr" + "+".

Now, while [ and ] work perfectly, on GTK2 SynEdit trying to input { and } does nothing.

After tracing the issue, I discovered that in HandleGTKKeyUpDown (gtk2proc.inc) pressing "Alt Gr" and "Shift" (but not "Alt Gr" alone) causes SysKey to be true: for this reason, when IntfUTF8KeyPress is invoked on the target, no action is performed.
The execution continues where the comment line "send the (Sys)Char message directly (not queued) to the LCL" is, and the message is delivered to the LCL. But since SysKey is true, the delivered message is CN_SYSCHAR, but TWinControl does not handle that, so nothing happens.

I tried to brutally add a CNSysChar method to TWinControl that simply calls CNChar, and now I am able to input { and } in my application. Now I can also enter "{" (but not "}", I don't know why) in lazarus IDE.

Note that other controls (like TEdit) can receive "{" and "}" without problems.
Steps To ReproduceI think that if you change your keyboard layout to Italian and try to input "{" in lazarus Source Editor you may experience the problem too.
TagsNo tags attached.
Fixed in Revision44507
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0025874 closedZeljan Rikalo gtk2 not sending correct KeyPress for brace "{" to TCustomControl 

Activities

Zeljan Rikalo

2014-03-24 16:35

developer   ~0073935

Please test and close if ok.

Issue History

Date Modified Username Field Change
2012-08-22 21:47 Giulio Bernardi New Issue
2012-08-22 21:47 Giulio Bernardi Widgetset => GTK 2
2014-03-24 12:19 Martin Friebe Relationship added related to 0025874
2014-03-24 16:35 Zeljan Rikalo Fixed in Revision => 44507
2014-03-24 16:35 Zeljan Rikalo LazTarget => -
2014-03-24 16:35 Zeljan Rikalo Note Added: 0073935
2014-03-24 16:35 Zeljan Rikalo Status new => resolved
2014-03-24 16:35 Zeljan Rikalo Resolution open => fixed
2014-03-24 16:35 Zeljan Rikalo Assigned To => Zeljan Rikalo