Added hotkeys

This commit is contained in:
Mark Qvist 2023-10-26 18:57:35 +02:00
parent 86e053cdb9
commit 3fecb368e5
1 changed files with 4 additions and 2 deletions

View File

@ -769,7 +769,10 @@ class SidebandApp(MDApp):
self.message_send_action() self.message_send_action()
if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "l"): if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "l"):
self.announces_action(self) if self.root.ids.screen_manager.current == "map_screen":
self.map_layers_action()
else:
self.announces_action(self)
if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "m"): if len(modifiers) > 0 and modifiers[0] == 'ctrl' and (text == "m"):
if self.root.ids.screen_manager.current == "messages_screen": if self.root.ids.screen_manager.current == "messages_screen":
@ -3350,7 +3353,6 @@ class SidebandApp(MDApp):
self.map.zoom = minz self.map.zoom = minz
m = self.map m = self.map
RNS.log(f"Map {m.lat} {m.lon} {m.zoom}")
nlat = self.map.lat nlat = self.map.lat
nlon = self.map.lon nlon = self.map.lon
if nlat < -89: nlat = -89 if nlat < -89: nlat = -89