diff --git a/lcl/interfaces/gtk/gtkdefines.inc b/lcl/interfaces/gtk/gtkdefines.inc index fa7a521688..549a7621fb 100644 --- a/lcl/interfaces/gtk/gtkdefines.inc +++ b/lcl/interfaces/gtk/gtkdefines.inc @@ -40,7 +40,9 @@ keyboardlayouts are used. With UseOwnShiftState we keep track of the shiftate ourself *) +{$IFNDEF EnableGtkShiftState} {$define UseOwnShiftState} +{$ENDIF} (* keep track of keystates instead of using OS diff --git a/lcl/interfaces/gtk/gtkproc.inc b/lcl/interfaces/gtk/gtkproc.inc index c99e7d6f0b..f1c60eda86 100644 --- a/lcl/interfaces/gtk/gtkproc.inc +++ b/lcl/interfaces/gtk/gtkproc.inc @@ -2273,6 +2273,7 @@ begin Flags := 0; SysKey := False; ShiftState := GTKEventStateToShiftState(AEvent^.state); + //DebugLn(['HandleGTKKeyUpDown AEvent^.state=',hexstr(AEvent^.state,4),' ',dbgs(ShiftState)]); {$ifdef gtk1} KeyCode := XKeysymToKeycode(gdk_display, AEvent^.keyval); {$else} diff --git a/lcl/interfaces/gtk/gtkproc.pp b/lcl/interfaces/gtk/gtkproc.pp index 89687caf98..5c7305e4d9 100644 --- a/lcl/interfaces/gtk/gtkproc.pp +++ b/lcl/interfaces/gtk/gtkproc.pp @@ -813,7 +813,7 @@ var MVKeyInfo: array[Byte] of TVKeyInfo; // Modifier keys can be set by a modmap and don't have to be the same on all systems - // Some defaults are set here incase we didn't find them + // Some defaults are set here in case we didn't find them type TModifier = record Mask: TGdkModifierType; // if UseValue is set, the modifier is set when the masked state matches the value