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

Method makeKeySequenceInputarray

QKeyMapper/qkeymapper_worker.cpp:20213–20324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20211
20212#if 0
20213int QKeyMapper_Worker::makeKeySequenceInputarray(QStringList &keyseq_list, INPUT *input_array)
20214{
20215 int index = 0;
20216 int keycount = 0;
20217 INPUT *input_p = Q_NULLPTR;
20218
20219 for (const QString &keyseq : std::as_const(keyseq_list)){
20220 QStringList mappingKeys = keyseq.split(SEPARATOR_PLUS);
20221 for (const QString &key : std::as_const(mappingKeys)){
20222 if (key == MOUSE_WHEEL_UP_STR || key == MOUSE_WHEEL_DOWN_STR) {
20223 input_p = &input_array[index];
20224 input_p->type = INPUT_MOUSE;
20225 input_p->mi.dwExtraInfo = VIRTUAL_MOUSE_WHEEL;
20226 input_p->mi.dwFlags = MOUSEEVENTF_WHEEL;
20227 if (key == MOUSE_WHEEL_UP_STR) {
20228 input_p->mi.mouseData = WHEEL_DELTA;
20229 }
20230 else {
20231 input_p->mi.mouseData = -WHEEL_DELTA;
20232 }
20233 keycount++;
20234 index++;
20235 }
20236 else if (true == VirtualMouseButtonMap.contains(key)) {
20237 V_MOUSECODE vmousecode = VirtualMouseButtonMap.value(key);
20238
20239 input_p = &input_array[index];
20240 input_p->type = INPUT_MOUSE;
20241 input_p->mi.mouseData = vmousecode.MouseXButton;
20242 input_p->mi.dwExtraInfo = VIRTUAL_KEY_SEND;
20243 input_p->mi.dwFlags = vmousecode.MouseDownCode;
20244 keycount++;
20245 index++;
20246 }
20247 else if (true == QKeyMapper_Worker::VirtualKeyCodeMap.contains(key)) {
20248 V_KEYCODE vkeycode = QKeyMapper_Worker::VirtualKeyCodeMap.value(key);
20249 DWORD extenedkeyflag = 0;
20250 if (true == vkeycode.ExtenedFlag){
20251 extenedkeyflag = KEYEVENTF_EXTENDEDKEY;
20252 }
20253 else{
20254 extenedkeyflag = 0;
20255 }
20256
20257 input_p = &input_array[index];
20258 input_p->type = INPUT_KEYBOARD;
20259 input_p->ki.dwExtraInfo = VIRTUAL_KEY_SEND;
20260 input_p->ki.wVk = vkeycode.KeyCode;
20261 input_p->ki.wScan = MapVirtualKey(input_p->ki.wVk, MAPVK_VK_TO_VSC);
20262 input_p->ki.dwFlags = extenedkeyflag | 0;
20263 keycount++;
20264 index++;
20265 }
20266 else {
20267#ifdef DEBUG_LOGOUT_ON
20268 qWarning("makeKeySequenceInputarray(): VirtualMap do not contains \"%s\" !!!", key.toStdString().c_str());
20269#endif
20270 }

Callers

nothing calls this directly

Calls 2

containsMethod · 0.80
valueMethod · 0.80

Tested by

no test coverage detected