MCPcopy Create free account
hub / github.com/KDE/kdiff3 / keyPressEvent

Method keyPressEvent

src/pdiff.cpp:680–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678}
679
680void KDiff3App::keyPressEvent(QKeyEvent* keyEvent)
681{
682 bool bCtrl = (keyEvent->modifiers() & Qt::ControlModifier) != 0;
683
684 switch(keyEvent->key())
685 {
686 case Qt::Key_Down:
687 case Qt::Key_Up:
688 case Qt::Key_PageDown:
689 case Qt::Key_PageUp:
690 if(DiffTextWindow::mVScrollBar != nullptr)
691 QCoreApplication::sendEvent(DiffTextWindow::mVScrollBar, keyEvent);
692 return;
693 case Qt::Key_Left:
694 case Qt::Key_Right:
695 if(m_pHScrollBar != nullptr)
696 QCoreApplication::sendEvent(m_pHScrollBar, keyEvent);
697 return;
698 case Qt::Key_End:
699 case Qt::Key_Home:
700 if(bCtrl)
701 {
702 if(DiffTextWindow::mVScrollBar != nullptr)
703 QCoreApplication::sendEvent(DiffTextWindow::mVScrollBar, keyEvent);
704 }
705 else
706 {
707 if(m_pHScrollBar != nullptr)
708 QCoreApplication::sendEvent(m_pHScrollBar, keyEvent);
709 }
710 return;
711 }
712
713 QMainWindow::keyPressEvent(keyEvent);
714}
715
716void KDiff3App::slotFinishDrop()
717{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected