MCPcopy Create free account
hub / github.com/Zalafina/QKeyMapper / nativeKeycode

Method nativeKeycode

QKeyMapper/QHotkey/qhotkey_mac.cpp:44–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44quint32 QHotkeyPrivateMac::nativeKeycode(Qt::Key keycode, bool &ok)
45{
46 // Constants found in NSEvent.h from AppKit.framework
47 ok = true;
48 switch (keycode) {
49 case Qt::Key_Return:
50 return kVK_Return;
51 case Qt::Key_Enter:
52 return kVK_ANSI_KeypadEnter;
53 case Qt::Key_Tab:
54 return kVK_Tab;
55 case Qt::Key_Space:
56 return kVK_Space;
57 case Qt::Key_Backspace:
58 return kVK_Delete;
59 case Qt::Key_Escape:
60 return kVK_Escape;
61 case Qt::Key_CapsLock:
62 return kVK_CapsLock;
63 case Qt::Key_Option:
64 return kVK_Option;
65 case Qt::Key_F17:
66 return kVK_F17;
67 case Qt::Key_VolumeUp:
68 return kVK_VolumeUp;
69 case Qt::Key_VolumeDown:
70 return kVK_VolumeDown;
71 case Qt::Key_F18:
72 return kVK_F18;
73 case Qt::Key_F19:
74 return kVK_F19;
75 case Qt::Key_F20:
76 return kVK_F20;
77 case Qt::Key_F5:
78 return kVK_F5;
79 case Qt::Key_F6:
80 return kVK_F6;
81 case Qt::Key_F7:
82 return kVK_F7;
83 case Qt::Key_F3:
84 return kVK_F3;
85 case Qt::Key_F8:
86 return kVK_F8;
87 case Qt::Key_F9:
88 return kVK_F9;
89 case Qt::Key_F11:
90 return kVK_F11;
91 case Qt::Key_F13:
92 return kVK_F13;
93 case Qt::Key_F16:
94 return kVK_F16;
95 case Qt::Key_F14:
96 return kVK_F14;
97 case Qt::Key_F10:
98 return kVK_F10;
99 case Qt::Key_F12:
100 return kVK_F12;
101 case Qt::Key_F15:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected