diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-04-13 23:00:54 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-04-13 23:00:54 +0530 |
| commit | 9fc1e934cd2c58ed1ba03f860b09e7a8cd48e792 (patch) | |
| tree | 1480698f9b9089ac51307e19e59267c2a0f243f5 /src | |
| parent | 0d9aedc087f56a3da35b6abc8a0ee233c2d2483b (diff) | |
| download | null-browser-9fc1e934cd2c58ed1ba03f860b09e7a8cd48e792.tar.gz null-browser-9fc1e934cd2c58ed1ba03f860b09e7a8cd48e792.zip | |
Add support for number keys and open view by number key
Diffstat (limited to '')
| -rw-r--r-- | src/keymap/KeySeqParser.cpp | 5 | ||||
| -rw-r--r-- | src/widgets/BrowserApp.cpp | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/keymap/KeySeqParser.cpp b/src/keymap/KeySeqParser.cpp index aef3b58..555e955 100644 --- a/src/keymap/KeySeqParser.cpp +++ b/src/keymap/KeySeqParser.cpp @@ -57,7 +57,10 @@ Qt::Key KeySeqParser::parse_key(const QString &key_name) { if (key_name.length() == 1) { const char key_char = key_name.toStdString().at(0); - return Qt::Key(Qt::Key_A + (key_char - 'a')); + if (key_char >= 'a' && key_char <= 'z') + return Qt::Key(Qt::Key_A + (key_char - 'a')); + if (key_char >= '0' && key_char <= '9') + return Qt::Key(Qt::Key_0 + (key_char - '0')); } if (key_name == "space") diff --git a/src/widgets/BrowserApp.cpp b/src/widgets/BrowserApp.cpp index 9b65b3a..502d930 100644 --- a/src/widgets/BrowserApp.cpp +++ b/src/widgets/BrowserApp.cpp @@ -21,7 +21,6 @@ BrowserApp::BrowserApp() { lua.load_file_sync("./config.lua"); // Initializes profile - QList profiles{&default_profile}; for (auto *profile : profiles) { profile->setDownloadPath(configuration.downloads_dir()); profile->setHttpUserAgent(configuration.user_agent()); |
