Commit 6c9317dc authored by Michael Pyne's avatar Michael Pyne

Modifier keys are different from the keycode itself apparently; fix broken keyboard

shortcuts in abakus.

svn path=/trunk/playground/utils/abakus/; revision=749809
parent d8ef71e9
...@@ -504,39 +504,39 @@ void MainWindow::setupLayout() ...@@ -504,39 +504,39 @@ void MainWindow::setupLayout()
KToggleAction *ta = ac->add<KToggleAction>("setDegreesMode", this, SLOT(slotDegrees())); KToggleAction *ta = ac->add<KToggleAction>("setDegreesMode", this, SLOT(slotDegrees()));
ta->setText(i18n("&Degrees")); ta->setText(i18n("&Degrees"));
ta->setShortcut(Qt::Key_Shift | Qt::Key_Alt | Qt::Key_D); ta->setShortcut(Qt::SHIFT | Qt::ALT | Qt::Key_D);
ta->setActionGroup(trigModeGroup); ta->setActionGroup(trigModeGroup);
ta->setChecked(trigMode() == Abakus::Degrees); ta->setChecked(trigMode() == Abakus::Degrees);
ta = ac->add<KToggleAction>("setRadiansMode", this, SLOT(slotRadians())); ta = ac->add<KToggleAction>("setRadiansMode", this, SLOT(slotRadians()));
ta->setText(i18n("&Radians")); ta->setText(i18n("&Radians"));
ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_R); ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_R);
ta->setActionGroup(trigModeGroup); ta->setActionGroup(trigModeGroup);
ta->setChecked(trigMode() == Abakus::Radians); ta->setChecked(trigMode() == Abakus::Radians);
ta = ac->add<KToggleAction>("toggleHistoryList", this, SLOT(slotToggleHistoryList())); ta = ac->add<KToggleAction>("toggleHistoryList", this, SLOT(slotToggleHistoryList()));
ta->setText(i18n("Show &History List")); ta->setText(i18n("Show &History List"));
ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_H); ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_H);
ta->setChecked(true); ta->setChecked(true);
ta = ac->add<KToggleAction>("toggleVariableList", this, SLOT(slotToggleVariableList())); ta = ac->add<KToggleAction>("toggleVariableList", this, SLOT(slotToggleVariableList()));
ta->setText(i18n("Show &Variables")); ta->setText(i18n("Show &Variables"));
ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_V); ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_V);
ta->setChecked(true); ta->setChecked(true);
ta = ac->add<KToggleAction>("toggleFunctionList", this, SLOT(slotToggleFunctionList())); ta = ac->add<KToggleAction>("toggleFunctionList", this, SLOT(slotToggleFunctionList()));
ta->setText(i18n("Show &Functions")); ta->setText(i18n("Show &Functions"));
ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_F); ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_F);
ta->setChecked(true); ta->setChecked(true);
ta = ac->add<KToggleAction>("toggleCompactMode", this, SLOT(slotToggleCompactMode())); ta = ac->add<KToggleAction>("toggleCompactMode", this, SLOT(slotToggleCompactMode()));
ta->setText(i18n("Activate &Compact Mode")); ta->setText(i18n("Activate &Compact Mode"));
ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_C); ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_C);
ta->setChecked(false); ta->setChecked(false);
ta = ac->add<KToggleAction>("toggleExpressionMode", this, SLOT(slotToggleExpressionMode())); ta = ac->add<KToggleAction>("toggleExpressionMode", this, SLOT(slotToggleExpressionMode()));
ta->setText(i18n("Use R&PN Mode")); ta->setText(i18n("Use R&PN Mode"));
ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_P); ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_P);
ta->setChecked(false); ta->setChecked(false);
QActionGroup *precisionGroup = new QActionGroup(ac); QActionGroup *precisionGroup = new QActionGroup(ac);
...@@ -570,7 +570,7 @@ void MainWindow::setupLayout() ...@@ -570,7 +570,7 @@ void MainWindow::setupLayout()
QAction *a = ac->addAction("clearHistory", m_result, SLOT(clear())); QAction *a = ac->addAction("clearHistory", m_result, SLOT(clear()));
a->setText(i18n("Clear &History")); a->setText(i18n("Clear &History"));
a->setIcon(KIcon("editclear")); a->setIcon(KIcon("editclear"));
ta->setShortcut(Qt::Key_Shift + Qt::Key_Alt + Qt::Key_L); ta->setShortcut(Qt::SHIFT + Qt::ALT + Qt::Key_L);
a = ac->addAction("select_edit", m_edit, SLOT(setFocus())); a = ac->addAction("select_edit", m_edit, SLOT(setFocus()));
a->setIcon(KIcon("goto")); a->setIcon(KIcon("goto"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment