mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 12:48:40 -05:00
Fix several issues with shortcut keys.
Do not drop through shortcut key handling so that spurious responses are avoided. The keyPressEvent handlers must call the super class implementation if the event os not handled. Correct a typo in the shortcut help display. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4361 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
e64037c61e
commit
fbc744e066
@ -717,46 +717,54 @@ void MainWindow::auto_tx_mode (bool state)
|
||||
|
||||
void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
||||
{
|
||||
qDebug () << "key: " << e->key () << " modifiers: " << e->modifiers ();
|
||||
int n;
|
||||
switch(e->key())
|
||||
{
|
||||
case Qt::Key_1:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
on_txb1_clicked();
|
||||
break;
|
||||
e->ignore ();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_2:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
on_txb2_clicked();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_3:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
on_txb3_clicked();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_4:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
on_txb4_clicked();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_5:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
on_txb5_clicked();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_6:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
on_txb6_clicked();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_D:
|
||||
if(e->modifiers() & Qt::ShiftModifier) {
|
||||
if(!m_decoderBusy) {
|
||||
jt9com_.newdat=0;
|
||||
jt9com_.nagain=0;
|
||||
decode();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -766,22 +774,23 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
||||
genStdMsgs("");
|
||||
m_ntx=6;
|
||||
ui->txrb6->setChecked(true);
|
||||
break;
|
||||
return;
|
||||
case Qt::Key_F6:
|
||||
if(e->modifiers() & Qt::ShiftModifier) {
|
||||
on_actionDecode_remaining_files_in_directory_triggered();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_F11:
|
||||
n=11;
|
||||
if(e->modifiers() & Qt::ControlModifier) n+=100;
|
||||
bumpFqso(n);
|
||||
break;
|
||||
return;
|
||||
case Qt::Key_F12:
|
||||
n=12;
|
||||
if(e->modifiers() & Qt::ControlModifier) n+=100;
|
||||
bumpFqso(n);
|
||||
break;
|
||||
return;
|
||||
case Qt::Key_F:
|
||||
if(e->modifiers() & Qt::ControlModifier) {
|
||||
if(ui->tabWidget->currentIndex()==0) {
|
||||
@ -791,30 +800,37 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
||||
ui->freeTextMsg->clearEditText();
|
||||
ui->freeTextMsg->setFocus();
|
||||
}
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_G:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
genStdMsgs(m_rpt);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_H:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
on_stopTxButton_clicked();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_L:
|
||||
if(e->modifiers() & Qt::ControlModifier) {
|
||||
lookup();
|
||||
genStdMsgs(m_rpt);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_V:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
m_fileToSave=m_fname;
|
||||
break;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
QMainWindow::keyPressEvent (e);
|
||||
}
|
||||
|
||||
void MainWindow::bumpFqso(int n) //bumpFqso()
|
||||
|
@ -19,7 +19,7 @@ Ctrl+F Edit the free text message box
|
||||
Alt+G Generate standard messages
|
||||
Alt+H Halt Tx
|
||||
Ctrl+L Lookup callsign in database, generate standard messages
|
||||
Alt M Monitor
|
||||
Alt+M Monitor
|
||||
Alt+N Enable Tx
|
||||
Alt+Q Log QSO
|
||||
Alt+S Stop monitoring
|
||||
|
@ -208,7 +208,7 @@ void WideGraph::keyPressEvent(QKeyEvent *e)
|
||||
emit f11f12(n);
|
||||
break;
|
||||
default:
|
||||
e->ignore();
|
||||
QDialog::keyPressEvent (e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user