diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-05 17:42:08 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-05 17:42:08 +0200 |
commit | 5515eb8465ad89c83200fe9dcecad89d3c37227f (patch) | |
tree | eb0e51ab28fd86c5ffa6acb0be33eee88a47f2e4 | |
parent | d7a681b69153ea99f03c128fce5d297ff1f635f6 (diff) |
Change alt to ctrl for tab movement
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/SearchBar.cpp | 2 | ||||
-rw-r--r-- | src/Tabs.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
@@ -25,8 +25,8 @@ EXAMPLES: If you are running arch linux then you can install QuickMedia from aur (https://aur.archlinux.org/packages/quickmedia-git/), otherwise you will need to first install [sibs](https://git.dec05eba.com/sibs/) and then run `./install.sh` as root. ## Controls Press `Arrow up` / `Arrow down` or `Ctrl+K` / `Ctrl+J` to navigate the menu and also to scroll to the previous/next image when viewing manga in scroll mode. Alternatively you can use the mouse scroll to scroll to the previous/next manga in scroll mode.\ -Press `Alt+Arrow left` / `Alt+Arrow right` or `Ctrl+Alt+H` / `Ctrl+Alt+L` or `Tab` / `Shift+Tab` to switch tab.\ -Press `Alt+1-9` to switch to the specified tab.\ +Press `Ctrl+Arrow left` / `Ctrl+Arrow right` or `Ctrl+H` / `Ctrl+L` or `Ctrl+Tab` / `Ctrl+Shift+Tab` to switch tab.\ +Press `Ctrl+1-9` to switch to the specified tab.\ Press `Page up` to scroll up and entire page or `Page down` to scroll down an entire page.\ Press `Home` to scroll to the top or `End` to scroll to the bottom.\ Press `Enter` (aka `Return`) to select the item.\ diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp index bf58c34..a54fc5d 100644 --- a/src/SearchBar.cpp +++ b/src/SearchBar.cpp @@ -122,7 +122,7 @@ namespace QuickMedia { time_since_search_update.restart(); } - if(sf::Keyboard::isKeyPressed(sf::Keyboard::LAlt) || sf::Keyboard::isKeyPressed(sf::Keyboard::RAlt)) + if(sf::Keyboard::isKeyPressed(sf::Keyboard::LControl) || sf::Keyboard::isKeyPressed(sf::Keyboard::RControl)) return; if(event.type == sf::Event::TextEntered && event.text.unicode != 8 && event.text.unicode != 127) // 8 = backspace, 127 = del diff --git a/src/Tabs.cpp b/src/Tabs.cpp index 390b088..6b8d948 100644 --- a/src/Tabs.cpp +++ b/src/Tabs.cpp @@ -61,11 +61,11 @@ namespace QuickMedia { } void Tabs::on_event(sf::Event &event) { - if(event.type == sf::Event::KeyPressed && !tabs.empty()) { - bool move_left = event.key.alt && (event.key.code == sf::Keyboard::Left || (event.key.control && event.key.code == sf::Keyboard::H)); + if(event.type == sf::Event::KeyPressed && event.key.control && !tabs.empty()) { + bool move_left = (event.key.code == sf::Keyboard::Left || event.key.code == sf::Keyboard::H); move_left |= (event.key.code == sf::Keyboard::Tab && event.key.shift); - bool move_right = event.key.alt && (event.key.code == sf::Keyboard::Right || (event.key.control && event.key.code == sf::Keyboard::L)); + bool move_right = (event.key.code == sf::Keyboard::Right || event.key.code == sf::Keyboard::L); move_right |= (event.key.code == sf::Keyboard::Tab && !event.key.shift); if(move_left) { @@ -74,7 +74,7 @@ namespace QuickMedia { } else if(move_right) { if(selected_tab < (int)tabs.size() - 1) move_selected_tab(selected_tab + 1); - } else if(event.key.alt && event.key.code >= sf::Keyboard::Num1 && event.key.code <= sf::Keyboard::Num9) { + } else if(event.key.code >= sf::Keyboard::Num1 && event.key.code <= sf::Keyboard::Num9) { const int tab_target = event.key.code - sf::Keyboard::Num1; if(tab_target < (int)tabs.size()) move_selected_tab(tab_target); |