示例#1
0
void QKeyboardView::mouseReleaseEvent(QMouseEvent *event)
{
    unsigned char keyscan = GetKeyByPoint(event->x(), event->y(), event->modifiers() & Qt::ShiftModifier);
    if (keyscan == 0) return;

    Emulator_KeyEvent(keyscan, false, event->modifiers() & Qt::ControlModifier);
}
示例#2
0
void QScreen::keyReleaseEvent(QKeyEvent *event)
{
    unsigned char bkscan = TranslateQtKeyToBkKey(event->key(), event->modifiers() & Qt::ShiftModifier);
    if (bkscan == 0) return;

    Emulator_KeyEvent(bkscan, FALSE, event->modifiers() & Qt::ControlModifier);
    event->accept();
}
示例#3
0
void QScreen::keyPressEvent(QKeyEvent *event)
{
    if (! g_okEmulatorRunning) return;
    if (event->isAutoRepeat()) return;

    unsigned char bkscan = TranslateQtKeyToBkKey(event->key(), event->modifiers() & Qt::ShiftModifier);
    if (bkscan == 0) return;

    Emulator_KeyEvent(bkscan, TRUE, event->modifiers() & Qt::ControlModifier);
    event->accept();
}