implements notification on tab switch

This commit is contained in:
onyx-and-iris 2023-08-25 22:33:28 +01:00
parent fafe9ea4d6
commit 7d89b0c4ae
2 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class Builder:
tab1 = psg.Tab("settings", layout0, key="settings")
tab2 = psg.Tab("physical strips", layout1, key="physical strip")
tab3 = psg.Tab("virtual strips", layout2, key="virtual strip")
Tg = psg.TabGroup([[tab1, tab2, tab3]])
Tg = psg.TabGroup([[tab1, tab2, tab3]], change_submits=True, key="tabs")
return [[Tg]]

View File

@ -85,6 +85,10 @@ class NVDAVMWindow(psg.Window):
self.logger.debug(f"event::{event}\nvalues::{values}")
if event in (psg.WIN_CLOSED, "Exit"):
break
elif event == "tabs":
self.nvda.speak(f"switched to tab {values['tabs']}")
continue
match parsed_cmd := self.parser.match.parseString(event):
# Hardware out
case [["HARDWARE", "OUT"], [key]]: