aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-11-22 15:02:34 +0100
committerdec05eba <dec05eba@protonmail.com>2020-11-22 15:02:34 +0100
commit46c042b6202bef5cae0c515edcb832102ee9f256 (patch)
treef50b28fc2a9d4ee81895f1ccc2f32ceff06007af /src
parente2a19ee524cd8bd1003b0a7e59b1490f3e1d1e67 (diff)
Matrix: add vim key navigation for messages/pinned messages view
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 210a31b..0e1c295 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -4110,7 +4110,7 @@ namespace QuickMedia {
tabs[selected_tab].body->select_next_page();
} else if(event.key.code == sf::Keyboard::End) {
tabs[selected_tab].body->select_last_item();
- } else if((event.key.code == sf::Keyboard::Left) && selected_tab > 0) {
+ } else if((event.key.code == sf::Keyboard::Left || (event.key.control && event.key.code == sf::Keyboard::H)) && selected_tab > 0) {
tabs[selected_tab].body->clear_cache();
--selected_tab;
read_marker_timer.restart();
@@ -4120,7 +4120,7 @@ namespace QuickMedia {
typing = false;
typing_state_queue.push(false);
}
- } else if((event.key.code == sf::Keyboard::Right) && selected_tab < (int)tabs.size() - 1) {
+ } else if((event.key.code == sf::Keyboard::Right || (event.key.control && event.key.code == sf::Keyboard::L)) && selected_tab < (int)tabs.size() - 1) {
tabs[selected_tab].body->clear_cache();
++selected_tab;
read_marker_timer.restart();
@@ -4260,16 +4260,6 @@ namespace QuickMedia {
url_selection_body.select_first_item();
} else if(event.key.code == sf::Keyboard::End) {
url_selection_body.select_last_item();
- } else if(event.key.code == sf::Keyboard::Left) {
- if(selected_tab > 0) {
- --selected_tab;
- chat_state = ChatState::NAVIGATING;
- }
- } else if(event.key.code == sf::Keyboard::Right) {
- if(selected_tab < (int)tabs.size() - 1) {
- ++selected_tab;
- chat_state = ChatState::NAVIGATING;
- }
} else if(event.key.code == sf::Keyboard::Escape) {
url_selection_body.clear_items();
chat_state = ChatState::NAVIGATING;