Ref T645, minor style changes

This commit is contained in:
Klaus Basan
2019-05-09 23:43:21 +02:00
parent dd7930337a
commit 6ff118b3c0
3 changed files with 9 additions and 9 deletions

View File

@@ -83,7 +83,7 @@ namespace BlackCore
void CInputManager::processButtonCombinationChanged(const CHotkeyCombination &combination) void CInputManager::processButtonCombinationChanged(const CHotkeyCombination &combination)
{ {
// Merge in the keyboard keys // Merge in the keyboard dkeys
CHotkeyCombination copy(combination); CHotkeyCombination copy(combination);
copy.setKeyboardKeys(m_lastCombination.getKeyboardKeys()); copy.setKeyboardKeys(m_lastCombination.getKeyboardKeys());
processCombination(copy); processCombination(copy);

View File

@@ -117,16 +117,16 @@ namespace BlackInput
void CKeyboardWindows::processKeyEvent(DWORD vkcode, WPARAM event) void CKeyboardWindows::processKeyEvent(DWORD vkcode, WPARAM event)
{ {
BlackMisc::Input::CHotkeyCombination oldCombination(m_keyCombination); CHotkeyCombination oldCombination(m_keyCombination);
if ((event == WM_KEYDOWN) || (event == WM_SYSKEYDOWN)) if ((event == WM_KEYDOWN) || (event == WM_SYSKEYDOWN))
{ {
auto key = keyMapping().value(vkcode); auto key = keyMapping().value(static_cast<int>(vkcode));
if (key == Key_Unknown) { return; } if (key == Key_Unknown) { return; }
m_keyCombination.addKeyboardKey(CKeyboardKey(key)); m_keyCombination.addKeyboardKey(CKeyboardKey(key));
} }
else if ((event == WM_KEYUP) || (event == WM_SYSKEYUP)) else if ((event == WM_KEYUP) || (event == WM_SYSKEYUP))
{ {
auto key = keyMapping().value(vkcode); auto key = keyMapping().value(static_cast<int>(vkcode));
if (key == Key_Unknown) { return; } if (key == Key_Unknown) { return; }
m_keyCombination.removeKeyboardKey(CKeyboardKey(key)); m_keyCombination.removeKeyboardKey(CKeyboardKey(key));
} }
@@ -139,7 +139,7 @@ namespace BlackInput
void CKeyboardWindows::pollKeyboardState() void CKeyboardWindows::pollKeyboardState()
{ {
BlackMisc::Input::CHotkeyCombination oldCombination(m_keyCombination); CHotkeyCombination oldCombination(m_keyCombination);
QList<int> vkeys = keyMapping().keys(); QList<int> vkeys = keyMapping().keys();
for (int vkey : vkeys) for (int vkey : vkeys)
{ {