[PATCH 6/7] kconfig: qconf: use default platform shortcuts

Rolf Eike Beer posted 7 patches 1 month ago
[PATCH 6/7] kconfig: qconf: use default platform shortcuts
Posted by Rolf Eike Beer 1 month ago
This renames "Load" to "Open" and switches Ctrl-L to Ctrl-O for the default
platforms. This may break the workflow for those used to it, but will make it
actually work for everyone else like me who would just expect the default
behavior. Add some more standard shortcuts where available. If they replace
the existing shortcuts they would have the same value in my case.

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
---
 scripts/kconfig/qconf.cc | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 563ef8543d7c..4b2f707c9203 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1361,21 +1361,22 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configList->setFocus();
 
 	backAction = new QAction(QPixmap(xpm_back), "Back", this);
+	backAction->setShortcut(QKeySequence::Back);
 	connect(backAction, &QAction::triggered,
 		this, &ConfigMainWindow::goBack);
 
 	QAction *quitAction = new QAction("&Quit", this);
-	quitAction->setShortcut(Qt::CTRL | Qt::Key_Q);
+	quitAction->setShortcut(QKeySequence::Quit);
 	connect(quitAction, &QAction::triggered,
 		this, &ConfigMainWindow::close);
 
-	QAction *loadAction = new QAction(QPixmap(xpm_load), "&Load", this);
-	loadAction->setShortcut(Qt::CTRL | Qt::Key_L);
+	QAction *loadAction = new QAction(QPixmap(xpm_load), "&Open", this);
+	loadAction->setShortcut(QKeySequence::Open);
 	connect(loadAction, &QAction::triggered,
 		this, &ConfigMainWindow::loadConfig);
 
 	saveAction = new QAction(QPixmap(xpm_save), "&Save", this);
-	saveAction->setShortcut(Qt::CTRL | Qt::Key_S);
+	saveAction->setShortcut(QKeySequence::Save);
 	connect(saveAction, &QAction::triggered,
 		this, &ConfigMainWindow::saveConfig);
 
@@ -1384,10 +1385,11 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configname = conf_get_configname();
 
 	QAction *saveAsAction = new QAction("Save &As...", this);
+	saveAsAction->setShortcut(QKeySequence::SaveAs);
 	connect(saveAsAction, &QAction::triggered,
 		this, &ConfigMainWindow::saveConfigAs);
 	QAction *searchAction = new QAction("&Find", this);
-	searchAction->setShortcut(Qt::CTRL | Qt::Key_F);
+	searchAction->setShortcut(QKeySequence::Find);
 	connect(searchAction, &QAction::triggered,
 		this, &ConfigMainWindow::searchConfig);
 	singleViewAction = new QAction(QPixmap(xpm_single_view), "Single View", this);
-- 
2.47.0

-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail info@emlix.com
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
http://www.emlix.com

emlix - your embedded Linux partner
Re: [PATCH 6/7] kconfig: qconf: use default platform shortcuts
Posted by Masahiro Yamada 1 month ago
On Wed, Oct 23, 2024 at 3:36 PM Rolf Eike Beer <eb@emlix.com> wrote:
>
> This renames "Load" to "Open" and switches Ctrl-L to Ctrl-O for the default
> platforms. This may break the workflow for those used to it, but will make it
> actually work for everyone else like me who would just expect the default
> behavior. Add some more standard shortcuts where available. If they replace
> the existing shortcuts they would have the same value in my case.
>
> Signed-off-by: Rolf Eike Beer <eb@emlix.com>
> ---

Applied to linux-kbuild. Thanks!



-- 
Best Regards
Masahiro Yamada