add has attribute toggle
This commit is contained in:
parent
ed98994241
commit
2d5609dd84
@ -88,6 +88,7 @@ KEY_FENRIR,KEY_T=time
|
|||||||
2,KEY_FENRIR,KEY_T=date
|
2,KEY_FENRIR,KEY_T=date
|
||||||
KEY_KPSLASH=toggle_auto_indent
|
KEY_KPSLASH=toggle_auto_indent
|
||||||
KEY_KPMINUS=attribute_cursor
|
KEY_KPMINUS=attribute_cursor
|
||||||
|
#=toggle_has_attribute
|
||||||
KEY_FENRIR,KEY_S=spell_check
|
KEY_FENRIR,KEY_S=spell_check
|
||||||
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
||||||
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
||||||
|
@ -88,6 +88,7 @@ KEY_FENRIR,KEY_T=time
|
|||||||
2,KEY_FENRIR,KEY_T=date
|
2,KEY_FENRIR,KEY_T=date
|
||||||
KEY_FENRIR,KEY_BACKSLASH=toggle_auto_indent
|
KEY_FENRIR,KEY_BACKSLASH=toggle_auto_indent
|
||||||
KEY_FENRIR,KEY_MINUS=attribute_cursor
|
KEY_FENRIR,KEY_MINUS=attribute_cursor
|
||||||
|
#=toggle_has_attribute
|
||||||
KEY_FENRIR,KEY_S=spell_check
|
KEY_FENRIR,KEY_S=spell_check
|
||||||
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
||||||
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
^[OP=toggle_tutorial_mode
|
^[OP=toggle_tutorial_mode
|
||||||
# double tap control+end read attributes
|
# double tap control+end read attributes
|
||||||
2,^[[1;5F=attribute_cursor
|
2,^[[1;5F=attribute_cursor
|
||||||
|
#=toggle_has_attribute
|
||||||
# escape - stop speech
|
# escape - stop speech
|
||||||
^[=shut_up
|
^[=shut_up
|
||||||
# context menu key - stop speech
|
# context menu key - stop speech
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/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 _('enables or disables the announcement of attributes')
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self.env['runtime']['settingsManager'].setSetting('general', 'hasAttributes', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes')))
|
||||||
|
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||||
|
self.env['runtime']['outputManager'].presentText(_("announcement of attributes enabled"), soundIcon='', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(_("announcement of attributes disabled"), soundIcon='', interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
Loading…
Reference in New Issue
Block a user