Qt 4.8
Classes | Macros | Functions | Variables
qkeymapper_mac.cpp File Reference
#include <private/qt_mac_p.h>
#include <qdebug.h>
#include <qevent.h>
#include <private/qevent_p.h>
#include <qtextcodec.h>
#include <qapplication.h>
#include <qinputcontext.h>
#include <private/qkeymapper_p.h>
#include <private/qapplication_p.h>
#include <private/qmacinputcontext_p.h>

Go to the source code of this file.

Classes

struct  KeyboardLayoutItem
 
struct  qt_mac_enum_mapper
 

Macros

#define QT_MAC_MAP_ENUM(x)   x
 

Functions

static Boolean qt_KeyEventComparatorProc (EventRef inEvent, void *data)
 
static int qt_mac_get_key (int modif, const QChar &key, int virtualKey)
 
static int qt_mac_get_mac_modifiers (Qt::KeyboardModifiers keys)
 
Qt::KeyboardModifiers qt_mac_get_modifiers (int keys)
 
Q_GUI_EXPORT void qt_mac_secure_keyboard (bool b)
 
void qt_mac_send_modifiers_changed (quint32 modifiers, QObject *object)
 
bool qt_sendSpontaneousEvent (QObject *obj, QEvent *event)
 
static bool translateKeyEventInternal (EventHandlerCallRef er, EventRef keyEvent, int *qtKey, QChar *outChar, Qt::KeyboardModifiers *outModifiers, bool *outHandled)
 

Variables

static const Qt::KeyboardModifiers ModsTbl []
 
bool qt_mac_eat_unicode_key = false
 
static qt_mac_enum_mapper qt_mac_keyboard_symbols []
 
static qt_mac_enum_mapper qt_mac_keyvkey_symbols []
 
static qt_mac_enum_mapper qt_mac_modifier_symbols []
 
static qt_mac_enum_mapper qt_mac_private_unicode []
 

Macro Definition Documentation

◆ QT_MAC_MAP_ENUM

#define QT_MAC_MAP_ENUM (   x)    x

Definition at line 134 of file qkeymapper_mac.cpp.

Referenced by qt_mac_send_modifiers_changed().

Function Documentation

◆ qt_KeyEventComparatorProc()

static Boolean qt_KeyEventComparatorProc ( EventRef  inEvent,
void *  data 
)
static

Definition at line 428 of file qkeymapper_mac.cpp.

Referenced by QKeyMapperPrivate::translateKeyEvent().

429 {
430  UInt32 ekind = GetEventKind(inEvent),
431  eclass = GetEventClass(inEvent);
432  return (eclass == kEventClassKeyboard && (void *)ekind == data);
433 }
static const char * data(const QByteArray &arr)

◆ qt_mac_get_key()

static int qt_mac_get_key ( int  modif,
const QChar key,
int  virtualKey 
)
static

Definition at line 352 of file qkeymapper_mac.cpp.

Referenced by translateKeyEventInternal(), and QKeyMapperPrivate::updateKeyMap().

353 {
354 #ifdef DEBUG_KEY_BINDINGS
355  qDebug("**Mapping key: %d (0x%04x) - %d (0x%04x)", key.unicode(), key.unicode(), virtualKey, virtualKey);
356 #endif
357 
358  if (key == kClearCharCode && virtualKey == 0x47)
359  return Qt::Key_Clear;
360 
361  if (key.isDigit()) {
362 #ifdef DEBUG_KEY_BINDINGS
363  qDebug("%d: got key: %d", __LINE__, key.digitValue());
364 #endif
365  return key.digitValue() + Qt::Key_0;
366  }
367 
368  if (key.isLetter()) {
369 #ifdef DEBUG_KEY_BINDINGS
370  qDebug("%d: got key: %d", __LINE__, (key.toUpper().unicode() - 'A'));
371 #endif
372  return (key.toUpper().unicode() - 'A') + Qt::Key_A;
373  }
374  if (key.isSymbol()) {
375 #ifdef DEBUG_KEY_BINDINGS
376  qDebug("%d: got key: %d", __LINE__, (key.unicode()));
377 #endif
378  return key.unicode();
379  }
380 
381  for (int i = 0; qt_mac_keyboard_symbols[i].qt_code; i++) {
382  if (qt_mac_keyboard_symbols[i].mac_code == key) {
383  /* To work like Qt for X11 we issue Backtab when Shift + Tab are pressed */
384  if (qt_mac_keyboard_symbols[i].qt_code == Qt::Key_Tab && (modif & Qt::ShiftModifier)) {
385 #ifdef DEBUG_KEY_BINDINGS
386  qDebug("%d: got key: Qt::Key_Backtab", __LINE__);
387 #endif
388  return Qt::Key_Backtab;
389  }
390 
391 #ifdef DEBUG_KEY_BINDINGS
392  qDebug("%d: got key: %s", __LINE__, qt_mac_keyboard_symbols[i].desc);
393 #endif
395  }
396  }
397 
398  //last ditch try to match the scan code
399  for (int i = 0; qt_mac_keyvkey_symbols[i].qt_code; i++) {
400  if (qt_mac_keyvkey_symbols[i].mac_code == virtualKey) {
401 #ifdef DEBUG_KEY_BINDINGS
402  qDebug("%d: got key: %s", __LINE__, qt_mac_keyvkey_symbols[i].desc);
403 #endif
405  }
406  }
407 
408  // check if they belong to key codes in private unicode range
409  if (key >= 0xf700 && key <= 0xf747) {
410  if (key >= 0xf704 && key <= 0xf726) {
411  return Qt::Key_F1 + (key.unicode() - 0xf704) ;
412  }
413  for (int i = 0; qt_mac_private_unicode[i].qt_code; i++) {
414  if (qt_mac_private_unicode[i].mac_code == key) {
416  }
417  }
418 
419  }
420 
421  //oh well
422 #ifdef DEBUG_KEY_BINDINGS
423  qDebug("Unknown case.. %s:%d %d[%d] %d", __FILE__, __LINE__, key.unicode(), key.toLatin1(), virtualKey);
424 #endif
425  return Qt::Key_unknown;
426 }
bool isLetter() const
Returns true if the character is a letter (Letter_* categories); otherwise returns false...
Definition: qchar.cpp:653
int digitValue() const
Returns the numeric value of the digit, or -1 if the character is not a digit.
Definition: qchar.cpp:817
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qchar.h:251
bool isSymbol() const
Returns true if the character is a symbol (Symbol_* categories); otherwise returns false...
Definition: qchar.cpp:709
static qt_mac_enum_mapper qt_mac_keyboard_symbols[]
static qt_mac_enum_mapper qt_mac_keyvkey_symbols[]
Q_CORE_EXPORT void qDebug(const char *,...)
QChar toUpper() const
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the ch...
Definition: qchar.cpp:1287
static qt_mac_enum_mapper qt_mac_private_unicode[]
char toLatin1() const
Returns the Latin-1 character equivalent to the QChar, or 0.
Definition: qchar.h:376
bool isDigit() const
Returns true if the character is a decimal digit (Number_DecimalDigit); otherwise returns false...
Definition: qchar.cpp:699

◆ qt_mac_get_mac_modifiers()

static int qt_mac_get_mac_modifiers ( Qt::KeyboardModifiers  keys)
static

Definition at line 174 of file qkeymapper_mac.cpp.

Referenced by QKeyMapperPrivate::updateKeyMap().

175 {
176 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
177  qDebug("Qt: internal: **Mapping modifiers: %d (0x%04x)", (int)keys, (int)keys);
178 #endif
179  int ret = 0;
180  for (int i = 0; qt_mac_modifier_symbols[i].qt_code; i++) {
181  if (keys & qt_mac_modifier_symbols[i].qt_code) {
182 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
183  qDebug("Qt: internal: got modifier: %s", qt_mac_modifier_symbols[i].desc);
184 #endif
186  }
187  }
188 
189  if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
190  int oldModifiers = ret;
191  ret &= ~(controlKeyBit | cmdKeyBit);
192  if (oldModifiers & controlKeyBit)
193  ret |= cmdKeyBit;
194  if (oldModifiers & cmdKeyBit)
195  ret |= controlKeyBit;
196  }
197  return ret;
198 }
QStringList keys
Q_CORE_EXPORT void qDebug(const char *,...)
#define qApp
static qt_mac_enum_mapper qt_mac_modifier_symbols[]

◆ qt_mac_get_modifiers()

Qt::KeyboardModifiers qt_mac_get_modifiers ( int  keys)

Definition at line 150 of file qkeymapper_mac.cpp.

Referenced by QApplicationPrivate::globalEventProcessor(), qt_mac_send_modifiers_changed(), QApplication::queryKeyboardModifiers(), and translateKeyEventInternal().

151 {
152 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
153  qDebug("Qt: internal: **Mapping modifiers: %d (0x%04x)", keys, keys);
154 #endif
155  Qt::KeyboardModifiers ret = Qt::NoModifier;
156  for (int i = 0; qt_mac_modifier_symbols[i].qt_code; i++) {
157  if (keys & qt_mac_modifier_symbols[i].mac_code) {
158 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
159  qDebug("Qt: internal: got modifier: %s", qt_mac_modifier_symbols[i].desc);
160 #endif
162  }
163  }
164  if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
165  Qt::KeyboardModifiers oldModifiers = ret;
167  if (oldModifiers & Qt::ControlModifier)
168  ret |= Qt::MetaModifier;
169  if (oldModifiers & Qt::MetaModifier)
170  ret |= Qt::ControlModifier;
171  }
172  return ret;
173 }
KeyboardModifier
Definition: qnamespace.h:127
QStringList keys
Q_CORE_EXPORT void qDebug(const char *,...)
#define qApp
static qt_mac_enum_mapper qt_mac_modifier_symbols[]

◆ qt_mac_secure_keyboard()

Q_GUI_EXPORT void qt_mac_secure_keyboard ( bool  b)

Definition at line 70 of file qkeymapper_mac.cpp.

Referenced by QLineEdit::focusInEvent(), QLineEdit::focusOutEvent(), and QLineEdit::setEchoMode().

71 {
72  static bool secure = false;
73  if (b != secure){
74  b ? EnableSecureEventInput() : DisableSecureEventInput();
75  secure = b;
76  }
77 }

◆ qt_mac_send_modifiers_changed()

void qt_mac_send_modifiers_changed ( quint32  modifiers,
QObject object 
)

Definition at line 199 of file qkeymapper_mac.cpp.

Referenced by QApplicationPrivate::globalEventProcessor(), qt_dispatchModifiersChanged(), qt_mac_dnd_update_action(), and QKeyMapperPrivate::translateKeyEvent().

200 {
201  static quint32 cachedModifiers = 0;
202  quint32 lastModifiers = cachedModifiers,
203  changedModifiers = lastModifiers ^ modifiers;
204  cachedModifiers = modifiers;
205 
206  //check the bits
207  static qt_mac_enum_mapper modifier_key_symbols[] = {
208  { shiftKeyBit, QT_MAC_MAP_ENUM(Qt::Key_Shift) },
209  { rightShiftKeyBit, QT_MAC_MAP_ENUM(Qt::Key_Shift) }, //???
210  { controlKeyBit, QT_MAC_MAP_ENUM(Qt::Key_Meta) },
211  { rightControlKeyBit, QT_MAC_MAP_ENUM(Qt::Key_Meta) }, //???
212  { cmdKeyBit, QT_MAC_MAP_ENUM(Qt::Key_Control) },
213  { optionKeyBit, QT_MAC_MAP_ENUM(Qt::Key_Alt) },
214  { rightOptionKeyBit, QT_MAC_MAP_ENUM(Qt::Key_Alt) }, //???
215  { alphaLockBit, QT_MAC_MAP_ENUM(Qt::Key_CapsLock) },
216  { kEventKeyModifierNumLockBit, QT_MAC_MAP_ENUM(Qt::Key_NumLock) },
217  { 0, QT_MAC_MAP_ENUM(0) } };
218  for (int i = 0; i <= 32; i++) { //just check each bit
219  if (!(changedModifiers & (1 << i)))
220  continue;
222  if (lastModifiers & (1 << i))
223  etype = QEvent::KeyRelease;
224  int key = 0;
225  for (uint x = 0; modifier_key_symbols[x].mac_code; x++) {
226  if (modifier_key_symbols[x].mac_code == i) {
227 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
228  qDebug("got modifier changed: %s", modifier_key_symbols[x].desc);
229 #endif
230  key = modifier_key_symbols[x].qt_code;
231  break;
232  }
233  }
234  if (!key) {
235 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
236  qDebug("could not get modifier changed: %d", i);
237 #endif
238  continue;
239  }
240 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
241  qDebug("KeyEvent (modif): Sending %s to %s::%s: %d - 0x%08x",
242  etype == QEvent::KeyRelease ? "KeyRelease" : "KeyPress",
243  object ? object->metaObject()->className() : "none",
244  object ? object->objectName().toLatin1().constData() : "",
245  key, (int)modifiers);
246 #endif
247  QKeyEvent ke(etype, key, qt_mac_get_modifiers(modifiers ^ (1 << i)), QLatin1String(""));
248  qt_sendSpontaneousEvent(object, &ke);
249  }
250 }
The QKeyEvent class describes a key event.
Definition: qevent.h:224
Qt::KeyboardModifiers qt_mac_get_modifiers(int keys)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool qt_sendSpontaneousEvent(QObject *obj, QEvent *event)
Q_CORE_EXPORT void qDebug(const char *,...)
unsigned int uint
Definition: qglobal.h:996
Type
This enum type defines the valid event types in Qt.
Definition: qcoreevent.h:62
int key
unsigned int quint32
Definition: qglobal.h:938
const char * className() const
Returns the class name.
Definition: qobjectdefs.h:491
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
#define QT_MAC_MAP_ENUM(x)

◆ qt_sendSpontaneousEvent()

bool qt_sendSpontaneousEvent ( QObject obj,
QEvent event 
)

Definition at line 5779 of file qapplication.cpp.

Referenced by qt_mac_send_modifiers_changed(), and QKeyMapper::sendKeyEvent().

5780 {
5781  return QCoreApplication::sendSpontaneousEvent(receiver, event);
5782 }
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event)

◆ translateKeyEventInternal()

static bool translateKeyEventInternal ( EventHandlerCallRef  er,
EventRef  keyEvent,
int *  qtKey,
QChar outChar,
Qt::KeyboardModifiers *  outModifiers,
bool *  outHandled 
)
static

Definition at line 435 of file qkeymapper_mac.cpp.

Referenced by qt_keyrelease_scanner(), QKeyMapperPrivate::translateKeyEvent(), and translateKeySym().

437 {
438 #if !defined(QT_MAC_USE_COCOA) || defined(Q_OS_MAC64)
439  Q_UNUSED(er);
440  Q_UNUSED(outHandled);
441 #endif
442  const UInt32 ekind = GetEventKind(keyEvent);
443  {
444  UInt32 mac_modifiers = 0;
445  GetEventParameter(keyEvent, kEventParamKeyModifiers, typeUInt32, 0,
446  sizeof(mac_modifiers), 0, &mac_modifiers);
447 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
448  qDebug("************ Mapping modifiers and key ***********");
449 #endif
450  *outModifiers = qt_mac_get_modifiers(mac_modifiers);
451 #ifdef DEBUG_KEY_BINDINGS_MODIFIERS
452  qDebug("------------ Mapping modifiers and key -----------");
453 #endif
454  }
455 
456  //get keycode
457  UInt32 keyCode = 0;
458  GetEventParameter(keyEvent, kEventParamKeyCode, typeUInt32, 0, sizeof(keyCode), 0, &keyCode);
459 
460  //get mac mapping
461  static UInt32 tmp_unused_state = 0L;
462  const UCKeyboardLayout *uchrData = 0;
463 #if defined(Q_OS_MAC32)
464  KeyboardLayoutRef keyLayoutRef = 0;
465  KLGetCurrentKeyboardLayout(&keyLayoutRef);
466  OSStatus err;
467  if (keyLayoutRef != 0) {
468  err = KLGetKeyboardLayoutProperty(keyLayoutRef, kKLuchrData,
469  (reinterpret_cast<const void **>(&uchrData)));
470  if (err != noErr) {
471  qWarning("Qt::internal::unable to get keyboardlayout %ld %s:%d",
472  long(err), __FILE__, __LINE__);
473  }
474  }
475 #else
476  QCFType<TISInputSourceRef> inputSource = TISCopyCurrentKeyboardInputSource();
477  Q_ASSERT(inputSource != 0);
478  CFDataRef data = static_cast<CFDataRef>(TISGetInputSourceProperty(inputSource,
479  kTISPropertyUnicodeKeyLayoutData));
480  uchrData = data ? reinterpret_cast<const UCKeyboardLayout *>(CFDataGetBytePtr(data)) : 0;
481 #endif
483  if (uchrData) {
484  // The easy stuff; use the unicode stuff!
485  UniChar string[4];
486  UniCharCount actualLength;
487  UInt32 currentModifiers = GetCurrentEventKeyModifiers();
488  UInt32 currentModifiersWOAltOrControl = currentModifiers & ~(controlKey | optionKey);
489  int keyAction;
490  switch (ekind) {
491  default:
492  case kEventRawKeyDown:
493  keyAction = kUCKeyActionDown;
494  break;
495  case kEventRawKeyUp:
496  keyAction = kUCKeyActionUp;
497  break;
498  case kEventRawKeyRepeat:
499  keyAction = kUCKeyActionAutoKey;
500  break;
501  }
502  OSStatus err = UCKeyTranslate(uchrData, keyCode, keyAction,
503  ((currentModifiersWOAltOrControl >> 8) & 0xff), LMGetKbdType(),
504  kUCKeyTranslateNoDeadKeysMask, &tmp_unused_state, 4, &actualLength,
505  string);
506  if (err == noErr) {
507  *outChar = QChar(string[0]);
508  *qtKey = qt_mac_get_key(*outModifiers, *outChar, keyCode);
509  if (currentModifiersWOAltOrControl != currentModifiers) {
510  // Now get the real char.
511  err = UCKeyTranslate(uchrData, keyCode, keyAction,
512  ((currentModifiers >> 8) & 0xff), LMGetKbdType(),
513  kUCKeyTranslateNoDeadKeysMask, &tmp_unused_state, 4, &actualLength,
514  string);
515  if (err == noErr)
516  *outChar = QChar(string[0]);
517  }
518  } else {
519  qWarning("Qt::internal::UCKeyTranslate is returnining %ld %s:%d",
520  long(err), __FILE__, __LINE__);
521  }
522  }
523 #ifdef Q_OS_MAC32
524  else {
525  // The road less travelled; use KeyTranslate
526  const void *keyboard_layout;
527  KeyboardLayoutRef keyLayoutRef = 0;
528  KLGetCurrentKeyboardLayout(&keyLayoutRef);
529  err = KLGetKeyboardLayoutProperty(keyLayoutRef, kKLKCHRData,
530  reinterpret_cast<const void **>(&keyboard_layout));
531 
532  int translatedChar = KeyTranslate(keyboard_layout, (GetCurrentEventKeyModifiers() &
533  (kEventKeyModifierNumLockMask|shiftKey|cmdKey|
534  rightShiftKey|alphaLock)) | keyCode,
535  &tmp_unused_state);
536  if (!translatedChar) {
537 #ifdef QT_MAC_USE_COCOA
538  if (outHandled) {
539  qt_mac_eat_unicode_key = false;
540  if (er)
541  CallNextEventHandler(er, keyEvent);
542  *outHandled = qt_mac_eat_unicode_key;
543  }
544 #endif
545  return false;
546  }
547 
548  //map it into qt keys
549  *qtKey = qt_mac_get_key(*outModifiers, QChar(translatedChar), keyCode);
550  if (*outModifiers & (Qt::AltModifier | Qt::ControlModifier)) {
551  if (translatedChar & (1 << 7)) //high ascii
552  translatedChar = 0;
553  } else { //now get the real ascii value
554  UInt32 tmp_mod = 0L;
555  static UInt32 tmp_state = 0L;
556  if (*outModifiers & Qt::ShiftModifier)
557  tmp_mod |= shiftKey;
558  if (*outModifiers & Qt::MetaModifier)
559  tmp_mod |= controlKey;
560  if (*outModifiers & Qt::ControlModifier)
561  tmp_mod |= cmdKey;
562  if (GetCurrentEventKeyModifiers() & alphaLock) //no Qt mapper
563  tmp_mod |= alphaLock;
564  if (*outModifiers & Qt::AltModifier)
565  tmp_mod |= optionKey;
566  if (*outModifiers & Qt::KeypadModifier)
567  tmp_mod |= kEventKeyModifierNumLockMask;
568  translatedChar = KeyTranslate(keyboard_layout, tmp_mod | keyCode, &tmp_state);
569  }
570  {
571  ByteCount unilen = 0;
572  if (GetEventParameter(keyEvent, kEventParamKeyUnicodes, typeUnicodeText, 0, 0, &unilen, 0)
573  == noErr && unilen == 2) {
574  GetEventParameter(keyEvent, kEventParamKeyUnicodes, typeUnicodeText, 0, unilen, 0, outChar);
575  } else if (translatedChar) {
576  static QTextCodec *c = 0;
577  if (!c)
578  c = QTextCodec::codecForName("Apple Roman");
579  char tmpChar = (char)translatedChar; // **sigh**
580  *outChar = c->toUnicode(&tmpChar, 1).at(0);
581  } else {
582  *qtKey = qt_mac_get_key(*outModifiers, QChar(translatedChar), keyCode);
583  }
584  }
585  }
586 #endif
587  if (*qtKey == Qt::Key_unknown)
588  *qtKey = qt_mac_get_key(*outModifiers, *outChar, keyCode);
589  return true;
590 }
unsigned char c[8]
Definition: qnumeric_p.h:62
const QChar at(int i) const
Returns the character at the given index position in the string.
Definition: qstring.h:698
static void keyEvent(KeyAction action, QWidget *widget, char ascii, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
Qt::KeyboardModifiers qt_mac_get_modifiers(int keys)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
bool qt_mac_eat_unicode_key
Q_CORE_EXPORT void qDebug(const char *,...)
Q_CORE_EXPORT void qWarning(const char *,...)
static const char * data(const QByteArray &arr)
signed long OSStatus
static int qt_mac_get_key(int modif, const QChar &key, int virtualKey)
QString toUnicode(const QByteArray &) const
Converts a from the encoding of this codec to Unicode, and returns the result in a QString...
static QTextCodec * codecForName(const QByteArray &name)
Searches all installed QTextCodec objects and returns the one which best matches name; the match is c...
static QString qtKey(CFStringRef cfkey)
The QTextCodec class provides conversions between text encodings.
Definition: qtextcodec.h:62
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

Variable Documentation

◆ ModsTbl

const Qt::KeyboardModifiers ModsTbl[]
static
Initial value:
= {
Qt::ControlModifier | Qt::ShiftModifier,
Qt::AltModifier | Qt::ShiftModifier,
Qt::AltModifier | Qt::ControlModifier,
Qt::AltModifier | Qt::ShiftModifier | Qt::ControlModifier,
Qt::MetaModifier | Qt::ShiftModifier,
Qt::MetaModifier | Qt::ControlModifier,
Qt::MetaModifier | Qt::ControlModifier | Qt::ShiftModifier,
Qt::MetaModifier | Qt::AltModifier,
Qt::MetaModifier | Qt::AltModifier | Qt::ShiftModifier,
Qt::MetaModifier | Qt::AltModifier | Qt::ControlModifier,
Qt::MetaModifier | Qt::AltModifier | Qt::ShiftModifier | Qt::ControlModifier,
}

Definition at line 106 of file qkeymapper_mac.cpp.

Referenced by QKeyMapperPrivate::possibleKeys(), and QKeyMapperPrivate::updateKeyMap().

◆ qt_mac_eat_unicode_key

bool qt_mac_eat_unicode_key = false

◆ qt_mac_keyboard_symbols

qt_mac_enum_mapper qt_mac_keyboard_symbols[]
static

Definition at line 253 of file qkeymapper_mac.cpp.

◆ qt_mac_keyvkey_symbols

qt_mac_enum_mapper qt_mac_keyvkey_symbols[]
static

◆ qt_mac_modifier_symbols

qt_mac_enum_mapper qt_mac_modifier_symbols[]
static
Initial value:

Definition at line 139 of file qkeymapper_mac.cpp.

◆ qt_mac_private_unicode

qt_mac_enum_mapper qt_mac_private_unicode[]
static
Initial value:
= {
{ 0xF700, QT_MAC_MAP_ENUM(Qt::Key_Up) },
{ 0, QT_MAC_MAP_ENUM(0) }
}
#define QT_MAC_MAP_ENUM(x)

Definition at line 326 of file qkeymapper_mac.cpp.