diff --git a/QHotkey/qhotkey_win.cpp b/QHotkey/qhotkey_win.cpp index 3edf75f..44886f8 100644 --- a/QHotkey/qhotkey_win.cpp +++ b/QHotkey/qhotkey_win.cpp @@ -74,6 +74,7 @@ quint32 QHotkeyPrivate::nativeKeycode(Qt::Key keycode) return VK_NUMLOCK; case Qt::Key_ScrollLock: return VK_SCROLL; + case Qt::Key_F1: return VK_F1; case Qt::Key_F2: @@ -122,22 +123,11 @@ quint32 QHotkeyPrivate::nativeKeycode(Qt::Key keycode) return VK_F23; case Qt::Key_F24: return VK_F24; + case Qt::Key_Menu: return VK_APPS; case Qt::Key_Help: return VK_HELP; - case Qt::Key_Space: - return VK_SPACE; - case Qt::Key_Asterisk: - return VK_MULTIPLY; - case Qt::Key_Plus: - return VK_ADD; - case Qt::Key_Comma: - return VK_SEPARATOR; - case Qt::Key_Minus: - return VK_SUBTRACT; - case Qt::Key_Slash: - return VK_DIVIDE; case Qt::Key_MediaNext: return VK_MEDIA_NEXT_TRACK; case Qt::Key_MediaPrevious: @@ -196,48 +186,6 @@ quint32 QHotkeyPrivate::nativeKeycode(Qt::Key keycode) case Qt::Key_Touroku: return VK_OEM_FJ_TOUROKU; - // numbers - case Qt::Key_0: - case Qt::Key_1: - case Qt::Key_2: - case Qt::Key_3: - case Qt::Key_4: - case Qt::Key_5: - case Qt::Key_6: - case Qt::Key_7: - case Qt::Key_8: - case Qt::Key_9: - return keycode; - - // letters - case Qt::Key_A: - case Qt::Key_B: - case Qt::Key_C: - case Qt::Key_D: - case Qt::Key_E: - case Qt::Key_F: - case Qt::Key_G: - case Qt::Key_H: - case Qt::Key_I: - case Qt::Key_J: - case Qt::Key_K: - case Qt::Key_L: - case Qt::Key_M: - case Qt::Key_N: - case Qt::Key_O: - case Qt::Key_P: - case Qt::Key_Q: - case Qt::Key_R: - case Qt::Key_S: - case Qt::Key_T: - case Qt::Key_U: - case Qt::Key_V: - case Qt::Key_W: - case Qt::Key_X: - case Qt::Key_Y: - case Qt::Key_Z: - return keycode; - default: return 0; }