mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-29 20:55:42 +08:00
Ref T645, minor style changes
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user