mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Remove native scan code from CKeyboardKey
Remove isPressed status from CKeyboardKey Switched key value to Qt::Key There is no way on OSX to get the native scan code of a key. Therefore it is removed from this class, because we might create dependent code which will not run on OSX. CKeyboardKey is a abstraction of platform keys. It was representing also the status when CKeyboardKey was sent in signals. So this can be removed. Pressed status is sent as argument to the registered method. refs #83
This commit is contained in:
@@ -135,8 +135,7 @@ namespace BlackGui
|
||||
{
|
||||
const Qt::Key k = static_cast<Qt::Key>(event->key());
|
||||
if (k == Qt::Key_Shift || k == Qt::Key_Control || k == Qt::Key_Meta || k == Qt::Key_Alt || k == Qt::Key_CapsLock || k == Qt::Key_NumLock || k == Qt::Key_ScrollLock) return;
|
||||
this->m_key.setKey(event->key());
|
||||
this->m_key.setNativeScanCode(event->nativeScanCode());
|
||||
this->m_key.setKey(k);
|
||||
this->m_key.setNativeVirtualKey(event->nativeVirtualKey());
|
||||
this->setText(CKeyboardKey::toStringRepresentation(event->key()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user