From 7fb5dcd3622a8394500b63e41e4b5cd95aba018a Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 6 May 2024 16:13:44 +0200 Subject: [PATCH] Focus message input field with tab --- sbapp/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sbapp/main.py b/sbapp/main.py index b02a752..c8ca169 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -873,6 +873,15 @@ class SidebandApp(MDApp): c_index = keycode-29 self.conversation_index_action(c_index) + if self.root.ids.screen_manager.current == "messages_screen": + if keycode == 43: + if not self.messages_view.ids.message_text.focus: + self.messages_view.ids.message_text.write_tab = False + self.messages_view.ids.message_text.focus = True + def tab_job(delta): + self.messages_view.ids.message_text.write_tab = True + Clock.schedule_once(tab_job, 0.15) + if len(modifiers) > 0: if modifiers[0] == "ctrl": if text == "q":