From df9d3b3bcecafd53468c5832e4f8b725038d9a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Tue, 20 Aug 2013 17:32:26 +0200 Subject: [PATCH] 2013-08-20 17:32 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/gtqtc/gtqtc1.cpp * accept META key as CTRL key in MacOSX builds. This QT Meta key is marked as "control" on Apple keyboards so this seems to be less confusing. Anyhow I'm not regular MacOSX user so if someone thinks it's bad idea then please inform me. "command" key is mapped by QT as CTRL key by default. ! disabled Qt::WA_InputMethodEnabled in default builds. I disabled it because it was breaking support for national characters in few European countries, f.e. Polish characters with ALT in MacOSX. Qt::WA_InputMethodEnabled is used for some Asian languages but I have no idea if it was working with GTQTC so far and if it's really necessary and usable. I'm waiting for information from people who lives in countries where it's used. Just let me know if you need GTQTC compiled with this window attribute. --- ChangeLog.txt | 16 ++++++++++++++++ contrib/gtqtc/gtqtc1.cpp | 18 +++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 40ad8c5d9c..8a1d3efaa4 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,22 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-08-20 17:32 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/gtqtc/gtqtc1.cpp + * accept META key as CTRL key in MacOSX builds. + This QT Meta key is marked as "control" on Apple keyboards so + this seems to be less confusing. Anyhow I'm not regular MacOSX + user so if someone thinks it's bad idea then please inform me. + "command" key is mapped by QT as CTRL key by default. + ! disabled Qt::WA_InputMethodEnabled in default builds. + I disabled it because it was breaking support for national characters + in few European countries, f.e. Polish characters with ALT in MacOSX. + Qt::WA_InputMethodEnabled is used for some Asian languages but I have + no idea if it was working with GTQTC so far and if it's really + necessary and usable. I'm waiting for information from people who + lives in countries where it's used. Just let me know if you need + GTQTC compiled with this window attribute. + 2013-08-14 18:36 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/gtqtc/gtqtc1.cpp ! fixed missing HB_GTI_FONTA_NOSTRETCH in setting range diff --git a/contrib/gtqtc/gtqtc1.cpp b/contrib/gtqtc/gtqtc1.cpp index e668d2c8f5..3ff45e0c71 100644 --- a/contrib/gtqtc/gtqtc1.cpp +++ b/contrib/gtqtc/gtqtc1.cpp @@ -1501,6 +1501,9 @@ static int hb_gt_qtc_getKeyFlags( Qt::KeyboardModifiers keyFlags ) if( keyFlags & Qt::ControlModifier ) iFlags |= HB_KF_CTRL; if( keyFlags & Qt::ShiftModifier ) iFlags |= HB_KF_SHIFT; if( keyFlags & Qt::KeypadModifier ) iFlags |= HB_KF_KEYPAD; +#ifdef HB_OS_DARWIN + if( keyFlags & Qt::MetaModifier ) iFlags |= HB_KF_CTRL; +#endif return iFlags; } @@ -2436,11 +2439,20 @@ QTConsole::QTConsole( PHB_GTQTC pStructQTC, QWidget *parent ) : QWidget( parent setAttribute( Qt::WA_StaticContents ); setAttribute( Qt::WA_PaintOnScreen ); setAttribute( Qt::WA_OpaquePaintEvent ); - setAttribute( Qt::WA_InputMethodEnabled ); - /* it may be usable in some cases but KeyCompression needs some - * modifications in keyevent code [druzus] + + /* Qt::WA_InputMethodEnabled disables support for + * national characters in few European countries + * (f.e. Polish characters with ALT in MacOSX) + * If some Asian users needs it then we will have + * to enable it optionally [druzus] + */ + /* setAttribute( Qt::WA_InputMethodEnabled ); */ + + /* It may be usable in some cases but KeyCompression + * needs some modifications in keyevent code [druzus] */ /* setAttribute( Qt::WA_KeyCompression ); */ + setFocusPolicy( Qt::StrongFocus ); setMouseTracking( true );