Temperarily change the keyboard short fo version to cthulhu+x.
This commit is contained in:
parent
8e9ea3af5a
commit
5dd872535d
@ -35,14 +35,27 @@ class DisplayVersion(GObject.Object, Peas.Activatable, plugin.Plugin):
|
||||
__gtype_name__ = 'displayversion'
|
||||
|
||||
object = GObject.Property(type=GObject.Object)
|
||||
|
||||
def __init__(self):
|
||||
plugin.Plugin.__init__(self)
|
||||
self._api = None
|
||||
|
||||
def do_activate(self):
|
||||
API = self.object
|
||||
self.registerGestureByString(self.speakText, _(f'Cthulhu screen reader version {cthulhuVersion.version}-{cthulhuVersion.codeName}'), 'kb:cthulhu+shift+v')
|
||||
self._api = self.object
|
||||
self.registerGestureByString(
|
||||
self.speakText,
|
||||
_(f'Cthulhu screen reader version {cthulhuVersion.version}-{cthulhuVersion.codeName}'),
|
||||
'kb:cthulhu+x'
|
||||
)
|
||||
|
||||
def do_deactivate(self):
|
||||
API = self.object
|
||||
self._api = None
|
||||
|
||||
def speakText(self, script=None, inputEvent=None):
|
||||
API = self.object
|
||||
API.app.getDynamicApiManager().getAPI('CthulhuState').activeScript.presentMessage(f'Cthulhu screen reader version {cthulhuVersion.version}-{cthulhuVersion.codeName}', resetStyles=False)
|
||||
if not self._api:
|
||||
return False
|
||||
self._api.app.getDynamicApiManager().getAPI('CthulhuState').activeScript.presentMessage(
|
||||
f'Cthulhu screen reader version {cthulhuVersion.version}-{cthulhuVersion.codeName}',
|
||||
resetStyles=False
|
||||
)
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user