add first letter navigation to vmenu
This commit is contained in:
parent
58208beb3a
commit
7ce471cd08
25
src/fenrirscreenreader/commands/vmenu-navigation/search_a.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_a.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('a')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_b.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_b.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('b')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_c.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_c.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('c')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_d.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_d.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('d')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_e.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_e.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('e')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_f.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_f.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('f')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_g.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_g.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('g')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_h.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_h.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('h')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_i.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_i.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('i')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_j.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_j.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('j')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_k.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_k.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('k')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_l.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_l.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('l')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_m.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_m.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('m')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_n.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_n.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('n')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_o.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_o.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('o')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_p.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_p.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('p')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_q.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_q.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('q')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_r.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_r.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('r')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_s.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_s.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('s')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_t.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_t.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('t')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_u.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_u.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('u')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_v.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_v.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('v')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_w.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_w.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('a')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_x.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_x.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('x')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_y.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_y.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('y')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
25
src/fenrirscreenreader/commands/vmenu-navigation/search_z.py
Normal file
25
src/fenrirscreenreader/commands/vmenu-navigation/search_z.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('search for an menu entry')
|
||||
def run(self):
|
||||
text = self.env['runtime']['vmenuManager'].searchEntry('z')
|
||||
if text != '':
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -11,6 +11,7 @@ class helpManager():
|
||||
def __init__(self):
|
||||
self.helpDict = {}
|
||||
self.tutorialListIndex = None
|
||||
self.bindingsBackup = None
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
@ -18,8 +19,11 @@ class helpManager():
|
||||
def toggleTutorialMode(self):
|
||||
self.setTutorialMode(not self.env['general']['tutorialMode'])
|
||||
def setTutorialMode(self, newTutorialMode):
|
||||
if self.environment['runtime']['vmenuManager'].getActive():
|
||||
return
|
||||
self.env['general']['tutorialMode'] = newTutorialMode
|
||||
if newTutorialMode:
|
||||
self.bindingsBackup = self.env['bindings'].copy()
|
||||
self.createHelpDict()
|
||||
self.env['bindings'][str([1, ['KEY_ESC']])] = 'TOGGLE_TUTORIAL_MODE'
|
||||
self.env['bindings'][str([1, ['KEY_UP']])] = 'PREV_HELP'
|
||||
@ -27,10 +31,12 @@ class helpManager():
|
||||
self.env['bindings'][str([1, ['KEY_SPACE']])] = 'CURR_HELP'
|
||||
else:
|
||||
try:
|
||||
del(self.env['bindings'][str([1, ['KEY_ESC']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_UP']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_DOWN']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_SPACE']])])
|
||||
self.env['bindings'] = self.bindingsBackup.copy()
|
||||
self.bindingsBackup = None
|
||||
#del(self.env['bindings'][str([1, ['KEY_ESC']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_UP']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_DOWN']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_SPACE']])])
|
||||
except:
|
||||
pass
|
||||
def isTutorialMode(self):
|
||||
|
@ -17,8 +17,11 @@ class vmenuManager():
|
||||
self.currIndex = None
|
||||
self.currMenu = ''
|
||||
self.active = False
|
||||
self.reset = True
|
||||
self.useTimeout = True
|
||||
self.searchText = ''
|
||||
self.lastSearchTime = time.time()
|
||||
self.bindingsBackup = None
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
# use default path
|
||||
@ -34,22 +37,29 @@ class vmenuManager():
|
||||
self.closeAfterAction = False
|
||||
def shutdown(self):
|
||||
pass
|
||||
def searchEntry(self, value):
|
||||
if self.currIndex == None:
|
||||
return False
|
||||
if time.time() - self.lastSearchTime > 1:
|
||||
def clearSearchText(self):
|
||||
self.searchText = ''
|
||||
def searchEntry(self, value, forceReset = False):
|
||||
if self.currIndex == None:
|
||||
return ''
|
||||
if self.reset or forceReset:
|
||||
self.clearSearchText()
|
||||
else:
|
||||
if self.useTimeout:
|
||||
if time.time() - self.lastSearchTime > 1:
|
||||
self.clearSearchText()
|
||||
self.searchText += value
|
||||
self.lastSearchTime = time.time()
|
||||
startIndex = 0
|
||||
startIndex = self.getCurrIndex()
|
||||
while True:
|
||||
if not self.nextIndex():
|
||||
return ''
|
||||
entry = self.getCurrentEntry()
|
||||
if entry.startswith(self.searchText):
|
||||
return True
|
||||
if not self.nextIndex():
|
||||
return False
|
||||
if True:
|
||||
return False
|
||||
return entry
|
||||
if startIndex == self.getCurrIndex():
|
||||
return ''
|
||||
|
||||
def setCurrMenu(self, currMenu = ''):
|
||||
self.currIndex = None
|
||||
self.currMenu = ''
|
||||
@ -76,6 +86,8 @@ class vmenuManager():
|
||||
def togglelVMenuMode(self, closeAfterAction = True):
|
||||
self.setActive(not self.getActive(), closeAfterAction)
|
||||
def setActive(self, active, closeAfterAction = True):
|
||||
if self.env['runtime']['helpManager'].isTutorialMode():
|
||||
return
|
||||
self.active = active
|
||||
if self.active:
|
||||
self.closeAfterAction = closeAfterAction
|
||||
@ -92,6 +104,8 @@ class vmenuManager():
|
||||
except Exception as e:
|
||||
print(e)
|
||||
try:
|
||||
self.bindingsBackup = self.env['bindings'].copy()
|
||||
# navigation
|
||||
self.env['bindings'][str([1, ['KEY_ESC']])] = 'TOGGLE_VMENU_MODE'
|
||||
self.env['bindings'][str([1, ['KEY_UP']])] = 'PREV_VMENU_ENTRY'
|
||||
self.env['bindings'][str([1, ['KEY_DOWN']])] = 'NEXT_VMENU_ENTRY'
|
||||
@ -99,18 +113,47 @@ class vmenuManager():
|
||||
self.env['bindings'][str([1, ['KEY_LEFT']])] = 'DEC_LEVEL_VMENU'
|
||||
self.env['bindings'][str([1, ['KEY_RIGHT']])] = 'INC_LEVEL_VMENU'
|
||||
self.env['bindings'][str([1, ['KEY_ENTER']])] = 'EXEC_VMENU_ENTRY'
|
||||
# search
|
||||
self.env['bindings'][str([1, ['KEY_A']])] = 'SEARCH_A'
|
||||
self.env['bindings'][str([1, ['KEY_B']])] = 'SEARCH_B'
|
||||
self.env['bindings'][str([1, ['KEY_C']])] = 'SEARCH_C'
|
||||
self.env['bindings'][str([1, ['KEY_D']])] = 'SEARCH_D'
|
||||
self.env['bindings'][str([1, ['KEY_E']])] = 'SEARCH_E'
|
||||
self.env['bindings'][str([1, ['KEY_F']])] = 'SEARCH_F'
|
||||
self.env['bindings'][str([1, ['KEY_G']])] = 'SEARCH_G'
|
||||
self.env['bindings'][str([1, ['KEY_H']])] = 'SEARCH_H'
|
||||
self.env['bindings'][str([1, ['KEY_I']])] = 'SEARCH_I'
|
||||
self.env['bindings'][str([1, ['KEY_J']])] = 'SEARCH_J'
|
||||
self.env['bindings'][str([1, ['KEY_K']])] = 'SEARCH_K'
|
||||
self.env['bindings'][str([1, ['KEY_L']])] = 'SEARCH_L'
|
||||
self.env['bindings'][str([1, ['KEY_M']])] = 'SEARCH_M'
|
||||
self.env['bindings'][str([1, ['KEY_N']])] = 'SEARCH_N'
|
||||
self.env['bindings'][str([1, ['KEY_O']])] = 'SEARCH_O'
|
||||
self.env['bindings'][str([1, ['KEY_P']])] = 'SEARCH_P'
|
||||
self.env['bindings'][str([1, ['KEY_Q']])] = 'SEARCH_Q'
|
||||
self.env['bindings'][str([1, ['KEY_R']])] = 'SEARCH_R'
|
||||
self.env['bindings'][str([1, ['KEY_S']])] = 'SEARCH_S'
|
||||
self.env['bindings'][str([1, ['KEY_T']])] = 'SEARCH_T'
|
||||
self.env['bindings'][str([1, ['KEY_U']])] = 'SEARCH_U'
|
||||
self.env['bindings'][str([1, ['KEY_V']])] = 'SEARCH_V'
|
||||
self.env['bindings'][str([1, ['KEY_W']])] = 'SEARCH_W'
|
||||
self.env['bindings'][str([1, ['KEY_X']])] = 'SEARCH_X'
|
||||
self.env['bindings'][str([1, ['KEY_Y']])] = 'SEARCH_Y'
|
||||
self.env['bindings'][str([1, ['KEY_Z']])] = 'SEARCH_Z'
|
||||
except Exception as e:
|
||||
print(e)
|
||||
else:
|
||||
try:
|
||||
self.currIndex = None
|
||||
del(self.env['bindings'][str([1, ['KEY_ESC']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_UP']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_DOWN']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_SPACE']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_LEFT']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_RIGHT']])])
|
||||
del(self.env['bindings'][str([1, ['KEY_ENTER']])])
|
||||
self.env['bindings'] = self.bindingsBackup.copy()
|
||||
self.bindingsBackup = None
|
||||
#del(self.env['bindings'][str([1, ['KEY_ESC']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_UP']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_DOWN']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_SPACE']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_LEFT']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_RIGHT']])])
|
||||
#del(self.env['bindings'][str([1, ['KEY_ENTER']])])
|
||||
except:
|
||||
pass
|
||||
def createMenuTree(self):
|
||||
@ -164,7 +207,10 @@ class vmenuManager():
|
||||
else:
|
||||
self.currIndex[len(self.currIndex) - 1] += 1
|
||||
return True
|
||||
|
||||
def getCurrIndex(self):
|
||||
if self.currIndex == None:
|
||||
return 0
|
||||
return self.currIndex[len(self.currIndex) - 1]
|
||||
def prevIndex(self):
|
||||
if self.currIndex == None:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user