[ Samuel Thibault ]
[ Debian Janitor ]
New upstream release.
Debian Janitor
2 years ago
70 | 70 | # installation |
71 | 71 | - Archlinux: PKGBUILD in AUR |
72 | 72 | - PIP: sudo pip install fenrir-screenreader |
73 | - Manual: run install.sh and uninstall.sh as root | |
73 | - Manual: | |
74 | - install "espeak" and "sox" with your package manager | |
75 | - sudo pip install -r requirements.txt | |
76 | - run install.sh and uninstall.sh as root | |
74 | 77 | - you also can just run it from Git without installing: |
75 | 78 | You can just run the following as root: |
76 | 79 | if you are in Fenrir Git rootfolder: |
83 | 86 | - speech driver: genericDriver (via espeak or espeak-ng, could configured in settings.conf) |
84 | 87 | - braille driver: brlttyDriver (WIP) |
85 | 88 | - input driver: evdevDriver |
89 | # Configure pulseaudio | |
90 | Pulseaudio by default does only play sound for the user its currently running for. As fenrir is running as root, your local user does not hear the sound and speech produced by fenrir. | |
91 | for this fenrir provides a script to configure pulseaudio to stream the sound played as root to your local user. Last is playing the sound then. This is not a issue of fenrir but this is how pulseaudio works. | |
86 | 92 | |
93 | just run the configuration scipt twice (once as user, once as root). | |
94 | ||
95 | Run: | |
96 | configure_pulse.sh | |
97 | sudo configure_pulse.sh | |
98 | ||
99 | The script could also be found at /tools/ in git | |
100 | ||
101 | # localization | |
102 | copy fenrir.mo translations file from fenrir/locale/your_language/LC_MESSAGES/fenrir.mo to /usr/share/locale/your_language/LC_MESSAGES/fenrir.mo | |
103 | ||
87 | 104 | # Documentation |
88 | 105 | You can see all information on the Wiki: |
89 | 106 | https://wiki.linux-a11y.org/doku.php?id=fenrir_user_manual |
19 | 19 | [] replace lines by a list insteed of and \n seperated string. (currently we need to split to often) (Easy for contribution) |
20 | 20 | General (Easy for contribution) |
21 | 21 | [w] make fenrir runnable without root permissions |
22 | [] check pythran for performance | |
23 | https://github.com/serge-sans-paille/pythran | |
22 | 24 | [] make fenrir runable without settingsfile. fallback to defaults |
23 | 25 | [] Detect progressbars and just present percent |
24 | 26 | |=============== |100% |
5 | 5 | # speech: speech-dispatcher |
6 | 6 | # sound: sox |
7 | 7 | # braille: brltty: |
8 | defaultInstallation = ['FenrirCore','vcsaDriver','brlapiDriver','evdevDriver','genericDriver (speech)', 'genericDriver (sound)'] | |
8 | defaultInstallation = ['FenrirCore','vcsaDriver','dummyDriver (braille)','evdevDriver','genericDriver (speech)', 'genericDriver (sound)'] | |
9 | 9 | currentInstallation = [] |
10 | 10 | |
11 | 11 | print('checking dependencys...') |
33 | 33 | # SCREEN |
34 | 34 | print('--------------------') |
35 | 35 | print('screen driver') |
36 | # dummy and debug | |
37 | print('dummyDriver (screen): OK') | |
38 | currentInstallation.append('dummyDriver (screen)') | |
39 | ||
36 | 40 | # VCSA (screen driver) |
37 | 41 | print('vcsaDriver') |
38 | 42 | available = True |
65 | 69 | # BRAILLE |
66 | 70 | print('--------------------') |
67 | 71 | print('braille driver') |
72 | # dummy and debug | |
73 | print('dummyDriver (braille): OK') | |
74 | currentInstallation.append('dummyDriver (braille)') | |
75 | print('debugDriver (braille): OK') | |
76 | currentInstallation.append('debugDriver (braille)') | |
68 | 77 | # brltty (braille driver) |
69 | 78 | print('brlapiDriver') |
70 | 79 | available = True |
80 | 89 | # INPUT |
81 | 90 | print('--------------------') |
82 | 91 | print('input driver') |
92 | # dummy and debug | |
93 | print('dummyDriver (input): OK') | |
94 | currentInstallation.append('dummyDriver (input)') | |
95 | print('debugDriver (input): OK') | |
96 | currentInstallation.append('debugDriver (input)') | |
83 | 97 | # evdev (input driver) |
84 | 98 | print('evdevDriver') |
85 | 99 | available = True |
89 | 103 | print('python3-evdev: OK') |
90 | 104 | except: |
91 | 105 | print('python3-evdev: FAIL') |
92 | available = available and False | |
106 | available = available and False | |
93 | 107 | try: |
94 | 108 | import pyudev |
95 | 109 | print('python3-pyudev: OK') |
96 | 110 | except: |
97 | 111 | print('python3-pyudev: FAIL') |
98 | available = available and False | |
112 | available = available and False | |
99 | 113 | if available: |
100 | 114 | currentInstallation.append('evdevDriver') |
101 | 115 | # pty emulation (input driver) |
107 | 121 | print('pyte: OK') |
108 | 122 | except: |
109 | 123 | print('pyte: FAIL') |
110 | available = available and False | |
111 | if available: | |
112 | currentInstallation.append('ptyDriver (Input)') | |
124 | available = available and False | |
125 | if available: | |
126 | currentInstallation.append('ptyDriver (Input)') | |
113 | 127 | # SOUND |
114 | 128 | print('--------------------') |
115 | 129 | print('sound driver') |
130 | # dummy and debug | |
131 | print('dummyDriver (sound): OK') | |
132 | currentInstallation.append('dummyDriver (sound)') | |
133 | print('debugDriver (sound): OK') | |
134 | currentInstallation.append('debugDriver (sound)') | |
116 | 135 | print('genericDriver (uses sox by default)') |
117 | 136 | available = True |
118 | 137 | if os.path.exists('/usr/bin/play') and os.path.exists('/usr/bin/sox'): |
119 | 138 | print('sox: OK') |
120 | 139 | else: |
121 | 140 | print('sox: FAIL') |
122 | available = available and False | |
141 | available = available and False | |
123 | 142 | if available: |
124 | 143 | currentInstallation.append('genericDriver (sound)') |
125 | 144 | print('') |
131 | 150 | print('gi: OK') |
132 | 151 | except: |
133 | 152 | print('gi: FAIL') |
134 | available = available and False | |
153 | available = available and False | |
135 | 154 | try: |
136 | 155 | from gi.repository import GLib |
137 | 156 | print('gi GLib: OK') |
138 | 157 | except: |
139 | 158 | print('gi GLib: FAIL') |
140 | available = available and False | |
159 | available = available and False | |
141 | 160 | try: |
142 | 161 | gi.require_version('Gst', '1.0') |
143 | 162 | from gi.repository import Gst |
144 | 163 | print('gi Gst: OK') |
145 | 164 | except: |
146 | print('gi Gst: FAIL') | |
147 | available = available and False | |
165 | print('gi Gst: FAIL') | |
166 | available = available and False | |
148 | 167 | if available: |
149 | 168 | currentInstallation.append('gstreamerDriver') |
150 | 169 | |
151 | 170 | # SPEECH |
152 | 171 | print('--------------------') |
153 | 172 | print('speech driver') |
173 | # dummy and debug | |
174 | print('dummyDriver (speech): OK') | |
175 | currentInstallation.append('dummyDriver (speech)') | |
176 | print('debugDriver (speech): OK') | |
177 | currentInstallation.append('debugDriver (speech)') | |
154 | 178 | # speechd (speech driver) |
155 | 179 | print('speechdDriver') |
156 | 180 | available = True |
159 | 183 | print('python3-speechd: OK') |
160 | 184 | except: |
161 | 185 | print('python3-speechd: FAIL') |
162 | available = available and False | |
186 | available = available and False | |
163 | 187 | if available: |
164 | 188 | currentInstallation.append('speechdDriver') |
165 | 189 | print('') |
171 | 195 | print('python3-espeak: OK') |
172 | 196 | except: |
173 | 197 | print('python3-espeak: FAIL') |
198 | available = available and False | |
199 | if available: | |
200 | currentInstallation.append('espeakDriver') | |
201 | print('genericDriver (uses espeak-ng by default)') | |
202 | available = True | |
203 | if os.path.exists('/usr/bin/espeak-ng') or os.path.exists('/bin/espeak-ng'): | |
204 | print('espeak-ng: OK') | |
205 | else: | |
206 | print('espeak-ng: FAIL') | |
174 | 207 | available = available and False |
175 | 208 | if available: |
176 | currentInstallation.append('espeakDriver') | |
177 | print('genericDriver (uses espeak by default)') | |
178 | available = True | |
179 | if os.path.exists('/usr/bin/espeak') or os.path.exists('/bin/espeak'): | |
180 | print('espeak: OK') | |
181 | else: | |
182 | print('espeak: FAIL') | |
183 | available = available and False | |
184 | if available: | |
185 | currentInstallation.append('genericDriver (speech)') | |
209 | currentInstallation.append('genericDriver (speech)') | |
186 | 210 | |
187 | 211 | # SUMMERY |
188 | 212 | print('====================') |
60 | 60 | KEY_FENRIR,KEY_7=bookmark_7 |
61 | 61 | KEY_FENRIR,KEY_CTRL,KEY_8=clear_bookmark_8 |
62 | 62 | KEY_FENRIR,KEY_SHIFT,KEY_8=set_bookmark_8 |
63 | #KEY_FENRIR,KEY_8=bookmark_8 | |
63 | KEY_FENRIR,KEY_8=bookmark_8 | |
64 | 64 | KEY_FENRIR,KEY_CTRL,KEY_9=clear_bookmark_9 |
65 | 65 | KEY_FENRIR,KEY_SHIFT,KEY_9=set_bookmark_9 |
66 | 66 | KEY_FENRIR,KEY_9=bookmark_9 |
92 | 92 | 2,KEY_FENRIR,KEY_S=add_word_to_spell_check |
93 | 93 | KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check |
94 | 94 | KEY_FENRIR,KEY_BACKSPACE=forward_keypress |
95 | KEY_FENRIR,KEY_UP=inc_speech_volume | |
96 | KEY_FENRIR,KEY_DOWN=dec_speech_volume | |
97 | KEY_FENRIR,KEY_RIGHT=inc_speech_rate | |
98 | KEY_FENRIR,KEY_LEFT=dec_speech_rate | |
99 | KEY_FENRIR,KEY_ALT,KEY_RIGHT=inc_speech_pitch | |
100 | KEY_FENRIR,KEY_ALT,KEY_LEFT=dec_speech_pitch | |
101 | 95 | KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume |
102 | 96 | KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume |
103 | 97 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_C=clear_clipboard |
107 | 101 | KEY_FENRIR,KEY_PAGEDOWN=next_clipboard |
108 | 102 | KEY_FENRIR,KEY_SHIFT,KEY_C=curr_clipboard |
109 | 103 | KEY_FENRIR,KEY_C=copy_marked_to_clipboard |
110 | KEY_FENRIR,KEY_CTRL,KEY_U=copy_last_echo_to_clipboard | |
104 | KEY_FENRIR,KEY_CTRL,KEY_C=copy_last_echo_to_clipboard | |
111 | 105 | KEY_FENRIR,KEY_V=paste_clipboard |
112 | 106 | KEY_FENRIR,KEY_F5=import_clipboard_from_file |
113 | 107 | KEY_FENRIR,KEY_F6=export_clipboard_to_file |
114 | 108 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_X=remove_marks |
115 | 109 | KEY_FENRIR,KEY_X=set_mark |
116 | 110 | KEY_FENRIR,KEY_SHIFT,KEY_X=marked_text |
111 | KEY_FENRIR,KEY_F10=toggle_vmenu_mode | |
112 | KEY_FENRIR,KEY_SPACE=current_quick_menu_entry | |
113 | KEY_FENRIR,KEY_CTRL,KEY_SPACE=current_quick_menu_value | |
114 | KEY_FENRIR,KEY_RIGHT=next_quick_menu_entry | |
115 | KEY_FENRIR,KEY_UP=next_quick_menu_value | |
116 | KEY_FENRIR,KEY_LEFT=prev_quick_menu_entry | |
117 | KEY_FENRIR,KEY_DOWN=prev_quick_menu_value | |
118 | KEY_FENRIR,KEY_CTRL,KEY_S=save_settings | |
117 | 119 | # linux specific |
118 | 120 | KEY_FENRIR,KEY_F7=import_clipboard_from_x |
119 | 121 | KEY_FENRIR,KEY_F8=export_clipboard_to_x |
92 | 92 | 2,KEY_FENRIR,KEY_S=add_word_to_spell_check |
93 | 93 | KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check |
94 | 94 | KEY_FENRIR,KEY_BACKSPACE=forward_keypress |
95 | KEY_FENRIR,KEY_UP=inc_speech_volume | |
96 | KEY_FENRIR,KEY_DOWN=dec_speech_volume | |
97 | KEY_FENRIR,KEY_RIGHT=inc_speech_rate | |
98 | KEY_FENRIR,KEY_LEFT=dec_speech_rate | |
99 | KEY_FENRIR,KEY_ALT,KEY_RIGHT=inc_speech_pitch | |
100 | KEY_FENRIR,KEY_ALT,KEY_LEFT=dec_speech_pitch | |
101 | 95 | KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume |
102 | 96 | KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume |
103 | 97 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_C=clear_clipboard |
114 | 108 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_X=remove_marks |
115 | 109 | KEY_FENRIR,KEY_X=set_mark |
116 | 110 | KEY_FENRIR,KEY_SHIFT,KEY_X=marked_text |
111 | KEY_FENRIR,KEY_F10=toggle_vmenu_mode | |
112 | KEY_FENRIR,KEY_UP=inc_speech_volume | |
113 | KEY_FENRIR,KEY_DOWN=dec_speech_volume | |
114 | KEY_FENRIR,KEY_RIGHT=inc_speech_rate | |
115 | KEY_FENRIR,KEY_LEFT=dec_speech_rate | |
116 | KEY_FENRIR,KEY_ALT,KEY_RIGHT=inc_speech_pitch | |
117 | KEY_FENRIR,KEY_ALT,KEY_LEFT=dec_speech_pitch | |
118 | KEY_FENRIR,KEY_CTRL,KEY_S=save_settings | |
117 | 119 | # linux specific |
118 | 120 | KEY_FENRIR,KEY_F7=import_clipboard_from_x |
119 | 121 | KEY_FENRIR,KEY_F8=export_clipboard_to_x |
0 | KEY_FENRIR,KEY_F1=toggle_tutorial_mode | |
1 | KEY_FENRIR,KEY_H=toggle_tutorial_mode | |
2 | KEY_CTRL=shut_up | |
3 | KEY_SHIFT,KEY_KP9=review_bottom | |
4 | KEY_SHIFT,KEY_KP7=review_top | |
5 | KEY_KP8=review_curr_line | |
6 | KEY_KP7=review_prev_line | |
7 | KEY_KP9=review_next_line | |
8 | KEY_SHIFT,KEY_KP1=review_line_begin | |
9 | KEY_SHIFT,KEY_KP3=review_line_end | |
10 | KEY_FENRIR,KEY_KP1=review_line_first_char | |
11 | KEY_FENRIR,KEY_KP3=review_line_last_char | |
12 | KEY_FENRIR,KEY_ALT,KEY_1=present_first_line | |
13 | KEY_FENRIR,KEY_ALT,KEY_2=present_last_line | |
14 | KEY_KP5=review_curr_word | |
15 | KEY_KP4=review_prev_word | |
16 | KEY_KP6=review_next_word | |
17 | 2,KEY_KP5=review_curr_word_phonetic | |
18 | 2,KEY_KP4=review_prev_word_phonetic | |
19 | 2,KEY_KP6=review_next_word_phonetic | |
20 | KEY_KP2=review_curr_char | |
21 | KEY_KP1=review_prev_char | |
22 | KEY_KP3=review_next_char | |
23 | 2,KEY_KP2=review_curr_char_phonetic | |
24 | 2,KEY_KP1=review_prev_char_phonetic | |
25 | 2,KEY_KP3=review_next_char_phonetic | |
26 | KEY_FENRIR,KEY_CTRL,KEY_KP8=review_up | |
27 | KEY_FENRIR,KEY_CTRL,KEY_KP2=review_down | |
28 | KEY_FENRIR,KEY_KPDOT=exit_review | |
29 | KEY_KPDOT=cursor_position | |
30 | KEY_FENRIR,KEY_I=indent_curr_line | |
31 | KEY_FENRIR,KEY_B=curr_screen | |
32 | KEY_FENRIR,KEY_KP8=curr_screen_before_cursor | |
33 | KEY_FENRIR,KEY_KP2=curr_screen_after_cursor | |
34 | KEY_FENRIR,KEY_SHIFT,KEY_PAGEDOWN=cursor_read_to_end_of_line | |
35 | #=cursor_column | |
36 | #=cursor_lineno | |
37 | #=braille_flush | |
38 | KEY_FENRIR,KEY_CTRL,KEY_T=braille_return_to_cursor | |
39 | #=braille_pan_left | |
40 | #=braille_pan_right | |
41 | KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1 | |
42 | KEY_FENRIR,KEY_SHIFT,KEY_1=set_bookmark_1 | |
43 | KEY_FENRIR,KEY_1=bookmark_1 | |
44 | KEY_FENRIR,KEY_K=bookmark_1 | |
45 | KEY_FENRIR,KEY_CTRL,KEY_2=clear_bookmark_2 | |
46 | KEY_FENRIR,KEY_SHIFT,KEY_2=set_bookmark_2 | |
47 | KEY_FENRIR,KEY_2=bookmark_2 | |
48 | KEY_FENRIR,KEY_CTRL,KEY_3=clear_bookmark_3 | |
49 | KEY_FENRIR,KEY_SHIFT,KEY_3=set_bookmark_3 | |
50 | KEY_FENRIR,KEY_3=bookmark_3 | |
51 | KEY_FENRIR,KEY_CTRL,KEY_4=clear_bookmark_4 | |
52 | KEY_FENRIR,KEY_SHIFT,KEY_4=set_bookmark_4 | |
53 | KEY_FENRIR,KEY_4=bookmark_4 | |
54 | KEY_FENRIR,KEY_CTRL,KEY_5=clear_bookmark_5 | |
55 | KEY_FENRIR,KEY_SHIFT,KEY_5=set_bookmark_5 | |
56 | KEY_FENRIR,KEY_5=bookmark_5 | |
57 | KEY_FENRIR,KEY_CTRL,KEY_6=clear_bookmark_6 | |
58 | KEY_FENRIR,KEY_SHIFT,KEY_6=set_bookmark_6 | |
59 | KEY_FENRIR,KEY_6=bookmark_6 | |
60 | KEY_FENRIR,KEY_CTRL,KEY_7=clear_bookmark_7 | |
61 | KEY_FENRIR,KEY_SHIFT,KEY_7=set_bookmark_7 | |
62 | KEY_FENRIR,KEY_7=bookmark_7 | |
63 | KEY_FENRIR,KEY_CTRL,KEY_8=clear_bookmark_8 | |
64 | KEY_FENRIR,KEY_SHIFT,KEY_8=set_bookmark_8 | |
65 | KEY_FENRIR,KEY_8=bookmark_8 | |
66 | KEY_FENRIR,KEY_CTRL,KEY_9=clear_bookmark_9 | |
67 | KEY_FENRIR,KEY_SHIFT,KEY_9=set_bookmark_9 | |
68 | KEY_FENRIR,KEY_9=bookmark_9 | |
69 | KEY_FENRIR,KEY_CTRL,KEY_0=clear_bookmark_10 | |
70 | KEY_FENRIR,KEY_SHIFT,KEY_0=set_bookmark_10 | |
71 | KEY_FENRIR,KEY_0=bookmark_10 | |
72 | KEY_FENRIR,KEY_KPSLASH=set_window_application | |
73 | 2,KEY_FENRIR,KEY_KPSLASH=clear_window_application | |
74 | KEY_KPPLUS=last_incoming | |
75 | #=toggle_braille | |
76 | KEY_FENRIR,KEY_F3=toggle_sound | |
77 | KEY_FENRIR,KEY_F4=toggle_speech | |
78 | KEY_KPENTER=temp_disable_speech | |
79 | KEY_FENRIR,KEY_P=toggle_punctuation_level | |
80 | KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check | |
81 | KEY_FENRIR,KEY_S=toggle_output | |
82 | KEY_FENRIR,KEY_CTRL,KEY_E=toggle_emoticons | |
83 | key_FENRIR,KEY_5=toggle_auto_read | |
84 | KEY_FENRIR,KEY_CTRL,KEY_T=toggle_auto_time | |
85 | KEY_FENRIR,KEY_KPASTERISK=toggle_highlight_tracking | |
86 | KEY_FENRIR,KEY_KPMINUS=toggle_barrier | |
87 | KEY_FENRIR,KEY_Q=quit_fenrir | |
88 | KEY_FENRIR,KEY_T=time | |
89 | KEY_FENRIR,KEY_F12=time | |
90 | 2,KEY_FENRIR,KEY_T=date | |
91 | 2,KEY_FENRIR,KEY_F12=date | |
92 | KEY_KPSLASH=toggle_auto_indent | |
93 | KEY_FENRIR,KEY_F=attribute_cursor | |
94 | #=toggle_has_attribute | |
95 | KEY_FENRIR,KEY_F7=spell_check | |
96 | 2,KEY_FENRIR,KEY_S=add_word_to_spell_check | |
97 | KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check | |
98 | KEY_FENRIR,KEY_F2=forward_keypress | |
99 | KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume | |
100 | KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume | |
101 | #=clear_clipboard | |
102 | KEY_FENRIR,KEY_HOME=first_clipboard | |
103 | KEY_FENRIR,KEY_END=last_clipboard | |
104 | KEY_FENRIR,KEY_PAGEUP=prev_clipboard | |
105 | KEY_FENRIR,KEY_PAGEDOWN=next_clipboard | |
106 | KEY_FENRIR,KEY_SHIFT,KEY_C=curr_clipboard | |
107 | KEY_FENRIR,KEY_C=copy_marked_to_clipboard | |
108 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_C=copy_last_echo_to_clipboard | |
109 | KEY_FENRIR,KEY_V=paste_clipboard | |
110 | KEY_FENRIR,KEY_F5=import_clipboard_from_file | |
111 | KEY_FENRIR,KEY_F6=export_clipboard_to_file | |
112 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_X=remove_marks | |
113 | KEY_FENRIR,KEY_F9=set_mark | |
114 | KEY_FENRIR,KEY_F10=marked_text | |
115 | KEY_FENRIR,KEY_F10=toggle_vmenu_mode | |
116 | KEY_FENRIR,KEY_SPACE=current_quick_menu_entry | |
117 | KEY_FENRIR,KEY_CTRL,KEY_SPACE=current_quick_menu_value | |
118 | KEY_FENRIR,KEY_CTRL,KEY_RIGHT=next_quick_menu_entry | |
119 | KEY_FENRIR,KEY_CTRL,KEY_UP=next_quick_menu_value | |
120 | KEY_FENRIR,KEY_CTRL,KEY_LEFT=prev_quick_menu_entry | |
121 | KEY_FENRIR,KEY_CTRL,KEY_DOWN=prev_quick_menu_value | |
122 | KEY_FENRIR,KEY_CTRL,KEY_C=save_settings | |
123 | # linux specific | |
124 | #=import_clipboard_from_x | |
125 | KEY_FENRIR,KEY_F8=export_clipboard_to_x | |
126 | KEY_FENRIR,KEY_ALT,KEY_UP=inc_alsa_volume | |
127 | KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_alsa_volume |
0 | KEY_FENRIR,KEY_F1=toggle_tutorial_mode | |
1 | KEY_FENRIR,KEY_H=toggle_tutorial_mode | |
2 | KEY_CTRL=shut_up | |
3 | KEY_FENRIR,KEY_CTRL,KEY_END=review_bottom | |
4 | KEY_FENRIR,KEY_CTRL,KEY_HOME=review_top | |
5 | KEY_FENRIR,KEY_SHIFT,KEY_DOT=review_curr_line | |
6 | KEY_FENRIR,KEY_U=review_prev_line | |
7 | KEY_FENRIR,KEY_O=review_next_line | |
8 | KEY_FENRIR,KEY_HOME=review_line_begin | |
9 | KEY_FENRIR,KEY_END=review_line_end | |
10 | KEY_FENRIR,KEY_CTRL,KEY_J=review_line_first_char | |
11 | KEY_FENRIR,KEY_CTRL,KEY_L=review_line_last_char | |
12 | KEY_FENRIR,KEY_ALT,KEY_1=present_first_line | |
13 | KEY_FENRIR,KEY_ALT,KEY_2=present_last_line | |
14 | KEY_FENRIR,KEY_CTRL,KEY_DOT=review_curr_word | |
15 | KEY_FENRIR,KEY_J=review_prev_word | |
16 | KEY_FENRIR,KEY_L=review_next_word | |
17 | 2,KEY_FENRIR,KEY_CTRL,KEY_DOT=review_curr_word_phonetic | |
18 | 2,KEY_FENRIR,KEY_J=review_prev_word_phonetic | |
19 | 2,KEY_FENRIR,KEY_L=review_next_word_phonetic | |
20 | KEY_FENRIR,KEY_COMMA=review_curr_char | |
21 | KEY_FENRIR,KEY_M=review_prev_char | |
22 | KEY_FENRIR,KEY_DOT=review_next_char | |
23 | 2,KEY_FENRIR,KEY_COMMA=curr_char_phonetic | |
24 | 2,KEY_FENRIR,KEY_M=prev_char_phonetic | |
25 | 2,KEY_FENRIR,KEY_DOT=next_char_phonetic | |
26 | KEY_FENRIR,KEY_CTRL,KEY_I=review_up | |
27 | KEY_FENRIR,KEY_CTRL,KEY_COMMA=review_down | |
28 | KEY_FENRIR,KEY_SLASH=exit_review | |
29 | KEY_FENRIR,KEY_SHIFT,KEY_DOT=cursor_position | |
30 | 2,KEY_FENRIR,KEY_I=indent_curr_line | |
31 | KEY_FENRIR,KEY_B=curr_screen | |
32 | KEY_FENRIR,KEY_SHIFT,KEY_I=curr_screen_before_cursor | |
33 | KEY_FENRIR,KEY_SHIFT,KEY_COMMA=curr_screen_after_cursor | |
34 | KEY_FENRIR,KEY_SHIFT,KEY_PAGEDOWN=cursor_read_to_end_of_line | |
35 | #=cursor_column | |
36 | #=cursor_lineno | |
37 | #=braille_flush | |
38 | KEY_FENRIR,KEY_CTRL,KEY_T=braille_return_to_cursor | |
39 | #=braille_pan_left | |
40 | #=braille_pan_right | |
41 | KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1 | |
42 | KEY_FENRIR,KEY_SHIFT,KEY_1=set_bookmark_1 | |
43 | KEY_FENRIR,KEY_1=bookmark_1 | |
44 | KEY_FENRIR,KEY_K=bookmark_1 | |
45 | KEY_FENRIR,KEY_CTRL,KEY_2=clear_bookmark_2 | |
46 | KEY_FENRIR,KEY_SHIFT,KEY_2=set_bookmark_2 | |
47 | KEY_FENRIR,KEY_2=bookmark_2 | |
48 | KEY_FENRIR,KEY_CTRL,KEY_3=clear_bookmark_3 | |
49 | KEY_FENRIR,KEY_SHIFT,KEY_3=set_bookmark_3 | |
50 | KEY_FENRIR,KEY_3=bookmark_3 | |
51 | KEY_FENRIR,KEY_CTRL,KEY_4=clear_bookmark_4 | |
52 | KEY_FENRIR,KEY_SHIFT,KEY_4=set_bookmark_4 | |
53 | KEY_FENRIR,KEY_4=bookmark_4 | |
54 | KEY_FENRIR,KEY_CTRL,KEY_5=clear_bookmark_5 | |
55 | KEY_FENRIR,KEY_SHIFT,KEY_5=set_bookmark_5 | |
56 | KEY_FENRIR,KEY_5=bookmark_5 | |
57 | KEY_FENRIR,KEY_CTRL,KEY_6=clear_bookmark_6 | |
58 | KEY_FENRIR,KEY_SHIFT,KEY_6=set_bookmark_6 | |
59 | KEY_FENRIR,KEY_6=bookmark_6 | |
60 | KEY_FENRIR,KEY_CTRL,KEY_7=clear_bookmark_7 | |
61 | KEY_FENRIR,KEY_SHIFT,KEY_7=set_bookmark_7 | |
62 | KEY_FENRIR,KEY_7=bookmark_7 | |
63 | KEY_FENRIR,KEY_CTRL,KEY_8=clear_bookmark_8 | |
64 | KEY_FENRIR,KEY_SHIFT,KEY_8=set_bookmark_8 | |
65 | KEY_FENRIR,KEY_8=bookmark_8 | |
66 | KEY_FENRIR,KEY_CTRL,KEY_9=clear_bookmark_9 | |
67 | KEY_FENRIR,KEY_SHIFT,KEY_9=set_bookmark_9 | |
68 | KEY_FENRIR,KEY_9=bookmark_9 | |
69 | KEY_FENRIR,KEY_CTRL,KEY_0=clear_bookmark_10 | |
70 | KEY_FENRIR,KEY_SHIFT,KEY_0=set_bookmark_10 | |
71 | KEY_FENRIR,KEY_0=bookmark_10 | |
72 | KEY_FENRIR,KEY_CTRL,KEY_8=set_window_application | |
73 | 2,KEY_FENRIR,KEY_CTRL,KEY_8=clear_window_application | |
74 | KEY_FENRIR,KEY_SEMICOLON=last_incoming | |
75 | #=toggle_braille | |
76 | KEY_FENRIR,KEY_F3=toggle_sound | |
77 | KEY_FENRIR,KEY_F4=toggle_speech | |
78 | KEY_FENRIR,KEY_ENTER=temp_disable_speech | |
79 | KEY_FENRIR,KEY_P=toggle_punctuation_level | |
80 | KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check | |
81 | KEY_FENRIR,KEY_S=toggle_output | |
82 | KEY_FENRIR,KEY_SHIFT,KEY_E=toggle_emoticons | |
83 | KEY_FENRIR,KEY_5=toggle_auto_read | |
84 | KEY_FENRIR,KEY_CTRL,KEY_T=toggle_auto_time | |
85 | KEY_FENRIR,KEY_Y=toggle_highlight_tracking | |
86 | #=toggle_barrier | |
87 | KEY_FENRIR,KEY_Q=quit_fenrir | |
88 | KEY_FENRIR,KEY_T=time | |
89 | KEY_FENRIR,KEY_F12=time | |
90 | 2,KEY_FENRIR,KEY_T=date | |
91 | 2,KEY_FENRIR,KEY_F12=date | |
92 | KEY_FENRIR,KEY_BACKSLASH=toggle_auto_indent | |
93 | KEY_FENRIR,KEY_F=attribute_cursor | |
94 | #=toggle_has_attribute | |
95 | KEY_FENRIR,KEY_F7=spell_check | |
96 | 2,KEY_FENRIR,KEY_S=add_word_to_spell_check | |
97 | KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check | |
98 | KEY_FENRIR,KEY_F2=forward_keypress | |
99 | KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume | |
100 | KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume | |
101 | #=clear_clipboard | |
102 | #=first_clipboard | |
103 | #=last_clipboard | |
104 | KEY_FENRIR,KEY_PAGEUP=prev_clipboard | |
105 | KEY_FENRIR,KEY_PAGEDOWN=next_clipboard | |
106 | KEY_FENRIR,KEY_SHIFT,KEY_C=curr_clipboard | |
107 | KEY_FENRIR,KEY_C=copy_marked_to_clipboard | |
108 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_C=copy_last_echo_to_clipboard | |
109 | KEY_FENRIR,KEY_V=paste_clipboard | |
110 | KEY_FENRIR,KEY_F5=import_clipboard_from_file | |
111 | KEY_FENRIR,KEY_F6=export_clipboard_to_file | |
112 | KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_X=remove_marks | |
113 | KEY_FENRIR,KEY_F9=set_mark | |
114 | KEY_FENRIR,KEY_F10=marked_text | |
115 | KEY_FENRIR,KEY_SHIFT,KEY_F10=toggle_vmenu_mode | |
116 | KEY_FENRIR,KEY_SPACE=current_quick_menu_entry | |
117 | KEY_FENRIR,KEY_CTRL,KEY_SPACE=current_quick_menu_value | |
118 | KEY_FENRIR,KEY_CTRL,KEY_RIGHT=next_quick_menu_entry | |
119 | KEY_FENRIR,KEY_CTRL,KEY_UP=next_quick_menu_value | |
120 | KEY_FENRIR,KEY_CTRL,KEY_LEFT=prev_quick_menu_entry | |
121 | KEY_FENRIR,KEY_CTRL,KEY_DOWN=prev_quick_menu_value | |
122 | KEY_FENRIR,KEY_CTRL,KEY_C=save_settings | |
123 | # linux specific | |
124 | #=import_clipboard_from_x | |
125 | KEY_FENRIR,KEY_F8=export_clipboard_to_x | |
126 | KEY_FENRIR,KEY_ALT,KEY_UP=inc_alsa_volume | |
127 | KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_alsa_volume |
0 | # This file contains terminal escape sequences as shortcut | |
1 | # It is used for PTY screen / Input driver (Terminal emulation) | |
2 | # ^[ is used as escape | |
3 | ||
0 | 4 | # f1 - fenrir help |
1 | 5 | ^[OP=toggle_tutorial_mode |
2 | 6 | # double tap control+end read attributes |
0 | # This file contains terminal escape sequences as shortcut | |
1 | # It is used for PTY screen / Input driver (Terminal emulation) | |
2 | # ^[ is used as escape | |
3 | ||
0 | 4 | ^[h=toggle_tutorial_mode |
1 | 5 | ^[/=shut_up |
2 | 6 | ^[[D=shut_up |
45 | 45 | [customDict] |
46 | 46 | |
47 | 47 | [emoticonDict] |
48 | :):===:Grins | |
49 | ;):===:Zwinker | |
50 | XD:===:loool | |
51 | :D:===:Lach | |
52 | <{-.-}>:===:Raves | |
48 | # This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc. | |
49 | regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves | |
50 | regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses | |
51 | regex;[\s*|'|"][\s*|'|"]:-/:===:confused | |
52 | regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged | |
53 | regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing | |
54 | regex;[\s*|'|"][\s*|'|"]8-X:===:skull | |
55 | regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile | |
56 | regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile | |
57 | regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray | |
58 | regex;[\s*|'|"][\s*|'|"]:/:===:confused | |
59 | regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses | |
60 | regex;[\s*|'|"]:D[\s*|'|"]:===:laugh | |
61 | regex;[\s*|'|"];\)[\s*|'|"]:===:wink | |
62 | regex;[\s*|'|"]XD[\s*|'|"]:===:LOL | |
63 | regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile | |
64 | regex;[\s*|'|"]:\)[\s*|'|"]:===:smile | |
65 | regex;[\s*|'|"]->[\s*|'|"]:===:arrow right | |
66 | # example for arrow left | |
67 | #(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left | |
68 | # or | |
69 | #([ |^])<-([ ,.!?$]):===:arrow left\2 | |
70 | regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left | |
71 | regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF? | |
72 | regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile |
3 | 3 | # the entrys are seperated with :===: in words colon tripple equal colon ( to not collide with substitutions) |
4 | 4 | [levelDict] |
5 | 5 | none:===: |
6 | some:===:-$~+*-/\@ | |
6 | some:===:-$~+*-/\@# | |
7 | 7 | most:===:.,:-$~+*-/\@!#%^&*()[]}{<>; |
8 | 8 | all:===:!"#$%& \'()*+,-./:;<=>?@[\\]^_`{|}~ |
9 | 9 | |
45 | 45 | [customDict] |
46 | 46 | |
47 | 47 | [emoticonDict] |
48 | :):===:smile | |
49 | ;):===:wink | |
50 | XD:===:LOL | |
51 | :D:===:laugh | |
52 | <{-.-}>:===:Raves | |
53 | \o/:===:Hurray | |
48 | # This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc. | |
49 | regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves | |
50 | regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses | |
51 | regex;[\s*|'|"][\s*|'|"]:-/:===:confused | |
52 | regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged | |
53 | regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing | |
54 | regex;[\s*|'|"][\s*|'|"]8-X:===:skull | |
55 | regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile | |
56 | regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile | |
57 | regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray | |
58 | regex;[\s*|'|"][\s*|'|"]:/:===:confused | |
59 | regex;[\s*|'|"]:D[\s*|'|"]:===:laugh | |
60 | regex;[\s*|'|"];\)[\s*|'|"]:===:wink | |
61 | regex;[\s*|'|"]XD[\s*|'|"]:===:LOL | |
62 | regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile | |
63 | regex;[\s*|'|"]:\)[\s*|'|"]:===:smile | |
64 | regex;[\s*|'|"]->[\s*|'|"]:===:arrow right | |
65 | # example for arrow left | |
66 | #(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left | |
67 | # or | |
68 | #([ |^])<-([ ,.!?$]):===:arrow left\2 | |
69 | regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left | |
70 | regex;[\s+|'|"](Oo)|(oO)[\s+|'|"]:===:WTF? | |
71 | regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile |
45 | 45 | [customDict] |
46 | 46 | |
47 | 47 | [emoticonDict] |
48 | :):===:smile | |
49 | ;):===:twinker | |
50 | XD:===:loool | |
51 | :D:===:lought | |
52 | <{-.-}>:===:Raves | |
48 | # This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc. | |
49 | regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves | |
50 | regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses | |
51 | regex;[\s*|'|"][\s*|'|"]:-/:===:confused | |
52 | regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged | |
53 | regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing | |
54 | regex;[\s*|'|"][\s*|'|"]8-X:===:skull | |
55 | regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile | |
56 | regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile | |
57 | regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray | |
58 | regex;[\s*|'|"][\s*|'|"]:/:===:confused | |
59 | regex;[\s*|'|"]:D[\s*|'|"]:===:laugh | |
60 | regex;[\s*|'|"];\)[\s*|'|"]:===:wink | |
61 | regex;[\s*|'|"]XD[\s*|'|"]:===:LOL | |
62 | regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile | |
63 | regex;[\s*|'|"]:\)[\s*|'|"]:===:smile | |
64 | regex;[\s*|'|"]->[\s*|'|"]:===:arrow right | |
65 | # example for arrow left | |
66 | #(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left | |
67 | # or | |
68 | #([ |^])<-([ ,.!?$]):===:arrow left\2 | |
69 | regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left | |
70 | regex;[\s+|'|"][O|o][O|o][\s+|'|"]:===:WTF? | |
71 | regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile |
45 | 45 | [customDict] |
46 | 46 | |
47 | 47 | [emoticonDict] |
48 | :):===:sonrisa | |
49 | ;):===:twinker | |
50 | XD:===:loool | |
51 | :D:===:lought | |
52 | <{-.-}>:===:Raves | |
48 | # This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc. | |
49 | regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves | |
50 | regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses | |
51 | regex;[\s*|'|"][\s*|'|"]:-/:===:confused | |
52 | regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged | |
53 | regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing | |
54 | regex;[\s*|'|"][\s*|'|"]8-X:===:skull | |
55 | regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile | |
56 | regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile | |
57 | regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray | |
58 | regex;[\s*|'|"][\s*|'|"]:/:===:confused | |
59 | regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses | |
60 | regex;[\s*|'|"]:D[\s*|'|"]:===:laugh | |
61 | regex;[\s*|'|"];\)[\s*|'|"]:===:wink | |
62 | regex;[\s*|'|"]XD[\s*|'|"]:===:LOL | |
63 | regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile | |
64 | regex;[\s*|'|"]:\)[\s*|'|"]:===:smile | |
65 | regex;[\s*|'|"]->[\s*|'|"]:===:arrow right | |
66 | # example for arrow left | |
67 | #(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left | |
68 | # or | |
69 | #([ |^])<-([ ,.!?$]):===:arrow left\2 | |
70 | regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left | |
71 | regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF? | |
72 | regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile |
45 | 45 | [customDict] |
46 | 46 | |
47 | 47 | [emoticonDict] |
48 | :):===:sourire | |
49 | ;):===:clin d'oeil | |
50 | XD:===:explosé de rire | |
51 | :D:===:rire | |
52 | <{-.-}>:===:Raves | |
48 | # This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc. | |
49 | regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves | |
50 | regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses | |
51 | regex;[\s*|'|"][\s*|'|"]:-/:===:confused | |
52 | regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged | |
53 | regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing | |
54 | regex;[\s*|'|"][\s*|'|"]8-X:===:skull | |
55 | regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile | |
56 | regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile | |
57 | regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray | |
58 | regex;[\s*|'|"][\s*|'|"]:/:===:confused | |
59 | regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses | |
60 | regex;[\s*|'|"]:D[\s*|'|"]:===:laugh | |
61 | regex;[\s*|'|"];\)[\s*|'|"]:===:wink | |
62 | regex;[\s*|'|"]XD[\s*|'|"]:===:LOL | |
63 | regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile | |
64 | regex;[\s*|'|"]:\)[\s*|'|"]:===:smile | |
65 | regex;[\s*|'|"]->[\s*|'|"]:===:arrow right | |
66 | # example for arrow left | |
67 | #(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left | |
68 | # or | |
69 | #([ |^])<-([ ,.!?$]):===:arrow left\2 | |
70 | regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left | |
71 | regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF? | |
72 | regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile |
45 | 45 | [customDict] |
46 | 46 | |
47 | 47 | [emoticonDict] |
48 | :):===:smile | |
49 | ;):===:twinker | |
50 | XD:===:loool | |
51 | :D:===:lought | |
52 | <{-.-}>:===:Raves | |
48 | # This dictionary uses regexp when prefixed with "regex;", so be sure to escape anything that would be parsed by regexp, e.g. *, ., ^, $, etc. | |
49 | regex;[\s*|'|"][\s*|'|"]<{-.-}>:===:Raves | |
50 | regex;[\s*|'|"][\s*|'|"]8-\):===:smile with sunglasses | |
51 | regex;[\s*|'|"][\s*|'|"]:-/:===:confused | |
52 | regex;[\s*|'|"][\s*|'|"]-\.-:===:bugged | |
53 | regex;[\s*|'|"][\s*|'|"]>\.<:===:laughing | |
54 | regex;[\s*|'|"][\s*|'|"]8-X:===:skull | |
55 | regex;[\s*|'|"][\s*|'|"]>:\):===:evil smile | |
56 | regex;[\s*|'|"][\s*|'|"]>:-\):===:evil smile | |
57 | regex;[\s*|'|"][\s*|'|"]\\o/:===:Hurray | |
58 | regex;[\s*|'|"][\s*|'|"]:/:===:confused | |
59 | regex;[\s*|'|"][\s*|'|"]8\):===:smile with sunglasses | |
60 | regex;[\s*|'|"]:D[\s*|'|"]:===:laugh | |
61 | regex;[\s*|'|"];\)[\s*|'|"]:===:wink | |
62 | regex;[\s*|'|"]XD[\s*|'|"]:===:LOL | |
63 | regex;[\s*|'|"]:-\)[\s*|'|"]:===:smile | |
64 | regex;[\s*|'|"]:\)[\s*|'|"]:===:smile | |
65 | regex;[\s*|'|"]->[\s*|'|"]:===:arrow right | |
66 | # example for arrow left | |
67 | #(?:[ |^])(<-)(?:[ ,.!?$]):===:arrow left | |
68 | # or | |
69 | #([ |^])<-([ ,.!?$]):===:arrow left\2 | |
70 | regex;[\s*|'|"]<-[\s*|'|"]:===:arrow left | |
71 | regex;[\s*|'|"][O|o][O|o][\s*|'|"]:===:WTF? | |
72 | regex;[\s*|'|"]\^\^[\s*|'|"]:===:enjoy smile |
147 | 147 | |
148 | 148 | [general] |
149 | 149 | debugLevel=0 |
150 | # debugMode sets where the debug output should send to: | |
151 | # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) | |
152 | # debugMode=Print just prints on the screen | |
150 | 153 | debugMode=File |
151 | debugFile=/var/log/fenrirscreenreader/fenrir.log | |
154 | debugFile= | |
152 | 155 | punctuationProfile=default |
153 | 156 | punctuationLevel=some |
154 | 157 | respectPunctuationPause=True |
160 | 163 | emoticons=True |
161 | 164 | # define the current Fenrir key |
162 | 165 | fenrirKeys=KEY_KP0,KEY_META |
163 | scriptKey=KEY_COMPOSE | |
166 | scriptKeys=KEY_COMPOSE | |
164 | 167 | timeFormat=%H:%M:%P |
165 | 168 | dateFormat=%A, %B %d, %Y |
166 | 169 | autoSpellCheck=True |
194 | 197 | # tcp port |
195 | 198 | port=22447 |
196 | 199 | # socket filepath |
197 | socketpath=/tmp/ | |
200 | socketFile= | |
198 | 201 | # allow settings to overwrite |
199 | 202 | enableSettingsRemote=True |
200 | 203 | # allow commands to be executed |
217 | 220 | enabled=True |
218 | 221 | inactiveTimeoutSec=120 |
219 | 222 | list= |
223 | ||
224 | [menu] | |
225 | vmenuPath= | |
226 | quickMenu=speech#rate;speech#pitch;speech#volume | |
220 | 227 | |
221 | 228 | [time] |
222 | 229 | enabled=False |
150 | 150 | [general] |
151 | 151 | debugLevel=0 |
152 | 152 | # debugMode sets where the debug output should send to: |
153 | # debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log) | |
153 | # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) | |
154 | 154 | # debugMode=Print just prints on the screen |
155 | 155 | debugMode=File |
156 | debugFile=/var/log/fenrirscreenreader/fenrir.log | |
156 | debugFile= | |
157 | 157 | punctuationProfile=default |
158 | 158 | punctuationLevel=some |
159 | 159 | respectPunctuationPause=True |
166 | 166 | emoticons=True |
167 | 167 | # define the current Fenrir key |
168 | 168 | fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT |
169 | scriptKey=KEY_COMPOSE | |
169 | scriptKeys=KEY_COMPOSE | |
170 | 170 | timeFormat=%H:%M:%P |
171 | 171 | dateFormat=%A, %B %d, %Y |
172 | 172 | autoSpellCheck=True |
173 | 173 | spellCheckLanguage=en_US |
174 | # path for your scripts "scriptKey" functionality | |
174 | # path for your scripts "scriptKeys" functionality | |
175 | 175 | scriptPath=/usr/share/fenrirscreenreader/scripts |
176 | 176 | # overload commands, and create new one without changing Fenrir default |
177 | 177 | commandPath= |
204 | 204 | # tcp port |
205 | 205 | port=22447 |
206 | 206 | # socket filepath |
207 | socketpath=/tmp/ | |
207 | socketFile= | |
208 | 208 | # allow settings to overwrite |
209 | 209 | enableSettingsRemote=True |
210 | 210 | # allow commands to be executed |
227 | 227 | enabled=True |
228 | 228 | inactiveTimeoutSec=120 |
229 | 229 | list= |
230 | ||
231 | [menu] | |
232 | vmenuPath= | |
233 | quickMenu=speech#rate;speech#pitch;speech#volume | |
230 | 234 | |
231 | 235 | [time] |
232 | 236 | # automatic time anouncement |
150 | 150 | [general] |
151 | 151 | debugLevel=0 |
152 | 152 | # debugMode sets where the debug output should send to: |
153 | # debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log) | |
153 | # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) | |
154 | 154 | # debugMode=Print just prints on the screen |
155 | 155 | debugMode=File |
156 | debugFile=/var/log/fenrirscreenreader/fenrir.log | |
156 | debugFile= | |
157 | 157 | punctuationProfile=default |
158 | 158 | punctuationLevel=some |
159 | 159 | respectPunctuationPause=True |
166 | 166 | emoticons=True |
167 | 167 | # define the current Fenrir key |
168 | 168 | fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT |
169 | scriptKey=KEY_COMPOSE | |
169 | scriptKeys=KEY_COMPOSE | |
170 | 170 | timeFormat=%H:%M:%P |
171 | 171 | dateFormat=%A, %B %d, %Y |
172 | 172 | autoSpellCheck=True |
173 | 173 | spellCheckLanguage=en_US |
174 | # path for your scripts "scriptKey" functionality | |
174 | # path for your scripts "scriptKeys" functionality | |
175 | 175 | scriptPath=/usr/share/fenrirscreenreader/scripts |
176 | 176 | # overload commands, and create new one without changing Fenrir default |
177 | 177 | commandPath= |
204 | 204 | # tcp port |
205 | 205 | port=22447 |
206 | 206 | # socket filepath |
207 | socketpath=/tmp/ | |
207 | socketFile= | |
208 | 208 | # allow settings to overwrite |
209 | 209 | enableSettingsRemote=True |
210 | 210 | # allow commands to be executed |
227 | 227 | enabled=True |
228 | 228 | inactiveTimeoutSec=120 |
229 | 229 | list= |
230 | ||
231 | [menu] | |
232 | vmenuPath= | |
233 | quickMenu=speech#rate;speech#pitch;speech#volume | |
230 | 234 | |
231 | 235 | [time] |
232 | 236 | # automatic time anouncement |
52 | 52 | |
53 | 53 | # Module is used for Speech-dispatcher, to select the speech module you want to use. |
54 | 54 | # Consult Speech-dispatcher's configuration and help Fenrir find out which modules are available. |
55 | # The default is espeak. | |
56 | #module=espeak | |
57 | ||
58 | # Voice selects the varient you want to use, for example, f5 will use the female voice #5 in Espeak, | |
59 | # or if using the Espeak module in Speech-dispatcher. To find out which voices are available, consult the documentation provided with your selected synthesizer. | |
55 | # The default is specified in speechd.conf. | |
56 | #module=espeak-ng | |
57 | ||
58 | # Voice selects the voice you want to use, for example, en-GB-scotland will use the Scotish English voice in Espeak, | |
59 | # To find out which voices are available, consult the documentation provided with your selected synthesizer. | |
60 | 60 | # This also sets the voice used in the generic driver. |
61 | voice=en-us | |
61 | # You can add a variant by adding +name onto the end. | |
62 | # voice=en-us | |
62 | 63 | |
63 | 64 | # Select the language you want Fenrir to use. |
64 | #language=english-us | |
65 | #language=en | |
65 | 66 | |
66 | 67 | # Read new text as it happens? |
67 | 68 | autoReadIncoming=True |
77 | 78 | # fenrirVolume = is replaced with the current volume |
78 | 79 | # fenrirPitch = is replaced with the current pitch |
79 | 80 | # fenrirRate = is replaced with the current speed (speech rate) |
80 | genericSpeechCommand=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText" | |
81 | genericSpeechCommand=espeak-ng -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText" | |
81 | 82 | |
82 | 83 | # those are the min and max values of the TTS system that is used in genericSpeechCommand |
83 | 84 | fenrirMinVolume=0 |
141 | 142 | # echo word after pressing space |
142 | 143 | wordEcho=False |
143 | 144 | # interrupt speech on any keypress |
144 | interruptOnKeyPress=False | |
145 | interruptOnKeyPress=True | |
145 | 146 | # you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys) |
146 | 147 | interruptOnKeyPressFilter= |
147 | 148 | # timeout for double tap in sec |
150 | 151 | [general] |
151 | 152 | debugLevel=0 |
152 | 153 | # debugMode sets where the debug output should send to: |
153 | # debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log) | |
154 | # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) | |
154 | 155 | # debugMode=Print just prints on the screen |
155 | 156 | debugMode=File |
156 | debugFile=/var/log/fenrirscreenreader/fenrir.log | |
157 | debugFile= | |
157 | 158 | punctuationProfile=default |
158 | 159 | punctuationLevel=some |
159 | 160 | respectPunctuationPause=True |
166 | 167 | emoticons=True |
167 | 168 | # define the current Fenrir key |
168 | 169 | fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT |
169 | scriptKey=KEY_COMPOSE | |
170 | scriptKeys=KEY_COMPOSE | |
170 | 171 | timeFormat=%H:%M:%P |
171 | 172 | dateFormat=%A, %B %d, %Y |
172 | 173 | autoSpellCheck=True |
173 | 174 | spellCheckLanguage=en_US |
174 | # path for your scripts "scriptKey" functionality | |
175 | # path for your scripts "scriptKeys" functionality | |
175 | 176 | scriptPath=/usr/share/fenrirscreenreader/scripts |
176 | 177 | # overload commands, and create new one without changing Fenrir default |
177 | 178 | commandPath= |
204 | 205 | # tcp port |
205 | 206 | port=22447 |
206 | 207 | # socket filepath |
207 | socketpath=/tmp/ | |
208 | socketFile= | |
208 | 209 | # allow settings to overwrite |
209 | 210 | enableSettingsRemote=True |
210 | 211 | # allow commands to be executed |
227 | 228 | enabled=True |
228 | 229 | inactiveTimeoutSec=120 |
229 | 230 | list= |
231 | ||
232 | [menu] | |
233 | vmenuPath= | |
234 | quickMenu=speech#rate;speech#pitch;speech#volume | |
230 | 235 | |
231 | 236 | [time] |
232 | 237 | # automatic time anouncement |
151 | 151 | [general] |
152 | 152 | debugLevel=0 |
153 | 153 | # debugMode sets where the debug output should send to: |
154 | # debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log) | |
154 | # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) | |
155 | 155 | # debugMode=Print just prints on the screen |
156 | 156 | debugMode=File |
157 | debugFile=/var/log/fenrirscreenreader/fenrir.log | |
157 | debugFile= | |
158 | 158 | punctuationProfile=default |
159 | 159 | punctuationLevel=some |
160 | 160 | respectPunctuationPause=True |
205 | 205 | # tcp port |
206 | 206 | port=22447 |
207 | 207 | # socket filepath |
208 | socketpath=/tmp/ | |
208 | socketFile= | |
209 | 209 | # allow settings to overwrite |
210 | 210 | enableSettingsRemote=True |
211 | 211 | # allow commands to be executed |
228 | 228 | enabled=True |
229 | 229 | inactiveTimeoutSec=120 |
230 | 230 | list= |
231 | ||
232 | [menu] | |
233 | vmenuPath= | |
234 | quickMenu=speech#rate;speech#pitch;speech#volume | |
231 | 235 | |
232 | 236 | [time] |
233 | 237 | # automatic time anouncement |
97 | 97 | doubleTapTimeout=0.2 |
98 | 98 | |
99 | 99 | [general] |
100 | debugLevel=1 | |
100 | debugLevel=0 | |
101 | 101 | # debugMode sets where the debug output should send to: |
102 | # debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log) | |
102 | # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) | |
103 | 103 | # debugMode=Print just prints on the screen |
104 | 104 | debugMode=File |
105 | debugFile=/var/log/fenrirscreenreader/fenrir.log | |
105 | debugFile= | |
106 | 106 | punctuationProfile=default |
107 | 107 | punctuationLevel=some |
108 | 108 | respectPunctuationPause=True |
150 | 150 | # tcp port |
151 | 151 | port=22447 |
152 | 152 | # socket filepath |
153 | socketpath=/tmp/ | |
153 | socketFile= | |
154 | 154 | # allow settings to overwrite |
155 | 155 | enableSettingsRemote=True |
156 | 156 | # allow commands to be executed |
174 | 174 | inactiveTimeoutSec=120 |
175 | 175 | list= |
176 | 176 | |
177 | [menu] | |
178 | vmenuPath= | |
179 | quickMenu=speech#rate;speech#pitch;speech#volume | |
180 | ||
177 | 181 | [time] |
178 | 182 | # automatic time anouncement |
179 | 183 | enabled=False |
150 | 150 | [general] |
151 | 151 | debugLevel=0 |
152 | 152 | # debugMode sets where the debug output should send to: |
153 | # debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log) | |
153 | # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) | |
154 | 154 | # debugMode=Print just prints on the screen |
155 | 155 | debugMode=File |
156 | debugFile=/var/log/fenrirscreenreader/fenrir.log | |
156 | debugFile= | |
157 | 157 | punctuationProfile=default |
158 | 158 | punctuationLevel=some |
159 | 159 | respectPunctuationPause=True |
166 | 166 | emoticons=True |
167 | 167 | # define the current Fenrir key |
168 | 168 | fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT |
169 | scriptKey=KEY_COMPOSE | |
169 | scriptKeys=KEY_COMPOSE | |
170 | 170 | timeFormat=%H:%M:%P |
171 | 171 | dateFormat=%A, %B %d, %Y |
172 | 172 | autoSpellCheck=True |
173 | 173 | spellCheckLanguage=en_US |
174 | # path for your scripts "scriptKey" functionality | |
174 | # path for your scripts "scriptKeys" functionality | |
175 | 175 | scriptPath=/usr/share/fenrirscreenreader/scripts |
176 | 176 | # overload commands, and create new one without changing Fenrir default |
177 | 177 | commandPath= |
204 | 204 | # tcp port |
205 | 205 | port=22447 |
206 | 206 | # socket filepath |
207 | socketpath=/tmp/ | |
207 | socketFile= | |
208 | 208 | # allow settings to overwrite |
209 | 209 | enableSettingsRemote=True |
210 | 210 | # allow commands to be executed |
227 | 227 | enabled=True |
228 | 228 | inactiveTimeoutSec=120 |
229 | 229 | list= |
230 | ||
231 | [menu] | |
232 | vmenuPath= | |
233 | quickMenu=speech#rate;speech#pitch;speech#volume | |
230 | 234 | |
231 | 235 | [time] |
232 | 236 | # automatic time anouncement |
0 | fenrir (1.9.5-3) UNRELEASED; urgency=medium | |
0 | fenrir (1.9.7.1-1) UNRELEASED; urgency=medium | |
1 | 1 | |
2 | [ Samuel Thibault ] | |
2 | 3 | * watch: Generalize pattern. |
3 | 4 | * control: Update alioth list domain. |
4 | 5 | * control: Bump Standards-Version to 4.5.0 (no change) |
5 | 6 | * Bump debhelper from 10 to 12. |
6 | 7 | * control: Set Rules-Requires-Root to no. |
7 | 8 | |
8 | -- Samuel Thibault <sthibault@debian.org> Thu, 19 Sep 2019 01:53:53 +0200 | |
9 | [ Debian Janitor ] | |
10 | * New upstream release. | |
11 | ||
12 | -- Samuel Thibault <sthibault@debian.org> Sun, 22 Aug 2021 09:07:08 -0000 | |
9 | 13 | |
10 | 14 | fenrir (1.9.5-2) unstable; urgency=medium |
11 | 15 |
16 | 16 | cp -af "config/scripts/wlan__-__key_y.sh" /usr/share/fenrirscreenreader/scripts/ |
17 | 17 | |
18 | 18 | # keyboard |
19 | install -m644 -D "config/keyboard/desktop.conf" /etc/fenrirscreenreader/keyboard/desktop.conf | |
20 | install -m644 -D "config/keyboard/laptop.conf" /etc/fenrirscreenreader/keyboard/laptop.conf | |
19 | for i in "config/keyboard/"*.conf ; do | |
20 | install -m644 -D "$i" "/etc/fenrirscreenreader/keyboard/${i##*/}" | |
21 | done | |
21 | 22 | |
22 | 23 | # punctuation |
23 | 24 | install -m755 -d /etc/fenrirscreenreader/punctuation |
50 | 51 | install path:/opt/fenrirscreenreader |
51 | 52 | settings path:/etc/fenrirscreenreader |
52 | 53 | |
53 | To test Fenrir | |
54 | sudo systemctl start fenrir | |
55 | To have Fenrir start on system boot: | |
54 | To test Fenrir: | |
55 | sudo fenrir | |
56 | ||
57 | To have Fenrir start on system boot using systemd: | |
58 | download service file: https://raw.githubusercontent.com/chrys87/fenrir/master/autostart/systemd/Arch/fenrir.service | |
59 | move the service file to: /etc/systemd/system/fenrir.service | |
56 | 60 | sudo systemctl enable fenrir |
57 | 61 | |
58 | 62 | Pulseaudio users may want to run |
Binary diff not shown
0 | # SOME DESCRIPTIVE TITLE. | |
1 | # Copyright (C) YEAR ORGANIZATION | |
2 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
3 | # | |
4 | msgid "" | |
5 | msgstr "" | |
6 | "Project-Id-Version: PACKAGE VERSION\n" | |
7 | "POT-Creation-Date: 2020-04-19 09:11+0700\n" | |
8 | "PO-Revision-Date: 2020-04-19 19:26+07\n" | |
9 | "Last-Translator: denis rybin <mejdugorka@yandex.ru>\n" | |
10 | "Language-Team: russian \n" | |
11 | "MIME-Version: 1.0\n" | |
12 | "Content-Type: text/plain; charset=UTF-8\n" | |
13 | "Content-Transfer-Encoding: 8bit\n" | |
14 | "Generated-By: pygettext.py 1.5\n" | |
15 | ||
16 | ||
17 | #: ../src/fenrirscreenreader/commands/commands/add_word_to_spell_check.py:27 | |
18 | msgid "adds the current word to the exceptions dictionary" | |
19 | msgstr "добавляет текущее слово в словарь исключение" | |
20 | ||
21 | #: ../src/fenrirscreenreader/commands/commands/add_word_to_spell_check.py:34 | |
22 | #: ../src/fenrirscreenreader/commands/commands/remove_word_from_spell_check.py:34 | |
23 | #: ../src/fenrirscreenreader/commands/commands/spell_check.py:35 | |
24 | msgid "pyenchant is not installed" | |
25 | msgstr "pyenchant не установлен" | |
26 | ||
27 | #: ../src/fenrirscreenreader/commands/commands/add_word_to_spell_check.py:49 | |
28 | msgid "{0} is already in dictionary" | |
29 | msgstr "{0} уже находится в словаре" | |
30 | ||
31 | #: ../src/fenrirscreenreader/commands/commands/add_word_to_spell_check.py:52 | |
32 | msgid "{0} added to dictionary" | |
33 | msgstr "{0} добавлено в словарь" | |
34 | ||
35 | #: ../src/fenrirscreenreader/commands/commands/attribute_cursor.py:18 | |
36 | #: ../src/fenrirscreenreader/commands/onCursorChange/85000-has_attribute.py:18 | |
37 | msgid "Reads attributes of current cursor position" | |
38 | msgstr "Читает атрибуты текущей позиции курсора" | |
39 | ||
40 | #: ../src/fenrirscreenreader/commands/commands/bookmark_1.py:19 | |
41 | #: ../src/fenrirscreenreader/commands/commands/bookmark_10.py:19 | |
42 | #: ../src/fenrirscreenreader/commands/commands/bookmark_2.py:19 | |
43 | #: ../src/fenrirscreenreader/commands/commands/bookmark_3.py:19 | |
44 | #: ../src/fenrirscreenreader/commands/commands/bookmark_4.py:19 | |
45 | #: ../src/fenrirscreenreader/commands/commands/bookmark_5.py:19 | |
46 | #: ../src/fenrirscreenreader/commands/commands/bookmark_6.py:19 | |
47 | #: ../src/fenrirscreenreader/commands/commands/bookmark_7.py:19 | |
48 | #: ../src/fenrirscreenreader/commands/commands/bookmark_8.py:19 | |
49 | #: ../src/fenrirscreenreader/commands/commands/bookmark_9.py:19 | |
50 | msgid "read Bookmark {0}" | |
51 | msgstr "чтение закладки {0}" | |
52 | ||
53 | #: ../src/fenrirscreenreader/commands/commands/bookmark_1.py:24 | |
54 | #: ../src/fenrirscreenreader/commands/commands/bookmark_10.py:24 | |
55 | #: ../src/fenrirscreenreader/commands/commands/bookmark_2.py:24 | |
56 | #: ../src/fenrirscreenreader/commands/commands/bookmark_3.py:24 | |
57 | #: ../src/fenrirscreenreader/commands/commands/bookmark_4.py:24 | |
58 | #: ../src/fenrirscreenreader/commands/commands/bookmark_5.py:24 | |
59 | #: ../src/fenrirscreenreader/commands/commands/bookmark_6.py:24 | |
60 | #: ../src/fenrirscreenreader/commands/commands/bookmark_7.py:24 | |
61 | #: ../src/fenrirscreenreader/commands/commands/bookmark_8.py:24 | |
62 | #: ../src/fenrirscreenreader/commands/commands/bookmark_9.py:24 | |
63 | msgid "Bookmark {0} not set" | |
64 | msgstr "Закладка {0} не установлена" | |
65 | ||
66 | #: ../src/fenrirscreenreader/commands/commands/bookmark_1.py:27 | |
67 | #: ../src/fenrirscreenreader/commands/commands/bookmark_1.py:30 | |
68 | #: ../src/fenrirscreenreader/commands/commands/bookmark_10.py:27 | |
69 | #: ../src/fenrirscreenreader/commands/commands/bookmark_10.py:30 | |
70 | #: ../src/fenrirscreenreader/commands/commands/bookmark_2.py:27 | |
71 | #: ../src/fenrirscreenreader/commands/commands/bookmark_2.py:30 | |
72 | #: ../src/fenrirscreenreader/commands/commands/bookmark_3.py:27 | |
73 | #: ../src/fenrirscreenreader/commands/commands/bookmark_3.py:30 | |
74 | #: ../src/fenrirscreenreader/commands/commands/bookmark_4.py:27 | |
75 | #: ../src/fenrirscreenreader/commands/commands/bookmark_4.py:30 | |
76 | #: ../src/fenrirscreenreader/commands/commands/bookmark_5.py:27 | |
77 | #: ../src/fenrirscreenreader/commands/commands/bookmark_5.py:30 | |
78 | #: ../src/fenrirscreenreader/commands/commands/bookmark_6.py:27 | |
79 | #: ../src/fenrirscreenreader/commands/commands/bookmark_6.py:30 | |
80 | #: ../src/fenrirscreenreader/commands/commands/bookmark_7.py:27 | |
81 | #: ../src/fenrirscreenreader/commands/commands/bookmark_7.py:30 | |
82 | #: ../src/fenrirscreenreader/commands/commands/bookmark_8.py:27 | |
83 | #: ../src/fenrirscreenreader/commands/commands/bookmark_8.py:30 | |
84 | #: ../src/fenrirscreenreader/commands/commands/bookmark_9.py:27 | |
85 | #: ../src/fenrirscreenreader/commands/commands/bookmark_9.py:30 | |
86 | msgid "Bookmark for application {0} not set" | |
87 | msgstr "Закладка для приложения {0} не установлена" | |
88 | ||
89 | #: ../src/fenrirscreenreader/commands/commands/bookmark_1.py:43 | |
90 | #: ../src/fenrirscreenreader/commands/commands/bookmark_10.py:43 | |
91 | #: ../src/fenrirscreenreader/commands/commands/bookmark_2.py:43 | |
92 | #: ../src/fenrirscreenreader/commands/commands/bookmark_3.py:43 | |
93 | #: ../src/fenrirscreenreader/commands/commands/bookmark_4.py:43 | |
94 | #: ../src/fenrirscreenreader/commands/commands/bookmark_5.py:43 | |
95 | #: ../src/fenrirscreenreader/commands/commands/bookmark_6.py:43 | |
96 | #: ../src/fenrirscreenreader/commands/commands/bookmark_7.py:43 | |
97 | #: ../src/fenrirscreenreader/commands/commands/bookmark_8.py:43 | |
98 | #: ../src/fenrirscreenreader/commands/commands/bookmark_9.py:43 | |
99 | #: ../src/fenrirscreenreader/commands/commands/curr_screen_after_cursor.py:27 | |
100 | #: ../src/fenrirscreenreader/commands/commands/curr_screen_before_cursor.py:30 | |
101 | #: ../src/fenrirscreenreader/commands/commands/cursor_read_to_end_of_line.py:27 | |
102 | #: ../src/fenrirscreenreader/commands/commands/indent_curr_line.py:31 | |
103 | #: ../src/fenrirscreenreader/commands/commands/marked_text.py:33 | |
104 | #: ../src/fenrirscreenreader/commands/commands/present_first_line.py:25 | |
105 | #: ../src/fenrirscreenreader/commands/commands/present_last_line.py:25 | |
106 | #: ../src/fenrirscreenreader/commands/commands/review_curr_char_phonetic.py:27 | |
107 | #: ../src/fenrirscreenreader/commands/commands/review_curr_line.py:27 | |
108 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word.py:27 | |
109 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word_phonetic.py:27 | |
110 | #: ../src/fenrirscreenreader/commands/commands/review_line_begin.py:27 | |
111 | #: ../src/fenrirscreenreader/commands/commands/review_next_line.py:29 | |
112 | #: ../src/fenrirscreenreader/commands/commands/review_next_word.py:29 | |
113 | #: ../src/fenrirscreenreader/commands/commands/review_next_word_phonetic.py:27 | |
114 | #: ../src/fenrirscreenreader/commands/commands/review_prev_line.py:27 | |
115 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word.py:27 | |
116 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word_phonetic.py:27 | |
117 | #: ../src/fenrirscreenreader/commands/onCursorChange/65000-present_line_if_cursor_change_vertical.py:37 | |
118 | #: ../src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py:59 | |
119 | msgid "blank" | |
120 | msgstr "пусто" | |
121 | ||
122 | #: ../src/fenrirscreenreader/commands/commands/braille_flush.py:17 | |
123 | msgid "Clear the Braille device if it is displaying a message" | |
124 | msgstr "Очистить устройство Брайля, если оно отображает сообщение." | |
125 | ||
126 | #: ../src/fenrirscreenreader/commands/commands/braille_pan_left.py:17 | |
127 | msgid "Move braille view to the left." | |
128 | msgstr "Переместить брайлевский вид влево." | |
129 | ||
130 | #: ../src/fenrirscreenreader/commands/commands/braille_pan_right.py:17 | |
131 | msgid "Move braille view to the right." | |
132 | msgstr "Переместить брайлевский вид вправо." | |
133 | ||
134 | #: ../src/fenrirscreenreader/commands/commands/braille_return_to_cursor.py:17 | |
135 | msgid "Set the braille view back to cursor." | |
136 | msgstr "Установить брайлевский вид обратно на курсор." | |
137 | ||
138 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_1.py:17 | |
139 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_10.py:17 | |
140 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_2.py:17 | |
141 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_3.py:17 | |
142 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_4.py:17 | |
143 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_5.py:17 | |
144 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_6.py:17 | |
145 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_7.py:17 | |
146 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_8.py:17 | |
147 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_9.py:17 | |
148 | msgid "remove Bookmark {0}" | |
149 | msgstr "Удалить закладку {0}" | |
150 | ||
151 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_1.py:24 | |
152 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_10.py:24 | |
153 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_2.py:24 | |
154 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_3.py:24 | |
155 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_4.py:24 | |
156 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_5.py:24 | |
157 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_6.py:24 | |
158 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_7.py:24 | |
159 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_8.py:24 | |
160 | #: ../src/fenrirscreenreader/commands/commands/clear_bookmark_9.py:24 | |
161 | msgid "Bookmark {0} removed for application {1}" | |
162 | msgstr "Закладка {0} удалена для приложения {1}" | |
163 | ||
164 | #: ../src/fenrirscreenreader/commands/commands/clear_clipboard.py:17 | |
165 | msgid "clears the currently selected clipboard" | |
166 | msgstr "Очищает текущий выбранный буфер обмена." | |
167 | ||
168 | #: ../src/fenrirscreenreader/commands/commands/clear_clipboard.py:21 | |
169 | msgid "clipboard cleared" | |
170 | msgstr "Буфер обмена очищен." | |
171 | ||
172 | #: ../src/fenrirscreenreader/commands/commands/clear_window_application.py:17 | |
173 | msgid "Turn off window mode for application" | |
174 | msgstr "Отключить режим окна для приложения." | |
175 | ||
176 | #: ../src/fenrirscreenreader/commands/commands/clear_window_application.py:22 | |
177 | msgid "Window Mode off for application {0}" | |
178 | msgstr "Режим окна выключен для приложения {0}" | |
179 | ||
180 | #: ../src/fenrirscreenreader/commands/commands/clear_window_application.py:24 | |
181 | msgid "Not in window Mode" | |
182 | msgstr "Не в режиме окна." | |
183 | ||
184 | #: | |
185 | #: ../src/fenrirscreenreader/commands/commands/copy_last_echo_to_clipboard.py:18 | |
186 | msgid "copies last presented text to the clipboard" | |
187 | msgstr "Копирует последний представленный текст в буфер обмена." | |
188 | ||
189 | #: ../src/fenrirscreenreader/commands/commands/copy_marked_to_clipboard.py:18 | |
190 | msgid "copies marked text to the currently selected clipboard" | |
191 | msgstr "Копирует помеченный текст в выбранный буфер обмена." | |
192 | ||
193 | #: ../src/fenrirscreenreader/commands/commands/copy_marked_to_clipboard.py:22 | |
194 | msgid "One or two marks are needed" | |
195 | msgstr "Необходимы одна или две ментки." | |
196 | ||
197 | #: ../src/fenrirscreenreader/commands/commands/curr_clipboard.py:17 | |
198 | msgid "speaks the contents of the currently selected clipboard" | |
199 | msgstr "Говорит содержимое выбранного буфера обмена." | |
200 | ||
201 | #: ../src/fenrirscreenreader/commands/commands/curr_clipboard.py:21 | |
202 | #: ../src/fenrirscreenreader/commands/commands/export_clipboard_to_file.py:28 | |
203 | #: ../src/fenrirscreenreader/commands/commands/export_clipboard_to_x.py:27 | |
204 | #: ../src/fenrirscreenreader/commands/commands/first_clipboard.py:21 | |
205 | #: ../src/fenrirscreenreader/commands/commands/last_clipboard.py:21 | |
206 | #: ../src/fenrirscreenreader/commands/commands/next_clipboard.py:21 | |
207 | #: ../src/fenrirscreenreader/commands/commands/paste_clipboard.py:23 | |
208 | #: ../src/fenrirscreenreader/commands/commands/prev_clipboard.py:21 | |
209 | msgid "clipboard empty" | |
210 | msgstr "Буфер обмена пустой." | |
211 | ||
212 | #: ../src/fenrirscreenreader/commands/commands/curr_screen.py:17 | |
213 | msgid "reads the contents of the current screen" | |
214 | msgstr "Чтение содержимого текущего экрана." | |
215 | ||
216 | #: ../src/fenrirscreenreader/commands/commands/curr_screen.py:21 | |
217 | msgid "screen is empty" | |
218 | msgstr "Экран пустой." | |
219 | ||
220 | #: ../src/fenrirscreenreader/commands/commands/curr_screen_after_cursor.py:18 | |
221 | msgid "reads from the cursor to the bottom of the screen" | |
222 | msgstr "Чтение от курсора до конца экрана." | |
223 | ||
224 | #: ../src/fenrirscreenreader/commands/commands/curr_screen_before_cursor.py:18 | |
225 | msgid "Reads from the top of the screen to the cursor position" | |
226 | msgstr "Чтение сначала экрана до курсора." | |
227 | ||
228 | #: ../src/fenrirscreenreader/commands/commands/current_quick_menu_entry.py:17 | |
229 | #: ../src/fenrirscreenreader/commands/quickMenu/current_quick_menu_entry.py:17 | |
230 | msgid "get current quick menu entry" | |
231 | msgstr "Получить текущий быстрый пункт меню" | |
232 | ||
233 | #: ../src/fenrirscreenreader/commands/commands/current_quick_menu_value.py:17 | |
234 | #: ../src/fenrirscreenreader/commands/quickMenu/current_quick_menu_value.py:17 | |
235 | msgid "get current quick menu value" | |
236 | msgstr "Получить текущее значение быстрого меню." | |
237 | ||
238 | #: ../src/fenrirscreenreader/commands/commands/cursor_column.py:17 | |
239 | msgid "Column number for cursor" | |
240 | msgstr "Номер столбца для курсора." | |
241 | ||
242 | #: ../src/fenrirscreenreader/commands/commands/cursor_lineno.py:17 | |
243 | msgid "Line number for cursor" | |
244 | msgstr "Номер строки для курсора." | |
245 | ||
246 | #: ../src/fenrirscreenreader/commands/commands/cursor_position.py:17 | |
247 | msgid "displays the position of the review cursor" | |
248 | msgstr "Отображает положение курсора обзора." | |
249 | ||
250 | #: ../src/fenrirscreenreader/commands/commands/cursor_position.py:23 | |
251 | msgid "line {0}, column {1}, Terminal {2}" | |
252 | msgstr "Строка {0}, столбец {1}, терминал {2}" | |
253 | ||
254 | #: | |
255 | #: ../src/fenrirscreenreader/commands/commands/cursor_read_to_end_of_line.py:18 | |
256 | msgid "read to end of line, use review cursor if you are in review mode, otherwhise use text cursor" | |
257 | msgstr "Чтение до конца строки, используйте курсор обзора, если вы находитесь в режиме просмотра, иначе используйте текстовый курсор." | |
258 | ||
259 | #: ../src/fenrirscreenreader/commands/commands/date.py:18 | |
260 | msgid "presents the date" | |
261 | msgstr "Сообщить дату." | |
262 | ||
263 | #: ../src/fenrirscreenreader/commands/commands/dec_alsa_volume.py:24 | |
264 | msgid "Decrease system volume" | |
265 | msgstr "Уменьшить громкость системы." | |
266 | ||
267 | #: ../src/fenrirscreenreader/commands/commands/dec_alsa_volume.py:28 | |
268 | #: ../src/fenrirscreenreader/commands/commands/inc_alsa_volume.py:28 | |
269 | msgid "alsaaudio is not installed" | |
270 | msgstr "alsaaudio не установлено" | |
271 | ||
272 | #: ../src/fenrirscreenreader/commands/commands/dec_alsa_volume.py:36 | |
273 | #: ../src/fenrirscreenreader/commands/commands/inc_alsa_volume.py:36 | |
274 | msgid "{0} percent system volume" | |
275 | msgstr "Громкость системы {0} процентов." | |
276 | ||
277 | #: ../src/fenrirscreenreader/commands/commands/dec_sound_volume.py:18 | |
278 | msgid "decrease sound volume" | |
279 | msgstr "Уменьшить громкость звука." | |
280 | ||
281 | #: ../src/fenrirscreenreader/commands/commands/dec_sound_volume.py:29 | |
282 | #: ../src/fenrirscreenreader/commands/commands/inc_sound_volume.py:29 | |
283 | msgid "{0} percent sound volume" | |
284 | msgstr "Громкость звука {0} процентов." | |
285 | ||
286 | #: ../src/fenrirscreenreader/commands/commands/dec_speech_pitch.py:18 | |
287 | msgid "Decreases the pitch of the speech" | |
288 | msgstr "Уменьшить тон речи." | |
289 | ||
290 | #: ../src/fenrirscreenreader/commands/commands/dec_speech_pitch.py:26 | |
291 | #: ../src/fenrirscreenreader/commands/commands/inc_speech_pitch.py:27 | |
292 | msgid "{0} percent speech pitch" | |
293 | msgstr "Тон речи {0} процентов." | |
294 | ||
295 | #: ../src/fenrirscreenreader/commands/commands/dec_speech_rate.py:18 | |
296 | msgid "Decreases the rate of the speech" | |
297 | msgstr "Уменьшить скорость речи." | |
298 | ||
299 | #: ../src/fenrirscreenreader/commands/commands/dec_speech_rate.py:27 | |
300 | #: ../src/fenrirscreenreader/commands/commands/inc_speech_rate.py:27 | |
301 | msgid "{0} percent speech rate" | |
302 | msgstr "Скорость речи {0} процентов." | |
303 | ||
304 | #: ../src/fenrirscreenreader/commands/commands/dec_speech_volume.py:18 | |
305 | msgid "Decreases the volume of the speech" | |
306 | msgstr "Уменьшить громкость речи." | |
307 | ||
308 | #: ../src/fenrirscreenreader/commands/commands/dec_speech_volume.py:27 | |
309 | #: ../src/fenrirscreenreader/commands/commands/inc_speech_volume.py:27 | |
310 | msgid "{0} percent speech volume" | |
311 | msgstr "Громкость речи {0} процентов." | |
312 | ||
313 | #: ../src/fenrirscreenreader/commands/commands/exit_review.py:17 | |
314 | #: ../src/fenrirscreenreader/commands/onCursorChange/95000-exit_review_mode.py:17 | |
315 | msgid "exits review mode" | |
316 | msgstr "Выход из режима просмотра." | |
317 | ||
318 | #: ../src/fenrirscreenreader/commands/commands/exit_review.py:21 | |
319 | msgid "Not in Review Mode" | |
320 | msgstr "Нет в режиме просмотра." | |
321 | ||
322 | #: ../src/fenrirscreenreader/commands/commands/exit_review.py:25 | |
323 | msgid "Exiting Review Mode" | |
324 | msgstr "Закрытие режима просмотра." | |
325 | ||
326 | #: ../src/fenrirscreenreader/commands/commands/export_clipboard_to_file.py:19 | |
327 | msgid "export the current fenrir clipboard to a file" | |
328 | msgstr "Экспортировать текущий буфер обмена Fenrir в файл." | |
329 | ||
330 | #: ../src/fenrirscreenreader/commands/commands/export_clipboard_to_file.py:34 | |
331 | msgid "clipboard exported to file" | |
332 | msgstr "Буфер обмена экспортирован в файл." | |
333 | ||
334 | #: ../src/fenrirscreenreader/commands/commands/export_clipboard_to_x.py:20 | |
335 | msgid "Export current fenrir clipboard to X or GUI clipboard" | |
336 | msgstr "Экспорт текущего буфера обмена fenrir в буфер обмена X или GUI" | |
337 | ||
338 | #: ../src/fenrirscreenreader/commands/commands/first_clipboard.py:17 | |
339 | msgid "selects the first clipboard" | |
340 | msgstr "Выбирает первый буфер обмена." | |
341 | ||
342 | #: ../src/fenrirscreenreader/commands/commands/forward_keypress.py:17 | |
343 | msgid "sends the following keypress to the terminal or application" | |
344 | msgstr "Отправляет следующее нажатие на терминал или приложение." | |
345 | ||
346 | #: ../src/fenrirscreenreader/commands/commands/forward_keypress.py:21 | |
347 | msgid "Forward next keypress" | |
348 | msgstr "Переслать следующую клавишу." | |
349 | ||
350 | #: | |
351 | #: ../src/fenrirscreenreader/commands/commands/import_clipboard_from_file.py:19 | |
352 | msgid "imports text from clipboard file to the clipboard" | |
353 | msgstr "импортирует текст из буфера файла в буфер обмена" | |
354 | ||
355 | #: | |
356 | #: ../src/fenrirscreenreader/commands/commands/import_clipboard_from_file.py:27 | |
357 | msgid "File does not exist" | |
358 | msgstr "Файл не существует." | |
359 | ||
360 | #: ../src/fenrirscreenreader/commands/commands/import_clipboard_from_x.py:21 | |
361 | msgid "imports the graphical clipboard to Fenrir's clipboard" | |
362 | msgstr "Импортирует графический буфер обмена в буфер обмена Фенрира." | |
363 | ||
364 | #: ../src/fenrirscreenreader/commands/commands/inc_alsa_volume.py:24 | |
365 | msgid "Increase system volume" | |
366 | msgstr "Увеличение громкости системы." | |
367 | ||
368 | #: ../src/fenrirscreenreader/commands/commands/inc_sound_volume.py:18 | |
369 | msgid "adjusts the volume for in coming sounds" | |
370 | msgstr "Регулирует громкость входящих звуков." | |
371 | ||
372 | #: ../src/fenrirscreenreader/commands/commands/inc_speech_pitch.py:18 | |
373 | msgid "Increases the pitch of the speech" | |
374 | msgstr "Увеличение тона речи." | |
375 | ||
376 | #: ../src/fenrirscreenreader/commands/commands/inc_speech_rate.py:18 | |
377 | msgid "Increase the speech rate" | |
378 | msgstr "Увеличение скорости речи." | |
379 | ||
380 | #: ../src/fenrirscreenreader/commands/commands/inc_speech_volume.py:18 | |
381 | msgid "Increase the speech volume" | |
382 | msgstr "Увеличение громкости речи." | |
383 | ||
384 | #: ../src/fenrirscreenreader/commands/commands/indent_curr_line.py:18 | |
385 | msgid "Presents the indentation level for the current line" | |
386 | msgstr "Сообщает уровень отступа для текущей строки." | |
387 | ||
388 | #: ../src/fenrirscreenreader/commands/commands/indent_curr_line.py:33 | |
389 | msgid "indent {0}" | |
390 | msgstr "Отступ {0}" | |
391 | ||
392 | #: ../src/fenrirscreenreader/commands/commands/last_clipboard.py:17 | |
393 | msgid "selects the last clipboard" | |
394 | msgstr "Выбирает последний буфер обмена." | |
395 | ||
396 | #: ../src/fenrirscreenreader/commands/commands/last_incoming.py:17 | |
397 | msgid "Presents the text which was last received" | |
398 | msgstr "Сообщать текст, который был получен последним." | |
399 | ||
400 | #: ../src/fenrirscreenreader/commands/commands/marked_text.py:18 | |
401 | msgid "Presents the currently selected text that will be copied to the clipboard" | |
402 | msgstr "Сообщает текущий выбранный текст, который будет скопирован в буфер обмена." | |
403 | ||
404 | #: ../src/fenrirscreenreader/commands/commands/marked_text.py:23 | |
405 | msgid "please set begin and endmark" | |
406 | msgstr "Пожалуйста, установите начало и конец." | |
407 | ||
408 | #: ../src/fenrirscreenreader/commands/commands/next_clipboard.py:17 | |
409 | msgid "selects the next clipboard" | |
410 | msgstr "Выбирает следующий буфер обмена." | |
411 | ||
412 | #: ../src/fenrirscreenreader/commands/commands/next_clipboard.py:28 | |
413 | #: ../src/fenrirscreenreader/commands/commands/prev_clipboard.py:28 | |
414 | msgid "First clipboard " | |
415 | msgstr "Первый буфер обмена." | |
416 | ||
417 | #: ../src/fenrirscreenreader/commands/commands/next_clipboard.py:30 | |
418 | #: ../src/fenrirscreenreader/commands/commands/prev_clipboard.py:30 | |
419 | msgid "Last clipboard " | |
420 | msgstr "Последний буфер обмена." | |
421 | ||
422 | #: ../src/fenrirscreenreader/commands/commands/next_quick_menu_entry.py:17 | |
423 | #: ../src/fenrirscreenreader/commands/quickMenu/next_quick_menu_entry.py:17 | |
424 | msgid "get next quick menu entry" | |
425 | msgstr "Получить следующий быстрый пункт меню." | |
426 | ||
427 | #: ../src/fenrirscreenreader/commands/commands/next_quick_menu_entry.py:27 | |
428 | #: ../src/fenrirscreenreader/commands/commands/prev_quick_menu_entry.py:27 | |
429 | #: ../src/fenrirscreenreader/commands/quickMenu/next_quick_menu_entry.py:27 | |
430 | #: ../src/fenrirscreenreader/commands/quickMenu/prev_quick_menu_entry.py:27 | |
431 | msgid "Quick menu not available" | |
432 | msgstr "Быстрое меню недоступно." | |
433 | ||
434 | #: ../src/fenrirscreenreader/commands/commands/next_quick_menu_value.py:17 | |
435 | #: ../src/fenrirscreenreader/commands/quickMenu/next_quick_menu_value.py:17 | |
436 | msgid "get next quick menu value" | |
437 | msgstr "Получить следующее значение быстрого меню." | |
438 | ||
439 | #: ../src/fenrirscreenreader/commands/commands/paste_clipboard.py:19 | |
440 | msgid "pastes the text from the currently selected clipboard" | |
441 | msgstr "Вставляет текст из текущего выбранного буфера обмена." | |
442 | ||
443 | #: ../src/fenrirscreenreader/commands/commands/present_first_line.py:18 | |
444 | msgid "present first line" | |
445 | msgstr "Сообщать первую строку." | |
446 | ||
447 | #: ../src/fenrirscreenreader/commands/commands/present_last_line.py:18 | |
448 | #: ../src/fenrirscreenreader/commands/commands/review_curr_line.py:18 | |
449 | msgid "current line" | |
450 | msgstr "Текущая строка." | |
451 | ||
452 | #: ../src/fenrirscreenreader/commands/commands/prev_clipboard.py:17 | |
453 | msgid "selects the previous clipboard" | |
454 | msgstr "Выбирает предыдущий буфер обмена." | |
455 | ||
456 | #: ../src/fenrirscreenreader/commands/commands/prev_quick_menu_entry.py:17 | |
457 | #: ../src/fenrirscreenreader/commands/quickMenu/prev_quick_menu_entry.py:17 | |
458 | msgid "get previous quick menu entry" | |
459 | msgstr "Получить предыдущий пункт быстрого меню." | |
460 | ||
461 | #: ../src/fenrirscreenreader/commands/commands/prev_quick_menu_value.py:17 | |
462 | #: ../src/fenrirscreenreader/commands/quickMenu/prev_quick_menu_value.py:17 | |
463 | msgid "get previous quick menu value" | |
464 | msgstr "Получить предыдущее значение быстрого меню." | |
465 | ||
466 | #: ../src/fenrirscreenreader/commands/commands/quit_fenrir.py:17 | |
467 | msgid "exits Fenrir" | |
468 | msgstr "Выход из fenrir." | |
469 | ||
470 | #: ../src/fenrirscreenreader/commands/commands/remove_marks.py:17 | |
471 | msgid "Removes marks from selected text" | |
472 | msgstr "Удалить метки из выбранного текста." | |
473 | ||
474 | #: ../src/fenrirscreenreader/commands/commands/remove_marks.py:21 | |
475 | msgid "Remove marks" | |
476 | msgstr "Удалить метки." | |
477 | ||
478 | #: | |
479 | #: ../src/fenrirscreenreader/commands/commands/remove_word_from_spell_check.py:27 | |
480 | msgid "removes the current word from the exceptions dictionary" | |
481 | msgstr "Удаляет текущее слова из словаря исключений." | |
482 | ||
483 | #: | |
484 | #: ../src/fenrirscreenreader/commands/commands/remove_word_from_spell_check.py:50 | |
485 | msgid "{0} is not in the dictionary" | |
486 | msgstr "{0} нет в словаре" | |
487 | ||
488 | #: | |
489 | #: ../src/fenrirscreenreader/commands/commands/remove_word_from_spell_check.py:53 | |
490 | msgid "{0} removed" | |
491 | msgstr "{0} удалено" | |
492 | ||
493 | #: ../src/fenrirscreenreader/commands/commands/review_bottom.py:17 | |
494 | msgid "Move review to the bottom of the screen" | |
495 | msgstr "Переместить просмотр в конец экрана." | |
496 | ||
497 | #: ../src/fenrirscreenreader/commands/commands/review_bottom.py:21 | |
498 | msgid "Bottom" | |
499 | msgstr "Конец" | |
500 | ||
501 | #: ../src/fenrirscreenreader/commands/commands/review_curr_char.py:18 | |
502 | msgid "presents the current character." | |
503 | msgstr "Сообщать текущий символ." | |
504 | ||
505 | #: ../src/fenrirscreenreader/commands/commands/review_curr_char_phonetic.py:18 | |
506 | msgid "set review and phonetically presents the current character" | |
507 | msgstr "Установить обзор и фонетически представлять текущий символ." | |
508 | ||
509 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word.py:18 | |
510 | msgid "current word." | |
511 | msgstr "Текущее слово." | |
512 | ||
513 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word.py:32 | |
514 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word_phonetic.py:36 | |
515 | #: ../src/fenrirscreenreader/commands/commands/review_down.py:27 | |
516 | #: ../src/fenrirscreenreader/commands/commands/review_next_char.py:28 | |
517 | #: ../src/fenrirscreenreader/commands/commands/review_next_char_phonetic.py:30 | |
518 | #: ../src/fenrirscreenreader/commands/commands/review_next_line.py:34 | |
519 | #: ../src/fenrirscreenreader/commands/commands/review_next_word.py:34 | |
520 | #: ../src/fenrirscreenreader/commands/commands/review_next_word_phonetic.py:36 | |
521 | #: ../src/fenrirscreenreader/commands/commands/review_prev_char.py:31 | |
522 | #: ../src/fenrirscreenreader/commands/commands/review_prev_char_phonetic.py:30 | |
523 | #: ../src/fenrirscreenreader/commands/commands/review_prev_line.py:32 | |
524 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word.py:32 | |
525 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word_phonetic.py:36 | |
526 | #: ../src/fenrirscreenreader/commands/commands/review_up.py:27 | |
527 | msgid "end of screen" | |
528 | msgstr "Конец экрана." | |
529 | ||
530 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word.py:35 | |
531 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word_phonetic.py:39 | |
532 | #: ../src/fenrirscreenreader/commands/commands/review_next_char.py:31 | |
533 | #: ../src/fenrirscreenreader/commands/commands/review_next_char_phonetic.py:33 | |
534 | #: ../src/fenrirscreenreader/commands/commands/review_next_word.py:37 | |
535 | #: ../src/fenrirscreenreader/commands/commands/review_next_word_phonetic.py:39 | |
536 | #: ../src/fenrirscreenreader/commands/commands/review_prev_char.py:34 | |
537 | #: ../src/fenrirscreenreader/commands/commands/review_prev_char_phonetic.py:33 | |
538 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word.py:35 | |
539 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word_phonetic.py:39 | |
540 | #: ../src/fenrirscreenreader/commands/commands/review_up.py:30 | |
541 | msgid "line break" | |
542 | msgstr "Разрыв строки" | |
543 | ||
544 | #: ../src/fenrirscreenreader/commands/commands/review_curr_word_phonetic.py:19 | |
545 | msgid "Phonetically spells the current word" | |
546 | msgstr "Представляет фонетически текущее слово" | |
547 | ||
548 | #: ../src/fenrirscreenreader/commands/commands/review_down.py:18 | |
549 | msgid "Move review to the character below the current position" | |
550 | msgstr "Переместить обзор на символ ниже текущей позиции." | |
551 | ||
552 | #: ../src/fenrirscreenreader/commands/commands/review_line_begin.py:18 | |
553 | msgid "set review cursor to begin of current line and display the content" | |
554 | msgstr "Установить курсор просмотра в начало текущей строки и отобразить содержимое." | |
555 | ||
556 | #: ../src/fenrirscreenreader/commands/commands/review_line_begin.py:30 | |
557 | msgid "beginning of line" | |
558 | msgstr "Начало строки" | |
559 | ||
560 | #: ../src/fenrirscreenreader/commands/commands/review_line_end.py:18 | |
561 | msgid "Move Review to the end of current line and display the content" | |
562 | msgstr "Установить курсор просмотра в конец текущей строки и отобразить содержимое." | |
563 | ||
564 | #: ../src/fenrirscreenreader/commands/commands/review_line_end.py:27 | |
565 | msgid "end of line" | |
566 | msgstr "Конец строки" | |
567 | ||
568 | #: ../src/fenrirscreenreader/commands/commands/review_line_first_char.py:19 | |
569 | msgid "Move Review to the first character on the line" | |
570 | msgstr "Переместить курсор просмотра к первому символу строки" | |
571 | ||
572 | #: ../src/fenrirscreenreader/commands/commands/review_line_first_char.py:26 | |
573 | msgid "line is empty" | |
574 | msgstr "Строка пустая" | |
575 | ||
576 | #: ../src/fenrirscreenreader/commands/commands/review_line_first_char.py:33 | |
577 | msgid "first character in line indent {0}" | |
578 | msgstr "Первый символ в строке {0}" | |
579 | ||
580 | #: ../src/fenrirscreenreader/commands/commands/review_line_last_char.py:18 | |
581 | msgid "Move Review to the last character on the line" | |
582 | msgstr "Переместить курсор к последнему символу на строке" | |
583 | ||
584 | #: ../src/fenrirscreenreader/commands/commands/review_line_last_char.py:27 | |
585 | msgid "last character in line" | |
586 | msgstr "Последний символ в строке" | |
587 | ||
588 | #: ../src/fenrirscreenreader/commands/commands/review_next_char.py:18 | |
589 | msgid "Moves review to the next character " | |
590 | msgstr "Переместить курсор просмотра к следующему символу " | |
591 | ||
592 | #: ../src/fenrirscreenreader/commands/commands/review_next_char_phonetic.py:18 | |
593 | msgid "phonetically presents the next character and set review to it" | |
594 | msgstr "Фонетически представляет следующий символ и устанавливает курсор обзора к нему." | |
595 | ||
596 | #: ../src/fenrirscreenreader/commands/commands/review_next_line.py:18 | |
597 | msgid "moves review to the next line " | |
598 | msgstr "Переместить курсор просмотра к следующей строке" | |
599 | ||
600 | #: ../src/fenrirscreenreader/commands/commands/review_next_word.py:18 | |
601 | msgid "moves review to the next word " | |
602 | msgstr "Переместить курсор просмотра к следующему слову" | |
603 | ||
604 | #: ../src/fenrirscreenreader/commands/commands/review_next_word_phonetic.py:19 | |
605 | msgid "Phonetically spells the next word and moves review to it" | |
606 | msgstr "Фонетически представляет следующее слово и перемещает курсор обзора к нему." | |
607 | ||
608 | #: ../src/fenrirscreenreader/commands/commands/review_prev_char.py:18 | |
609 | msgid "moves review to the previous character " | |
610 | msgstr "Переместить курсор просмотра к предыдущему символу" | |
611 | ||
612 | #: ../src/fenrirscreenreader/commands/commands/review_prev_char_phonetic.py:18 | |
613 | msgid "phonetically presents the previous character and set review to it" | |
614 | msgstr "Фонетически представляет предыдущий символ и устанавливает курсор обзора к нему." | |
615 | ||
616 | #: ../src/fenrirscreenreader/commands/commands/review_prev_line.py:18 | |
617 | msgid "moves review to the previous line " | |
618 | msgstr "Переместить курсор просмотра к предыдущей строке" | |
619 | ||
620 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word.py:18 | |
621 | msgid "moves review focus to the previous word " | |
622 | msgstr "Переместить курсор просмотра к предыдущему слову" | |
623 | ||
624 | #: ../src/fenrirscreenreader/commands/commands/review_prev_word_phonetic.py:19 | |
625 | msgid "Phonetically spells the previous word and moves review to it" | |
626 | msgstr "Фонетически представляет предыдущее слово и перемещает курсор обзора к нему." | |
627 | ||
628 | #: ../src/fenrirscreenreader/commands/commands/review_top.py:18 | |
629 | msgid "move review to top of screen" | |
630 | msgstr "Переместить курсор просмотра в начало экрана" | |
631 | ||
632 | #: ../src/fenrirscreenreader/commands/commands/review_top.py:22 | |
633 | msgid "Top" | |
634 | msgstr "Начало" | |
635 | ||
636 | #: ../src/fenrirscreenreader/commands/commands/review_up.py:18 | |
637 | msgid "Move review to the character in the line above the current position" | |
638 | msgstr "Переместить курсор обзора на символ в строке выше текущей позиции." | |
639 | ||
640 | #: ../src/fenrirscreenreader/commands/commands/save_settings.py:18 | |
641 | msgid "Saves your current Fenrir settings so they are the default." | |
642 | msgstr "Сохранить текущие настройки fenrir как настройки по умолчанию." | |
643 | ||
644 | #: ../src/fenrirscreenreader/commands/commands/save_settings.py:22 | |
645 | msgid "Settings saved." | |
646 | msgstr "Настройки сохранены" | |
647 | ||
648 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_1.py:18 | |
649 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_10.py:18 | |
650 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_2.py:18 | |
651 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_3.py:18 | |
652 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_4.py:18 | |
653 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_5.py:18 | |
654 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_6.py:18 | |
655 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_7.py:18 | |
656 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_8.py:18 | |
657 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_9.py:18 | |
658 | msgid "set Bookmark {0}" | |
659 | msgstr "Установить закладку {0}" | |
660 | ||
661 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_1.py:22 | |
662 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_10.py:22 | |
663 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_2.py:22 | |
664 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_3.py:22 | |
665 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_4.py:22 | |
666 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_5.py:22 | |
667 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_6.py:22 | |
668 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_7.py:22 | |
669 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_8.py:22 | |
670 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_9.py:22 | |
671 | msgid "No mark found" | |
672 | msgstr "Метка не найдена." | |
673 | ||
674 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_1.py:32 | |
675 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_10.py:32 | |
676 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_2.py:32 | |
677 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_3.py:32 | |
678 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_4.py:32 | |
679 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_5.py:32 | |
680 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_6.py:32 | |
681 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_7.py:32 | |
682 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_8.py:32 | |
683 | #: ../src/fenrirscreenreader/commands/commands/set_bookmark_9.py:32 | |
684 | msgid "Bookmark {0} set for application {1}" | |
685 | msgstr "Закладка {0} установлена для приложения {1}" | |
686 | ||
687 | #: ../src/fenrirscreenreader/commands/commands/set_mark.py:17 | |
688 | msgid "places marks to select text to copy to the clipboard" | |
689 | msgstr "Ставит метки для выбора текста для копирования в буфер обмена." | |
690 | ||
691 | #: ../src/fenrirscreenreader/commands/commands/set_mark.py:21 | |
692 | msgid "no review cursor" | |
693 | msgstr "Нет курсора просмотра" | |
694 | ||
695 | #: ../src/fenrirscreenreader/commands/commands/set_mark.py:26 | |
696 | #: ../src/fenrirscreenreader/commands/commands/set_mark.py:28 | |
697 | msgid "set mark" | |
698 | msgstr "Установка метки." | |
699 | ||
700 | #: ../src/fenrirscreenreader/commands/commands/set_window_application.py:17 | |
701 | msgid "set Window Mode, needs 2 marks " | |
702 | msgstr "Установка режима окна нуждается в двух метках" | |
703 | ||
704 | #: ../src/fenrirscreenreader/commands/commands/set_window_application.py:22 | |
705 | msgid "Window Mode on for application {0}" | |
706 | msgstr "Режим окна для приложения {0}" | |
707 | ||
708 | #: ../src/fenrirscreenreader/commands/commands/set_window_application.py:25 | |
709 | msgid "Set window begin and end marks" | |
710 | msgstr "Установка начала и конца окна" | |
711 | ||
712 | #: ../src/fenrirscreenreader/commands/commands/shut_up.py:17 | |
713 | msgid "Interrupts the current presentation" | |
714 | msgstr "Прерывать текущую речь." | |
715 | ||
716 | #: ../src/fenrirscreenreader/commands/commands/spell_check.py:26 | |
717 | msgid "checks the spelling of the current word" | |
718 | msgstr "Проверяет написание текущего слова." | |
719 | ||
720 | #: ../src/fenrirscreenreader/commands/commands/spell_check.py:51 | |
721 | #: ../src/fenrirscreenreader/commands/onCursorChange/35000-spell_check.py:129 | |
722 | msgid "misspelled" | |
723 | msgstr "Орфографическая ошибка" | |
724 | ||
725 | #: ../src/fenrirscreenreader/commands/commands/spell_check.py:53 | |
726 | msgid "correct" | |
727 | msgstr "Правильно" | |
728 | ||
729 | #: ../src/fenrirscreenreader/commands/commands/subprocess.py:21 | |
730 | msgid "script: {0} fullpath: {1}" | |
731 | msgstr "Скрипт; {0}, путь {1}" | |
732 | ||
733 | #: ../src/fenrirscreenreader/commands/commands/subprocess.py:24 | |
734 | msgid "Script file not found" | |
735 | msgstr "Скрипт не найден" | |
736 | ||
737 | #: ../src/fenrirscreenreader/commands/commands/subprocess.py:27 | |
738 | msgid "Script source is not a valid file" | |
739 | msgstr "Исходник скрипта неправильный файл" | |
740 | ||
741 | #: ../src/fenrirscreenreader/commands/commands/subprocess.py:30 | |
742 | msgid "Script file is not executable" | |
743 | msgstr "Файл скрипта не исполняемый" | |
744 | ||
745 | #: ../src/fenrirscreenreader/commands/commands/temp_disable_speech.py:17 | |
746 | #: ../src/fenrirscreenreader/commands/onByteInput/15000-enable_temp_speech.py:17 | |
747 | #: ../src/fenrirscreenreader/commands/onKeyInput/15000-enable_temp_speech.py:17 | |
748 | msgid "disables speech until next keypress" | |
749 | msgstr "Отключить речь пока не нажата следующая клавиша" | |
750 | ||
751 | #: ../src/fenrirscreenreader/commands/commands/time.py:18 | |
752 | msgid "presents the time" | |
753 | msgstr "Сообщить время" | |
754 | ||
755 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_indent.py:16 | |
756 | msgid "enables or disables automatic reading of indentation level changes" | |
757 | msgstr "включить или отключить чтение изменения уровня отступов." | |
758 | ||
759 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_indent.py:21 | |
760 | msgid "autoindent enabled" | |
761 | msgstr "чтение отступов включено" | |
762 | ||
763 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_indent.py:23 | |
764 | msgid "autoindent disabled" | |
765 | msgstr "чтение отступов отключено" | |
766 | ||
767 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_read.py:16 | |
768 | msgid "enables or disables automatic reading of new text as it appears" | |
769 | msgstr "включить или отключить чтения нового текста" | |
770 | ||
771 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_read.py:21 | |
772 | msgid "autoread enabled" | |
773 | msgstr "Автоматическое чтение нового текста включено" | |
774 | ||
775 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_read.py:23 | |
776 | msgid "autoread disabled" | |
777 | msgstr "Автоматическое чтение нового текста выключено" | |
778 | ||
779 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_spell_check.py:17 | |
780 | msgid "enables or disables automatic spell checking" | |
781 | msgstr "Включить или отключить проверку орфографических ошибок." | |
782 | ||
783 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_spell_check.py:22 | |
784 | msgid "auto spellcheck enabled" | |
785 | msgstr "Проверка орфографических ошибок включена" | |
786 | ||
787 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_spell_check.py:24 | |
788 | msgid "auto spellcheck disabled" | |
789 | msgstr "Проверка орфографических ошибок выключена" | |
790 | ||
791 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_time.py:16 | |
792 | msgid "Enables or disables automatic reading of time after specified intervals" | |
793 | msgstr "Включение или выключение автоматического сообщение времени в указанном интервале." | |
794 | ||
795 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_time.py:21 | |
796 | msgid "Automatic time announcement enabled" | |
797 | msgstr "Автоматическое сообщение времени включено" | |
798 | ||
799 | #: ../src/fenrirscreenreader/commands/commands/toggle_auto_time.py:23 | |
800 | msgid "Automatic time announcement disabled" | |
801 | msgstr "Автоматическое сообщение времени отключено" | |
802 | ||
803 | #: ../src/fenrirscreenreader/commands/commands/toggle_barrier.py:16 | |
804 | msgid "enables or disables the barrier mode" | |
805 | msgstr "Включение или отключение режима барьера" | |
806 | ||
807 | #: ../src/fenrirscreenreader/commands/commands/toggle_barrier.py:21 | |
808 | msgid "barrier mode enabled" | |
809 | msgstr "Режим барьера включен" | |
810 | ||
811 | #: ../src/fenrirscreenreader/commands/commands/toggle_barrier.py:23 | |
812 | msgid "barrier mode disabled" | |
813 | msgstr "Режим барьера выключен" | |
814 | ||
815 | #: ../src/fenrirscreenreader/commands/commands/toggle_braille.py:17 | |
816 | msgid "Enables and disables Braille output" | |
817 | msgstr "Включение и отключение устройства Брайля." | |
818 | ||
819 | #: ../src/fenrirscreenreader/commands/commands/toggle_braille.py:21 | |
820 | msgid "braille disabled" | |
821 | msgstr "Браиль выключен" | |
822 | ||
823 | #: ../src/fenrirscreenreader/commands/commands/toggle_braille.py:24 | |
824 | msgid "braille enabled" | |
825 | msgstr "Браиль включен" | |
826 | ||
827 | #: ../src/fenrirscreenreader/commands/commands/toggle_emoticons.py:16 | |
828 | msgid "enables or disables announcement of emoticons instead of chars" | |
829 | msgstr "Включение или отключение смайлов вместо символов." | |
830 | ||
831 | #: ../src/fenrirscreenreader/commands/commands/toggle_emoticons.py:21 | |
832 | msgid "emoticons enabled" | |
833 | msgstr "Смайлы включены" | |
834 | ||
835 | #: ../src/fenrirscreenreader/commands/commands/toggle_emoticons.py:23 | |
836 | msgid "emoticons disabled" | |
837 | msgstr "Смайлы выключены" | |
838 | ||
839 | #: ../src/fenrirscreenreader/commands/commands/toggle_has_attribute.py:16 | |
840 | msgid "enables or disables the announcement of attributes" | |
841 | msgstr "Включение или отключение чтения атрибутов" | |
842 | ||
843 | #: ../src/fenrirscreenreader/commands/commands/toggle_has_attribute.py:21 | |
844 | msgid "announcement of attributes enabled" | |
845 | msgstr "Чтение атрибутов включено" | |
846 | ||
847 | #: ../src/fenrirscreenreader/commands/commands/toggle_has_attribute.py:23 | |
848 | msgid "announcement of attributes disabled" | |
849 | msgstr "Чтение атрибутов выключено" | |
850 | ||
851 | #: ../src/fenrirscreenreader/commands/commands/toggle_highlight_tracking.py:16 | |
852 | msgid "enables or disables tracking of highlighted text" | |
853 | msgstr "Включает или отключает отслеживание выделенного текста" | |
854 | ||
855 | #: ../src/fenrirscreenreader/commands/commands/toggle_highlight_tracking.py:24 | |
856 | msgid "highlight tracking" | |
857 | msgstr "Отслеживание выделения" | |
858 | ||
859 | #: ../src/fenrirscreenreader/commands/commands/toggle_highlight_tracking.py:26 | |
860 | msgid "cursor tracking" | |
861 | msgstr "Отслеживание курсора" | |
862 | ||
863 | #: ../src/fenrirscreenreader/commands/commands/toggle_output.py:17 | |
864 | msgid "toggles all output settings" | |
865 | msgstr "Переключает все настройки вывода" | |
866 | ||
867 | #: ../src/fenrirscreenreader/commands/commands/toggle_output.py:23 | |
868 | msgid "Fenrir muted" | |
869 | msgstr "Речь fenrir отключена" | |
870 | ||
871 | #: ../src/fenrirscreenreader/commands/commands/toggle_output.py:31 | |
872 | msgid "Fenrir unmuted" | |
873 | msgstr "Речь fenrir включена" | |
874 | ||
875 | #: ../src/fenrirscreenreader/commands/commands/toggle_punctuation_level.py:23 | |
876 | msgid "No punctuation found." | |
877 | msgstr "Пунктуация не найдена" | |
878 | ||
879 | #: ../src/fenrirscreenreader/commands/commands/toggle_sound.py:17 | |
880 | msgid "enables or disables sound" | |
881 | msgstr "Включение или отключение звуковых эффектов" | |
882 | ||
883 | #: ../src/fenrirscreenreader/commands/commands/toggle_sound.py:21 | |
884 | msgid "sound disabled" | |
885 | msgstr "Звуковые эффекты выключены" | |
886 | ||
887 | #: ../src/fenrirscreenreader/commands/commands/toggle_sound.py:24 | |
888 | msgid "sound enabled" | |
889 | msgstr "Звуковые эффекты включены" | |
890 | ||
891 | #: ../src/fenrirscreenreader/commands/commands/toggle_speech.py:17 | |
892 | msgid "enables or disables speech" | |
893 | msgstr "Включение или отключение речи" | |
894 | ||
895 | #: ../src/fenrirscreenreader/commands/commands/toggle_speech.py:22 | |
896 | msgid "speech disabled" | |
897 | msgstr "Речь выключена" | |
898 | ||
899 | #: ../src/fenrirscreenreader/commands/commands/toggle_speech.py:25 | |
900 | #: ../src/fenrirscreenreader/commands/onByteInput/15000-enable_temp_speech.py:24 | |
901 | #: ../src/fenrirscreenreader/commands/onKeyInput/15000-enable_temp_speech.py:28 | |
902 | msgid "speech enabled" | |
903 | msgstr "Речь включена" | |
904 | ||
905 | #: ../src/fenrirscreenreader/commands/commands/toggle_tutorial_mode.py:18 | |
906 | msgid "Exiting tutorial mode. To enter tutorial mode again press Fenrir+f1" | |
907 | msgstr "Режим обучения закрыт. Чтобы снова войти в режим обучения нажмите fenrir+f1" | |
908 | ||
909 | #: ../src/fenrirscreenreader/commands/commands/toggle_tutorial_mode.py:22 | |
910 | msgid "Entering tutorial mode. In this mode commands are described but not executed. You can move through the list of commands with the up and down arrow keys. To Exit tutorial mode press Fenrir+f1." | |
911 | msgstr "Включен режим обучения. В этом режиме можно ознакомиться с описанием команд сами команды не выполняются. Перемещаться по списку можно с помощью клавиш стрелок вверх, вниз. Для закрытия нажмите fenrir+f1" | |
912 | ||
913 | #: ../src/fenrirscreenreader/commands/commands/toggle_vmenu_mode.py:18 | |
914 | msgid "Entering or Leaving v menu mode." | |
915 | msgstr "вход и выход из v меню" | |
916 | ||
917 | #: ../src/fenrirscreenreader/commands/commands/toggle_vmenu_mode.py:22 | |
918 | msgid "Entering v menu." | |
919 | msgstr "вход в v меню" | |
920 | ||
921 | #: ../src/fenrirscreenreader/commands/commands/toggle_vmenu_mode.py:24 | |
922 | msgid "Leaving v menu." | |
923 | msgstr "выъход из v меню" | |
924 | ||
925 | #: ../src/fenrirscreenreader/commands/help/curr_help.py:17 | |
926 | msgid "get current help message" | |
927 | msgstr "Получить текущее сообщение подсказки" | |
928 | ||
929 | #: ../src/fenrirscreenreader/commands/help/next_help.py:17 | |
930 | msgid "get next help message" | |
931 | msgstr "Получить следующее сообщение подсказки" | |
932 | ||
933 | #: ../src/fenrirscreenreader/commands/help/prev_help.py:17 | |
934 | msgid "get prev help message" | |
935 | msgstr "Получить предыдущее сообщение подсказки" | |
936 | ||
937 | #: | |
938 | #: ../src/fenrirscreenreader/commands/onCursorChange/65000-present_line_if_cursor_change_vertical.py:46 | |
939 | msgid "indented " | |
940 | msgstr "" | |
941 | ||
942 | #: ../src/fenrirscreenreader/commands/onHeartBeat/76000-time.py:66 | |
943 | msgid "Autotime: {0}" | |
944 | msgstr "объявление времени {0}" | |
945 | ||
946 | #: ../src/fenrirscreenreader/commands/onKeyInput/80000-capslock.py:22 | |
947 | msgid "Capslock on" | |
948 | msgstr "Capslock включен" | |
949 | ||
950 | #: ../src/fenrirscreenreader/commands/onKeyInput/80000-capslock.py:24 | |
951 | msgid "Capslock off" | |
952 | msgstr "Capslock выключен" | |
953 | ||
954 | #: ../src/fenrirscreenreader/commands/onKeyInput/80300-scrolllock.py:22 | |
955 | msgid "Scrolllock on" | |
956 | msgstr "Scrolllock включен" | |
957 | ||
958 | #: ../src/fenrirscreenreader/commands/onKeyInput/80300-scrolllock.py:24 | |
959 | msgid "Scrolllock off" | |
960 | msgstr "Scrolllock выключен" | |
961 | ||
962 | #: ../src/fenrirscreenreader/commands/onKeyInput/80500-numlock.py:22 | |
963 | msgid "Numlock on" | |
964 | msgstr "Numlock включен" | |
965 | ||
966 | #: ../src/fenrirscreenreader/commands/onKeyInput/80500-numlock.py:24 | |
967 | msgid "Numlock off" | |
968 | msgstr "Numlock выключен" | |
969 | ||
970 | #: | |
971 | #: ../src/fenrirscreenreader/commands/onScreenChanged/80000-screen_change_announcement.py:20 | |
972 | msgid "screen {0}" | |
973 | msgstr "Экран {0} " | |
974 | ||
975 | #: | |
976 | #: ../src/fenrirscreenreader/commands/onScreenUpdate/56000-highlight_tracking.py:16 | |
977 | msgid "enables or disables tracking of highlighted" | |
978 | msgstr "Включает или отключает отслеживание выделения" | |
979 | ||
980 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/curr_vmenu_entry.py:17 | |
981 | msgid "get current v menu entry" | |
982 | msgstr "Получить текущий пункт меню v" | |
983 | ||
984 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/dec_level_vmenu.py:17 | |
985 | msgid "leave v menu submenu" | |
986 | msgstr "Выйти v меню подменю" | |
987 | ||
988 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/exec_vmenu_entry.py:17 | |
989 | msgid "execute v menu entry" | |
990 | msgstr "Выполнить пункт v меню" | |
991 | ||
992 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/inc_level_vmenu.py:17 | |
993 | msgid "enter v menu submenu" | |
994 | msgstr "войти в подменю меню" | |
995 | ||
996 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/next_vmenu_entry.py:17 | |
997 | msgid "get next v menu entry" | |
998 | msgstr "получить следующий пункт меню v" | |
999 | ||
1000 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/prev_vmenu_entry.py:17 | |
1001 | msgid "get prev v menu entry" | |
1002 | msgstr "получить предыдущий пункт меню v" | |
1003 | ||
1004 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_a.py:17 | |
1005 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_b.py:17 | |
1006 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_c.py:17 | |
1007 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_d.py:17 | |
1008 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_e.py:17 | |
1009 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_f.py:17 | |
1010 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_g.py:17 | |
1011 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_h.py:17 | |
1012 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_i.py:17 | |
1013 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_j.py:17 | |
1014 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_k.py:17 | |
1015 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_l.py:17 | |
1016 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_m.py:17 | |
1017 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_n.py:17 | |
1018 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_o.py:17 | |
1019 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_p.py:17 | |
1020 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_q.py:17 | |
1021 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_r.py:17 | |
1022 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_s.py:17 | |
1023 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_t.py:17 | |
1024 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_u.py:17 | |
1025 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_v.py:17 | |
1026 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_w.py:17 | |
1027 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_x.py:17 | |
1028 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_y.py:17 | |
1029 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_z.py:17 | |
1030 | msgid "search for an menu entry" | |
1031 | msgstr "поиск пункта меню" | |
1032 | ||
1033 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_a.py:23 | |
1034 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_b.py:23 | |
1035 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_c.py:23 | |
1036 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_d.py:23 | |
1037 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_e.py:23 | |
1038 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_f.py:23 | |
1039 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_g.py:23 | |
1040 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_h.py:23 | |
1041 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_i.py:23 | |
1042 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_j.py:23 | |
1043 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_k.py:23 | |
1044 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_l.py:23 | |
1045 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_m.py:23 | |
1046 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_n.py:23 | |
1047 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_o.py:23 | |
1048 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_p.py:23 | |
1049 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_q.py:23 | |
1050 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_r.py:23 | |
1051 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_s.py:23 | |
1052 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_t.py:23 | |
1053 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_u.py:23 | |
1054 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_v.py:23 | |
1055 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_w.py:23 | |
1056 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_x.py:23 | |
1057 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_y.py:23 | |
1058 | #: ../src/fenrirscreenreader/commands/vmenu-navigation/search_z.py:23 | |
1059 | msgid "not found" | |
1060 | msgstr "Не найдено" | |
1061 | ||
1062 | #: ../src/fenrirscreenreader/core/attributeManager.py:168 | |
1063 | msgid "bold" | |
1064 | msgstr "Жирный" | |
1065 | ||
1066 | #: ../src/fenrirscreenreader/core/attributeManager.py:176 | |
1067 | msgid "italic" | |
1068 | msgstr "Курсивный" | |
1069 | ||
1070 | #: ../src/fenrirscreenreader/core/attributeManager.py:184 | |
1071 | msgid "underline" | |
1072 | msgstr "Подчеркнутый" | |
1073 | ||
1074 | #: ../src/fenrirscreenreader/core/attributeManager.py:192 | |
1075 | msgid "strikethrough" | |
1076 | msgstr "Зачеркнутый" | |
1077 | ||
1078 | #: ../src/fenrirscreenreader/core/attributeManager.py:200 | |
1079 | msgid "reverse" | |
1080 | msgstr "Обратный" | |
1081 | ||
1082 | #: ../src/fenrirscreenreader/core/attributeManager.py:208 | |
1083 | msgid "blink" | |
1084 | msgstr "Мерцание" | |
1085 | ||
1086 | #: ../src/fenrirscreenreader/core/attributeManager.py:225 | |
1087 | #: ../src/fenrirscreenreader/core/attributeManager.py:232 | |
1088 | msgid "default" | |
1089 | msgstr "По умолчанию" | |
1090 | ||
1091 | #: ../src/fenrirscreenreader/core/byteManager.py:103 | |
1092 | #: ../src/fenrirscreenreader/core/byteManager.py:105 | |
1093 | msgid "Sticky Mode On" | |
1094 | msgstr "Режим залипания включен" | |
1095 | ||
1096 | #: ../src/fenrirscreenreader/core/byteManager.py:109 | |
1097 | msgid "bypass" | |
1098 | msgstr "" | |
1099 | ||
1100 | #: ../src/fenrirscreenreader/core/fenrirManager.py:26 | |
1101 | msgid "Start Fenrir" | |
1102 | msgstr "fenrir запущен" | |
1103 | ||
1104 | #: ../src/fenrirscreenreader/core/fenrirManager.py:234 | |
1105 | msgid "Quit Fenrir" | |
1106 | msgstr "выключить fenrir" | |
1107 | ||
1108 | #: ../src/fenrirscreenreader/core/helpManager.py:77 | |
1109 | msgid "toggles the tutorial mode" | |
1110 | msgstr "Переключение в режим обучения" | |
1111 | ||
1112 | #: ../src/fenrirscreenreader/core/outputManager.py:297 | |
1113 | msgid "speech temporary disabled" | |
1114 | msgstr "Речь временно отключена" | |
1115 | ||
1116 | #: ../src/fenrirscreenreader/core/quickMenuManager.py:124 | |
1117 | msgid "setting invalid" | |
1118 | msgstr "Неправильная настройка" | |
1119 | ||
1120 | #: ../src/fenrirscreenreader/core/quickMenuManager.py:131 | |
1121 | msgid "setting value invalid" | |
1122 | msgstr "Значение настройки неправильное" | |
1123 | ||
1124 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1125 | msgid "black" | |
1126 | msgstr "черный" | |
1127 | ||
1128 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1129 | msgid "blue" | |
1130 | msgstr "синий" | |
1131 | ||
1132 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1133 | msgid "cyan" | |
1134 | msgstr "" | |
1135 | ||
1136 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1137 | msgid "green" | |
1138 | msgstr "зеленый" | |
1139 | ||
1140 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1141 | msgid "red" | |
1142 | msgstr "красный" | |
1143 | ||
1144 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1145 | msgid "white" | |
1146 | msgstr "белый" | |
1147 | ||
1148 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1149 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1150 | msgid "Magenta" | |
1151 | msgstr "пурпурный" | |
1152 | ||
1153 | #: ../src/fenrirscreenreader/core/screenDriver.py:12 | |
1154 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1155 | msgid "brown/yellow" | |
1156 | msgstr "коричневый/желтый" | |
1157 | ||
1158 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1159 | msgid "Black" | |
1160 | msgstr "черный" | |
1161 | ||
1162 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1163 | msgid "Blue" | |
1164 | msgstr "синий" | |
1165 | ||
1166 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1167 | msgid "Cyan" | |
1168 | msgstr "" | |
1169 | ||
1170 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1171 | msgid "Dark gray" | |
1172 | msgstr "темно серый" | |
1173 | ||
1174 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1175 | msgid "Green" | |
1176 | msgstr "зеленый" | |
1177 | ||
1178 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1179 | msgid "Light blue" | |
1180 | msgstr "голубой" | |
1181 | ||
1182 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1183 | msgid "Light cyan" | |
1184 | msgstr "светло-голубой" | |
1185 | ||
1186 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1187 | msgid "Light gray" | |
1188 | msgstr "светлосерый" | |
1189 | ||
1190 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1191 | msgid "Light magenta" | |
1192 | msgstr "Светло-пурпурный" | |
1193 | ||
1194 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1195 | msgid "Light red" | |
1196 | msgstr "розовый" | |
1197 | ||
1198 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1199 | msgid "Light yellow" | |
1200 | msgstr "светло желтый" | |
1201 | ||
1202 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1203 | msgid "Red" | |
1204 | msgstr "красный" | |
1205 | ||
1206 | #: ../src/fenrirscreenreader/core/screenDriver.py:13 | |
1207 | msgid "White" | |
1208 | msgstr "белый" | |
1209 | ||
1210 | #: ../src/fenrirscreenreader/core/vmenuManager.py:66 | |
1211 | #: ../src/fenrirscreenreader/core/vmenuManager.py:226 | |
1212 | msgid "Menu" | |
1213 | msgstr "Меню" | |
1214 | ||
1215 | #: ../src/fenrirscreenreader/core/vmenuManager.py:234 | |
1216 | msgid "Action" | |
1217 | msgstr "Действие" | |
1218 |
0 | #!/bin/bash | |
1 | # clilauncher.sh | |
2 | # Description: Launches xterm with give application and fenrir. | |
3 | # | |
4 | # Copyright 2019, F123 Consulting, <information@f123.org> | |
5 | # Copyright 2019, Storm Dragon, <storm_dragon@linux-a11y.org> | |
6 | # | |
7 | # This is free software; you can redistribute it and/or modify it under the | |
8 | # terms of the GNU General Public License as published by the Free | |
9 | # Software Foundation; either version 3, or (at your option) any later | |
10 | # version. | |
11 | # | |
12 | # This software is distributed in the hope that it will be useful, | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
18 | # along with this package; see the file COPYING. If not, write to the Free | |
19 | # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
20 | # 02110-1301, USA. | |
21 | # | |
22 | #--code-- | |
23 | ||
24 | if [[ $# -lt 1 ]]; then | |
25 | echo "Usage: $0 program to launch args." | |
26 | exit 1 | |
27 | fi | |
28 | ||
29 | # Make sure the program being launched exists | |
30 | command -v "${1%% *}" &> /dev/null || exit 1 | |
31 | ||
32 | for i in /tmp/fenrirscreenreader-*.sock ; do | |
33 | if [[ "$i" != "/tmp/fenrirscreenreader-deamon.sock" ]]; then | |
34 | echo -n "setting set screen#suspendingScreen=pty" | socat - UNIX-CLIENT:$i | |
35 | fi | |
36 | done | |
37 | ||
38 | #/usr/bin/urxvt -name "${1%% *}" -e fenrir -d -s /etc/fenrirscreenreader/settings/xterm.conf -o "general.shell=/usr/bin/${1%% *};remote#socketFile=/tmp/fenrirscreenreader-${1%% *}.sock" | |
39 | /usr/bin/urxvt -name "${1%% *}" -e ../src/fenrir -d -s ./xterm.conf -o "general.shell=/usr/bin/${1%% *};remote#socketFile=/tmp/fenrirscreenreader-${1%% *}.sock" | |
40 |
0 | #!/bin/bash | |
1 | # clilauncher.sh | |
2 | # Description: Launches xterm with give application and fenrir. | |
3 | # | |
4 | # Copyright 2019, F123 Consulting, <information@f123.org> | |
5 | # Copyright 2019, Storm Dragon, <storm_dragon@linux-a11y.org> | |
6 | # | |
7 | # This is free software; you can redistribute it and/or modify it under the | |
8 | # terms of the GNU General Public License as published by the Free | |
9 | # Software Foundation; either version 3, or (at your option) any later | |
10 | # version. | |
11 | # | |
12 | # This software is distributed in the hope that it will be useful, | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
18 | # along with this package; see the file COPYING. If not, write to the Free | |
19 | # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
20 | # 02110-1301, USA. | |
21 | # | |
22 | #--code-- | |
23 | ||
24 | rm -rf /tmp/fenrir* | |
25 | ||
26 | for i in /tmp/fenrirscreenreader-*.sock ; do | |
27 | if [[ "$i" != "/tmp/fenrirscreenreader-deamon.sock" ]]; then | |
28 | echo -n "setting set screen#suspendingScreen=pty" | socat - UNIX-CLIENT:$i | |
29 | fi | |
30 | done | |
31 | ||
32 | /usr/bin/urxvt -e ../src/fenrir -s ./xterm.conf -o "general.shell=./waitForKey1;remote#socketFile=/tmp/fenrirscreenreader-waitForKey1.sock" | |
33 | ||
34 |
0 | #!/bin/bash | |
1 | # clilauncher.sh | |
2 | # Description: Launches xterm with give application and fenrir. | |
3 | # | |
4 | # Copyright 2019, F123 Consulting, <information@f123.org> | |
5 | # Copyright 2019, Storm Dragon, <storm_dragon@linux-a11y.org> | |
6 | # | |
7 | # This is free software; you can redistribute it and/or modify it under the | |
8 | # terms of the GNU General Public License as published by the Free | |
9 | # Software Foundation; either version 3, or (at your option) any later | |
10 | # version. | |
11 | # | |
12 | # This software is distributed in the hope that it will be useful, | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | # General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
18 | # along with this package; see the file COPYING. If not, write to the Free | |
19 | # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
20 | # 02110-1301, USA. | |
21 | # | |
22 | #--code-- | |
23 | ||
24 | for i in /tmp/fenrirscreenreader-*.sock ; do | |
25 | if [[ "$i" != "/tmp/fenrirscreenreader-deamon.sock" ]]; then | |
26 | echo -n "setting set screen#suspendingScreen=pty" | socat - UNIX-CLIENT:$i | |
27 | fi | |
28 | done | |
29 | ||
30 | /usr/bin/urxvt -e ../src/fenrir -d -s ./xterm.conf -o "general.shell=./waitForKey2;remote#socketFile=/tmp/fenrirscreenreader-waitForKey2.sock" | |
31 | ||
32 |
0 | #!/bin/bash | |
1 | echo "1" | |
2 | echo "Press 'q' to exit" | |
3 | count=0 | |
4 | while : ; do | |
5 | read -n 1 k <&1 | |
6 | if [[ $k = q ]] ; then | |
7 | printf "\nQuitting from the program\n" | |
8 | break | |
9 | else | |
10 | ((count=$count+1)) | |
11 | echo "Press 'q' to exit" | |
12 | fi | |
13 | done |
0 | #!/bin/bash | |
1 | echo "2" | |
2 | echo "Press 'q' to exit" | |
3 | count=0 | |
4 | while : ; do | |
5 | read -n 1 k <&1 | |
6 | if [[ $k = q ]] ; then | |
7 | printf "\nQuitting from the program\n" | |
8 | break | |
9 | else | |
10 | ((count=$count+1)) | |
11 | echo "Press 'q' to exit" | |
12 | fi | |
13 | done |
0 | [sound] | |
1 | enabled=True | |
2 | driver=genericDriver | |
3 | theme=default | |
4 | volume=1.0 | |
5 | # shell commands for generic sound driver | |
6 | genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile | |
7 | genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence | |
8 | ||
9 | [speech] | |
10 | enabled=True | |
11 | driver=speechdDriver | |
12 | #driver=genericDriver | |
13 | serverPath= | |
14 | rate=0.85 | |
15 | pitch=0.5 | |
16 | # Pitch for capital letters | |
17 | capitalPitch=0.9 | |
18 | #module=espeak | |
19 | voice=bdl | |
20 | #language=en | |
21 | volume=1.0 | |
22 | autoReadIncoming=True | |
23 | ||
24 | # genericSpeechCommand is the command that is executed for talking | |
25 | # the following variables are replaced with values | |
26 | # fenrirText = is the text that should be spoken | |
27 | # fenrirModule = may be the speech module like used in speech-dispatcher, not every TTY need this | |
28 | # fenrirLanguage = the language | |
29 | # fenrirVoice = is the current voice that should be used | |
30 | # the current volume, pitch and rate is calculated like this | |
31 | # value = min + settingValue * (min - max ) | |
32 | # fenrirVolume = is replaced with the current volume | |
33 | # fenrirPitch = is replaced with the current pitch | |
34 | # fenrirRate = is replaced with the current speed (speech rate) | |
35 | genericSpeechCommand=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText" | |
36 | ||
37 | # these are the min and max values of the TTS system that is used in genericSpeechCommand | |
38 | fenrirMinVolume=0 | |
39 | fenrirMaxVolume=200 | |
40 | fenrirMinPitch=0 | |
41 | fenrirMaxPitch=99 | |
42 | fenrirMinRate=80 | |
43 | fenrirMaxRate=890 | |
44 | ||
45 | [braille] | |
46 | enabled=True | |
47 | driver=dummyDriver | |
48 | #layout=en | |
49 | # to what should the flush timeout relate to | |
50 | # word = flush after (number of words to display) * seconds | |
51 | # char = flush after (number of chars to display) * seconds | |
52 | # fix = flush after X seconds | |
53 | # none = no automatic flush (manual via shortcut) | |
54 | flushMode=word | |
55 | # seconds to flush or | |
56 | # -1 = no automatic flush (manual via shortcut) | |
57 | flushTimeout=3 | |
58 | # how should the cursor be focused? | |
59 | # page = if cursor cross the border move to next page and start at beginn | |
60 | # fixCell = ajust the cursor on an special cell where it is always placed. the display scroll here more smooth. | |
61 | cursorFocusMode=page | |
62 | # define the cell on the Braille device where fenrir should scroll and keep the cursor | |
63 | # 0 = first cell on device | |
64 | # -1 = last cell on device | |
65 | # >0 = fix cell number | |
66 | fixCursorOnCell=-1 | |
67 | #How should the braille follow the focus | |
68 | # none = no automatic toggle command used | |
69 | # review = priority to review | |
70 | # last = follow last used cursor | |
71 | cursorFollowMode=last | |
72 | # number of cells in panning (horizontal) | |
73 | # 0 = display size, >0 number of cells | |
74 | panSizeHorizontal=0 | |
75 | ||
76 | [screen] | |
77 | driver=ptyDriver | |
78 | encoding=auto | |
79 | screenUpdateDelay=0.05 | |
80 | suspendingScreen=1 | |
81 | autodetectSuspendingScreen=False | |
82 | ||
83 | [keyboard] | |
84 | driver=evdevDriver | |
85 | # filter input devices NOMICE, ALL or a DEVICE NAME | |
86 | device=ALL | |
87 | grabDevices=True | |
88 | ignoreShortcuts=False | |
89 | keyboardLayout=desktop | |
90 | charEcho=False | |
91 | charDeleteEcho=True | |
92 | wordEcho=False | |
93 | interruptOnKeyPress=True | |
94 | # you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys) | |
95 | interruptOnKeyPressFilter= | |
96 | # timeout for double tap in sec | |
97 | doubleTapTimeout=0.2 | |
98 | ||
99 | [general] | |
100 | debugLevel=1 | |
101 | # debugMode sets where the debug output should send to: | |
102 | # debugMode=File writes to debugFile (Default: /var/log/fenrirscreenreader/fenrir.log) | |
103 | # debugMode=Print just prints on the screen | |
104 | debugMode=File | |
105 | debugFile= | |
106 | punctuationProfile=default | |
107 | punctuationLevel=some | |
108 | respectPunctuationPause=True | |
109 | newLinePause=True | |
110 | numberOfClipboards=10 | |
111 | # used path for "export_clipboard_to_file" | |
112 | # $user is replaced by username | |
113 | clipboardExportPath=/tmp/fenrirClipboard | |
114 | emoticons=True | |
115 | fenrirKeys=KEY_KP0,KEY_CAPSLOCK | |
116 | scriptKeys=KEY_META,KEY_COMPOSE | |
117 | timeFormat=%H:%M:%P | |
118 | dateFormat="%A, %B %d, %Y" | |
119 | autoSpellCheck=True | |
120 | spellCheckLanguage=en_US | |
121 | scriptPath=/usr/share/fenrirscreenreader/scripts | |
122 | # overload commands, and create new one without changing Fenrir default | |
123 | commandPath= | |
124 | #fenrirBGColor = the backgroundcolor | |
125 | #fenrirFGColor = the foregroundcolor | |
126 | #fenrirUnderline = speak the underline attribute | |
127 | #fenrirBold = speak the bold attribute | |
128 | #fenrirBlink = speak the blink attribute | |
129 | #fenrirFont = the font | |
130 | #fenrirFontSize = the fontsize | |
131 | attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize | |
132 | autoPresentIndent=False | |
133 | # play a sound when attributes are changeing | |
134 | hasAttributes=False | |
135 | # shell for PTY emulatiun (empty = default shell) | |
136 | shell= | |
137 | ||
138 | [focus] | |
139 | #follow the text cursor | |
140 | cursor=True | |
141 | #follow highlighted text changes | |
142 | highlight=False | |
143 | ||
144 | [remote] | |
145 | enable=True | |
146 | # connection type | |
147 | # unix = unix sockets | |
148 | # tcp = tcp (localhost only) | |
149 | method=unix | |
150 | # tcp port | |
151 | port=22447 | |
152 | # socket filepath | |
153 | socketpath=/tmp/ | |
154 | # allow settings to overwrite | |
155 | enableSettingsRemote=True | |
156 | # allow commands to be executed | |
157 | enableCommandRemote=True | |
158 | ||
159 | [barrier] | |
160 | enabled=True | |
161 | leftBarriers=│└┌─ | |
162 | rightBarriers=│┘┐─ | |
163 | ||
164 | [review] | |
165 | lineBreak=True | |
166 | endOfScreen=True | |
167 | # leave the review when pressing a key | |
168 | leaveReviewOnCursorChange=True | |
169 | # leave the review when changing the screen | |
170 | leaveReviewOnScreenChange=True | |
171 | ||
172 | [promote] | |
173 | enabled=True | |
174 | inactiveTimeoutSec=120 | |
175 | list= | |
176 | ||
177 | [time] | |
178 | # automatic time anouncement | |
179 | enabled=False | |
180 | # present time | |
181 | presentTime=True | |
182 | # present date (on change) | |
183 | presentDate=True | |
184 | # present time after x seconds | |
185 | delaySec=0 | |
186 | # present time after to given minutes example every 15 minutes: 00,15,30,45 | |
187 | # if delaySec is >0 onMinutes is ignored | |
188 | onMinutes=00,30 | |
189 | # announce via soundicon | |
190 | announce=True | |
191 | # interrupt current speech for time announcement | |
192 | interrupt=False |
0 | !!!! ATTENTION !!!! | |
1 | the speech-dispatcher driver was reworked. the language and voice was swapped. | |
2 | this needs some reconfiguration in your settings.conf | |
3 | what you have as speech language= needs now to be set to voice= | |
4 | !!!! ATTENTION !!!! | |
5 | ||
6 | 1. vMenu | |
7 | - it allows to define macros in an menu like structure | |
8 | - allows us to create a settings menu | |
9 | 2. first letter navigation in vMenu | |
10 | 3. quit command for remote manager for exiting fenrir | |
11 | 4. "vmenu" command for remote manager for lock an vmenu | |
12 | 5. "resetvmenu" command for remote manager for release complete vmenu | |
13 | 6. NVDA compatible keyboard layouts | |
14 | 7. fixes to speech-dispatcher driver | |
15 | 8. quickMenu | |
16 | ||
17 | Bugfixes and Cleanups | |
18 |
0 | 1. PTY screen driver (leaves experimental state, stable now) | |
1 | - lot higher accuracy | |
2 | - works with "dialog" now | |
3 | - a lot of performance speedup | |
4 | - shortcuts are now recognieced more accurate | |
5 | 2. VCSA screen driver got support for UTF32 using /dev/vcsu (needs Linux >=4.19) | |
6 | 3. Tutorial mode now creates more userfriendly output of the shortcuts | |
7 | 4. faster word echo | |
8 | 5. improved dynamic grab/ ungrab of devices | |
9 | 6. custom dicts and emojis can now use regex when prefix with regex; | |
10 | Bugfixes and Cleanups | |
11 |
0 | evdev>=1.1.2 | |
1 | daemonize>=2.5.0 | |
2 | dbus-python>=1.2.8 | |
3 | pyudev>=0.21.0 | |
4 | pexpect | |
5 | pyttsx3 | |
6 | pyte>=0.7.0 |
5 | 5 | from setuptools import find_packages |
6 | 6 | from setuptools import setup |
7 | 7 | |
8 | fenrirVersion = '1.9.3' | |
8 | fenrirVersion = '1.9.7' | |
9 | 9 | packageVersion = 'post1' |
10 | 10 | |
11 | # handle flags for package manager like yaourt and pacaur. | |
11 | # handle flags for package manager like aurman and pacaur. | |
12 | 12 | forceSettings = False |
13 | 13 | if "--force-settings" in sys.argv: |
14 | 14 | forceSettings = True |
17 | 17 | data_files = [] |
18 | 18 | directories = glob.glob('config/*') |
19 | 19 | for directory in directories: |
20 | files = glob.glob(directory+'/*') | |
20 | files = glob.glob(directory+'/*') | |
21 | 21 | destDir = '' |
22 | 22 | if 'config/punctuation' in directory : |
23 | 23 | destDir = '/etc/fenrirscreenreader/punctuation' |
31 | 31 | except: |
32 | 32 | pass |
33 | 33 | elif 'config/scripts' in directory: |
34 | destDir = '/usr/share/fenrirscreenreader/scripts' | |
34 | destDir = '/usr/share/fenrirscreenreader/scripts' | |
35 | 35 | if destDir != '': |
36 | 36 | data_files.append((destDir, files)) |
37 | 37 | |
38 | files = glob.glob('config/sound/default/*') | |
39 | destDir = '/usr/share/sounds/fenrirscreenreader/default' | |
38 | files = glob.glob('config/sound/default/*') | |
39 | destDir = '/usr/share/sounds/fenrirscreenreader/default' | |
40 | 40 | data_files.append((destDir, files)) |
41 | files = glob.glob('config/sound//template/*') | |
41 | files = glob.glob('config/sound//template/*') | |
42 | 42 | destDir = '/usr/share/sounds/fenrirscreenreader/template' |
43 | 43 | data_files.append((destDir, files)) |
44 | 44 | files = glob.glob('tools/*') |
56 | 56 | # description |
57 | 57 | description="A TTY Screen Reader for Linux.", |
58 | 58 | long_description=read('README.md'), |
59 | keywords=['screenreader', 'a11y', 'accessibility', 'terminal', 'TTY', 'console'], | |
59 | keywords=['screenreader', 'a11y', 'accessibility', 'terminal', 'TTY', 'console'], | |
60 | 60 | license="License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", |
61 | 61 | url="https://github.com/chrys87/fenrir/", |
62 | 62 | download_url = 'https://github.com/chrys87/fenrir/archive/' + fenrirVersion + '.tar.gz', |
63 | 63 | classifiers=[ |
64 | "Programming Language :: Python", | |
65 | "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", | |
64 | "Programming Language :: Python", | |
65 | "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", | |
66 | 66 | "Development Status :: 5 - Production/Stable", |
67 | 67 | "Topic :: Multimedia :: Sound/Audio :: Speech", |
68 | "Environment :: Console", | |
68 | "Environment :: Console", | |
69 | 69 | ], |
70 | ||
70 | ||
71 | 71 | # Application author details: |
72 | 72 | author="Chrys, Storm_dragon, Jeremiah and others", |
73 | 73 | author_email="chrysg@linux-a11y.org", |
82 | 82 | zip_safe=False, |
83 | 83 | |
84 | 84 | data_files=data_files, |
85 | ||
85 | ||
86 | 86 | # Dependent packages (distributions) |
87 | 87 | install_requires=[ |
88 | "evdev", | |
89 | "daemonize", | |
90 | "dbus-python", | |
91 | "pyudev", | |
88 | "evdev>=1.1.2", | |
89 | "daemonize>=2.5.0", | |
90 | "dbus-python>=1.2.8", | |
91 | "pyudev>=0.21.0", | |
92 | 92 | "setuptools", |
93 | 93 | "pexpect", |
94 | 94 | "pyttsx3", |
95 | "pyte", | |
95 | "pyte>=0.7.0", | |
96 | 96 | ], |
97 | ||
97 | ||
98 | 98 | ) |
99 | 99 | |
100 | 100 | if not forceSettings: |
15 | 15 | self.env = environment |
16 | 16 | try: |
17 | 17 | import brlapi |
18 | self._brl = brlapi.Connection() | |
19 | self._deviceSize = self._brl.displaySize | |
18 | self._brl = brlapi.Connection() | |
19 | self._deviceSize = self._brl.displaySize | |
20 | 20 | except Exception as e: |
21 | 21 | print(e) |
22 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
22 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
23 | 23 | return |
24 | 24 | self._isInitialized = True |
25 | 25 |
43 | 43 | |
44 | 44 | def shutdown(self): |
45 | 45 | if self._isInitialized: |
46 | self.leveScreen() | |
47 | self._isInitialized = False | |
46 | self.leveScreen() | |
47 | self._isInitialized = False | |
48 | 48 | print('Braille Debug Driver: Shutdown') |
30 | 30 | |
31 | 31 | def run(self): |
32 | 32 | if not initialized: |
33 | self.env['runtime']['outputManager'].presentText(_('pyenchant is not installed'), interrupt=True) | |
34 | 33 | return |
35 | 34 | if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language: |
36 | 35 | try: |
18 | 18 | |
19 | 19 | def run(self): |
20 | 20 | lastEcho = self.env['runtime']['outputManager'].getLastEcho() |
21 | if lastEcho.rstrip() != "": | |
22 | lastEcho = lastEcho.rstrip() | |
21 | 23 | self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', lastEcho) |
22 | 24 | self.env['runtime']['outputManager'].presentText(lastEcho, soundIcon='CopyToClipboard', interrupt=True) |
23 | 25 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get current quick menu entry') | |
17 | def run(self): | |
18 | menu = '' | |
19 | value = '' | |
20 | menu = self.env['runtime']['quickMenuManager'].getCurrentEntry() | |
21 | if menu != '': | |
22 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
23 | self.env['runtime']['outputManager'].presentText(menu + ' ' + value, interrupt=True) | |
24 | def setCallback(self, callback): | |
25 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get current quick menu value') | |
17 | def run(self): | |
18 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
19 | self.env['runtime']['outputManager'].presentText(value, interrupt=True) | |
20 | def setCallback(self, callback): | |
21 | pass |
19 | 19 | # Prefer review cursor over text cursor |
20 | 20 | cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() |
21 | 21 | |
22 | self.env['runtime']['outputManager'].presentText(_("line {0}, column {1}").format(cursorPos['y']+1, cursorPos['x']+1), interrupt=True) | |
22 | self.env['runtime']['outputManager'].presentText(_("line {0}, column {1}, Terminal {2}").format(cursorPos['y']+1, cursorPos['x']+1, self.env['screen']['newTTY']), interrupt=True) | |
23 | 23 | |
24 | 24 | def setCallback(self, callback): |
25 | 25 | pass |
27 | 27 | return |
28 | 28 | clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory') |
29 | 29 | for display in range(10): |
30 | p = Popen('su ' + self.env['general']['currUser'] + ' -c "echo -n \\\"' + clipboard.replace('"','\\\\\\"') +'\\\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True) | |
30 | p = Popen('su ' + self.env['general']['currUser'] + ' -c "cat << \\\"EOF\\\" | xclip -d :' + str(display) + ' -selection clipboard\n' + clipboard + '\nEOF\n"', stdout=PIPE, stderr=PIPE, shell=True) | |
31 | 31 | stdout, stderr = p.communicate() |
32 | 32 | self.env['runtime']['outputManager'].interruptOutput() |
33 | 33 | #screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding') |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get next quick menu entry') | |
17 | def run(self): | |
18 | menu = '' | |
19 | value = '' | |
20 | if self.env['runtime']['quickMenuManager'].nextEntry(): | |
21 | menu = self.env['runtime']['quickMenuManager'].getCurrentEntry() | |
22 | if menu != '': | |
23 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
24 | self.env['runtime']['outputManager'].presentText(menu + ' ' + value, interrupt=True) | |
25 | else: | |
26 | self.env['runtime']['outputManager'].presentText(_('Quick menu not available'), interrupt=True) | |
27 | def setCallback(self, callback): | |
28 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get next quick menu value') | |
17 | def run(self): | |
18 | if self.env['runtime']['quickMenuManager'].nextValue(): | |
19 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
20 | self.env['runtime']['outputManager'].presentText(value, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get previous quick menu entry') | |
17 | def run(self): | |
18 | menu = '' | |
19 | value = '' | |
20 | if self.env['runtime']['quickMenuManager'].prevEntry(): | |
21 | menu = self.env['runtime']['quickMenuManager'].getCurrentEntry() | |
22 | if menu != '': | |
23 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
24 | self.env['runtime']['outputManager'].presentText(menu + ' ' + value, interrupt=True) | |
25 | else: | |
26 | self.env['runtime']['outputManager'].presentText(_('Quick menu not available'), interrupt=True) | |
27 | def setCallback(self, callback): | |
28 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get previous quick menu value') | |
17 | def run(self): | |
18 | if self.env['runtime']['quickMenuManager'].prevValue(): | |
19 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
20 | self.env['runtime']['outputManager'].presentText(value, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.core import settingsManager | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('Saves your current Fenrir settings so they are the default.') | |
18 | def run(self): | |
19 | settingsFile = self.env['runtime']['settingsManager'].getSettingsFile() | |
20 | self.env['runtime']['settingsManager'].saveSettings(settingsFile) | |
21 | self.env['runtime']['outputManager'].presentText(_("Settings saved."), interrupt=True) | |
22 | def setCallback(self, callback): | |
23 | pass |
16 | 16 | return _('disables speech until next keypress') |
17 | 17 | |
18 | 18 | def run(self): |
19 | if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'): | |
20 | self.env['runtime']['outputManager'].presentText(_("speech temporary disabled"), soundIcon='SpeechOff', interrupt=True) | |
21 | self.env['commandBuffer']['enableSpeechOnKeypress'] = True | |
22 | self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'))) | |
23 | self.env['runtime']['outputManager'].interruptOutput() | |
19 | self.env['runtime']['outputManager'].tempDisableSpeech() | |
24 | 20 | |
25 | 21 | def setCallback(self, callback): |
26 | 22 | pass |
17 | 17 | |
18 | 18 | def run(self): |
19 | 19 | if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'): |
20 | self.env['runtime']['outputManager'].interruptOutput() | |
20 | 21 | self.env['runtime']['outputManager'].presentText(_('speech disabled'), soundIcon='SpeechOff', interrupt=True) |
21 | 22 | self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'))) |
22 | 23 | if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'): |
13 | 13 | def shutdown(self): |
14 | 14 | pass |
15 | 15 | def getDescription(self): |
16 | self.env['runtime']['helpManager'].toggleTutorialMode() | |
17 | #self.env['runtime']['outputManager'].presentText(, interrupt=True) | |
16 | self.env['runtime']['helpManager'].toggleTutorialMode() | |
18 | 17 | return _('Exiting tutorial mode. To enter tutorial mode again press Fenrir+f1') |
19 | 18 | def run(self): |
20 | self.env['runtime']['helpManager'].toggleTutorialMode() | |
21 | self.env['runtime']['outputManager'].presentText( _('Entering tutorial mode. In this mode commands are described but not executed. You can move through the list of commands with the up and down arrow keys. To Exit tutorial mode press Fenrir+f1.'), interrupt=True) | |
19 | self.env['runtime']['helpManager'].toggleTutorialMode() | |
20 | if self.env['runtime']['helpManager'].isTutorialMode(): | |
21 | self.env['runtime']['outputManager'].presentText( _('Entering tutorial mode. In this mode commands are described but not executed. You can move through the list of commands with the up and down arrow keys. To Exit tutorial mode press Fenrir+f1.'), interrupt=True) | |
22 | 22 | def setCallback(self, callback): |
23 | 23 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | self.env['runtime']['vmenuManager'].togglelVMenuMode() | |
17 | return _('Entering or Leaving v menu mode.') | |
18 | def run(self): | |
19 | self.env['runtime']['vmenuManager'].togglelVMenuMode() | |
20 | if self.env['runtime']['vmenuManager'].getActive(): | |
21 | self.env['runtime']['outputManager'].presentText( _('Entering v menu.'), interrupt=True) | |
22 | else: | |
23 | self.env['runtime']['outputManager'].presentText( _('Leaving v menu.'), interrupt=True) | |
24 | def setCallback(self, callback): | |
25 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | # enabled? | |
20 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'): | |
21 | return | |
22 | # big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now) | |
23 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) | |
24 | if xMove > 3: | |
25 | return | |
26 | if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: | |
27 | if self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]: | |
28 | return | |
29 | elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: | |
30 | if self.env['runtime']['byteManager'].getLastByteKey() in [b' ', b'\t']: | |
31 | return | |
32 | # detect deletion or chilling | |
33 | if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: | |
34 | return | |
35 | # is there any change? | |
36 | if not self.env['runtime']['screenManager'].isDelta(): | |
37 | return | |
38 | # filter unneded space on word begin | |
39 | currDelta = self.env['screen']['newDelta'] | |
40 | if len(currDelta.strip()) != len(currDelta) and \ | |
41 | currDelta.strip() != '': | |
42 | currDelta = currDelta.strip() | |
43 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
44 | ||
45 | def setCallback(self, callback): | |
46 | pass | |
47 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is it enabled? | |
22 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'): | |
23 | return | |
24 | # is naviation? | |
25 | if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1: | |
26 | return | |
27 | # just when cursor move worddetection is needed | |
28 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
29 | return | |
30 | # for now no new line | |
31 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | # currently writing | |
34 | if self.env['runtime']['screenManager'].isDelta(): | |
35 | return | |
36 | ||
37 | # get the word | |
38 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
39 | x, y, currWord, endOfScreen, lineBreak = \ | |
40 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
41 | ||
42 | # is there a word? | |
43 | if currWord == '': | |
44 | return | |
45 | # at the end of a word | |
46 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
47 | return | |
48 | # at the end of a word | |
49 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
50 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
51 | return | |
52 | ||
53 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
54 | ||
55 | def setCallback(self, callback): | |
56 | pass | |
57 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import os, string | |
9 | ||
10 | initialized = False | |
11 | try: | |
12 | import enchant | |
13 | initialized = True | |
14 | except: | |
15 | pass | |
16 | ||
17 | class command(): | |
18 | def __init__(self): | |
19 | self.language = '' | |
20 | self.spellChecker = '' | |
21 | def initialize(self, environment): | |
22 | self.env = environment | |
23 | self.updateSpellLanguage() | |
24 | def shutdown(self): | |
25 | pass | |
26 | def getDescription(self): | |
27 | return 'No Description found' | |
28 | ||
29 | def updateSpellLanguage(self): | |
30 | if not initialized: | |
31 | return | |
32 | self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')) | |
33 | self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') | |
34 | ||
35 | def run(self): | |
36 | if not initialized: | |
37 | return | |
38 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'): | |
39 | return | |
40 | if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language: | |
41 | try: | |
42 | self.updateSpellLanguage() | |
43 | except: | |
44 | return | |
45 | ||
46 | # just when horizontal cursor move worddetection is needed | |
47 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
48 | return | |
49 | ||
50 | # for now no new line | |
51 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
52 | return | |
53 | # more than a keyecho? | |
54 | if len(self.env['screen']['newDelta']) > 1: | |
55 | return | |
56 | # deletion | |
57 | if self.env['runtime']['screenManager'].isNegativeDelta(): | |
58 | return | |
59 | # first place could not be the end of a word | |
60 | if self.env['screen']['newCursor']['x'] == 0: | |
61 | return | |
62 | ||
63 | # get the word (just for speedup only look at current line | |
64 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
65 | x, y, currWord, endOfScreen, lineBreak = word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
66 | # was this a typed word? | |
67 | if self.env['runtime']['screenManager'].isDelta(): | |
68 | if not(newContent[self.env['screen']['oldCursor']['x']] in string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~' and x != self.env['screen']['oldCursor']['x']): | |
69 | return | |
70 | else: | |
71 | currWord = currWord.strip(string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~') | |
72 | else: | |
73 | # or just arrow arround? | |
74 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
75 | return | |
76 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
77 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
78 | return | |
79 | ||
80 | # just on end of word | |
81 | if self.env['screen']['newCursor']['x'] > 0: | |
82 | if not newContent[self.env['screen']['oldCursor']['x'] - 1].lower() in string.ascii_lowercase: | |
83 | return | |
84 | ||
85 | # ignore bash buildins | |
86 | if currWord in ['cd','fg','bg','alias','bind','dir','caller','buildin','command','declare','echo','enable','help','let','local','logout',\ | |
87 | 'mapfile','printf','read','readarray','source','type','typeset','ulimit','unalias']: | |
88 | return | |
89 | # ignore the application name | |
90 | if currWord.upper() == 'FENRIR': | |
91 | return | |
92 | if currWord[0] =='-': | |
93 | return | |
94 | if currWord[0] == '/': | |
95 | return | |
96 | if currWord[0] == '#': | |
97 | return | |
98 | if currWord.startswith('./'): | |
99 | return | |
100 | if '@' in currWord and '.' in currWord: | |
101 | return | |
102 | if currWord[0] == '@': | |
103 | return | |
104 | if currWord.isnumeric(): | |
105 | return | |
106 | if currWord.isdecimal(): | |
107 | return | |
108 | if currWord.isspace(): | |
109 | return | |
110 | ||
111 | try: | |
112 | if os.path.exists("/bin/"+currWord): | |
113 | return | |
114 | except: | |
115 | pass | |
116 | try: | |
117 | if os.path.exists("/usr/bin/"+currWord): | |
118 | return | |
119 | except: | |
120 | pass | |
121 | try: | |
122 | if os.path.exists("/sbin/"+currWord): | |
123 | return | |
124 | except: | |
125 | pass | |
126 | ||
127 | if not self.spellChecker.check(currWord): | |
128 | self.env['runtime']['outputManager'].presentText(_('misspelled'), soundIcon='mispell', interrupt=False, flush=False) | |
129 | ||
130 | def setCallback(self, callback): | |
131 | pass | |
132 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'): | |
20 | return | |
21 | # detect typing or chilling | |
22 | if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']: | |
23 | return | |
24 | ||
25 | # More than just a deletion happend | |
26 | if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True): | |
27 | return | |
28 | ||
29 | # no deletion | |
30 | if not self.env['runtime']['screenManager'].isNegativeDelta(): | |
31 | return | |
32 | ||
33 | # too much for a single backspace... | |
34 | # word begin produce a diff wiht len == 2 |a | others with 1 |a| | |
35 | if len(self.env['screen']['newNegativeDelta']) > 2: | |
36 | return | |
37 | ||
38 | currNegativeDelta = self.env['screen']['newNegativeDelta'] | |
39 | if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \ | |
40 | currNegativeDelta.strip() != '': | |
41 | currNegativeDelta = currNegativeDelta.strip() | |
42 | self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
43 | def setCallback(self, callback): | |
44 | pass | |
45 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | # big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now) | |
20 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) | |
21 | if xMove > 1: | |
22 | return | |
23 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'): | |
24 | return | |
25 | # detect deletion or chilling | |
26 | if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: | |
27 | return | |
28 | # is there any change? | |
29 | if not self.env['runtime']['screenManager'].isDelta(): | |
30 | return | |
31 | ||
32 | # filter unneded space on word begin | |
33 | currDelta = self.env['screen']['newDelta'] | |
34 | if len(currDelta.strip()) != len(currDelta) and \ | |
35 | currDelta.strip() != '': | |
36 | currDelta = currDelta.strip() | |
37 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
38 | ||
39 | def setCallback(self, callback): | |
40 | pass | |
41 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | # try to detect the tab completion by cursor change | |
20 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) | |
21 | if xMove == 1: | |
22 | return | |
23 | # is there any change? | |
24 | if not self.env['runtime']['screenManager'].isDelta(): | |
25 | return | |
26 | if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])): | |
27 | return | |
28 | # detect deletion or chilling | |
29 | if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: | |
30 | return | |
31 | ||
32 | # filter unneded space on word begin | |
33 | currDelta = self.env['screen']['newDelta'] | |
34 | if len(currDelta.strip()) != len(currDelta) and \ | |
35 | currDelta.strip() != '': | |
36 | currDelta = currDelta.strip() | |
37 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False) | |
38 | ||
39 | def setCallback(self, callback): | |
40 | pass | |
41 |
+0
-59
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import line_utils | |
8 | from fenrirscreenreader.utils import word_utils | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | self.lastIdent = -1 | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return '' | |
19 | ||
20 | def run(self): | |
21 | if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'): | |
22 | return | |
23 | if self.env['runtime']['screenManager'].isScreenChange(): | |
24 | self.lastIdent = 0 | |
25 | return | |
26 | # this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack | |
27 | if self.env['runtime']['screenManager'].isDelta(): | |
28 | return | |
29 | ||
30 | # is a vertical change? | |
31 | if not self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | ||
34 | x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) | |
35 | if currLine.isspace(): | |
36 | self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False) | |
37 | else: | |
38 | # ident | |
39 | currIdent = len(currLine) - len(currLine.lstrip()) | |
40 | if self.lastIdent == -1: | |
41 | self.lastIdent = currIdent | |
42 | doInterrupt = True | |
43 | if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'): | |
44 | if self.lastIdent != currIdent: | |
45 | self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False) | |
46 | doInterrupt = False | |
47 | # barrier | |
48 | sayLine = currLine | |
49 | if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'): | |
50 | isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y']) | |
51 | if isBarrier: | |
52 | sayLine = barrierLine | |
53 | # output | |
54 | self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False) | |
55 | self.lastIdent = currIdent | |
56 | def setCallback(self, callback): | |
57 | pass | |
58 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | def run(self): | |
18 | # try to detect the tab completion by cursor change | |
19 | xMove = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] | |
20 | if xMove <= 0: | |
21 | return | |
22 | if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: | |
23 | if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]): | |
24 | if xMove < 5: | |
25 | return | |
26 | elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: | |
27 | found = False | |
28 | for currByte in self.env['runtime']['byteManager'].getLastByteKey(): | |
29 | if currByte == 9: | |
30 | found = True | |
31 | if not found: | |
32 | if xMove < 5: | |
33 | return | |
34 | # is there any change? | |
35 | if not self.env['runtime']['screenManager'].isDelta(): | |
36 | return | |
37 | if not xMove == len(self.env['screen']['newDelta']): | |
38 | return | |
39 | # filter unneded space on word begin | |
40 | currDelta = self.env['screen']['newDelta'] | |
41 | if len(currDelta.strip()) != len(currDelta) and \ | |
42 | currDelta.strip() != '': | |
43 | currDelta = currDelta.strip() | |
44 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False) | |
45 | ||
46 | def setCallback(self, callback): | |
47 | pass | |
48 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is navigation? | |
22 | if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1: | |
23 | return | |
24 | ||
25 | # just when cursor move worddetection is needed | |
26 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
27 | return | |
28 | # for now no new line | |
29 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
30 | return | |
31 | # currently writing | |
32 | if self.env['runtime']['screenManager'].isDelta(): | |
33 | return | |
34 | ||
35 | # get the word | |
36 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
37 | x, y, currWord, endOfScreen, lineBreak = \ | |
38 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
39 | ||
40 | # is there a word? | |
41 | if currWord == '': | |
42 | return | |
43 | ||
44 | # at the start of a word | |
45 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
46 | (self.env['screen']['newCursor']['x'] != x): | |
47 | return | |
48 | ||
49 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
50 | ||
51 | def setCallback(self, callback): | |
52 | pass | |
53 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is it enabled? | |
22 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'): | |
23 | return | |
24 | # is naviation? | |
25 | if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1: | |
26 | return | |
27 | # just when cursor move worddetection is needed | |
28 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
29 | return | |
30 | # for now no new line | |
31 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | # currently writing | |
34 | if self.env['runtime']['screenManager'].isDelta(): | |
35 | return | |
36 | ||
37 | # get the word | |
38 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
39 | x, y, currWord, endOfScreen, lineBreak = \ | |
40 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
41 | ||
42 | # is there a word? | |
43 | if currWord == '': | |
44 | return | |
45 | # at the end of a word | |
46 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
47 | return | |
48 | # at the end of a word | |
49 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
50 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
51 | return | |
52 | ||
53 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
54 | ||
55 | def setCallback(self, callback): | |
56 | pass | |
57 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is navigation? | |
22 | if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1: | |
23 | return | |
24 | ||
25 | # just when cursor move worddetection is needed | |
26 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
27 | return | |
28 | # for now no new line | |
29 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
30 | return | |
31 | # currently writing | |
32 | if self.env['runtime']['screenManager'].isDelta(): | |
33 | return | |
34 | ||
35 | # get the word | |
36 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
37 | x, y, currWord, endOfScreen, lineBreak = \ | |
38 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
39 | ||
40 | # is there a word? | |
41 | if currWord == '': | |
42 | return | |
43 | ||
44 | # at the start of a word | |
45 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
46 | (self.env['screen']['newCursor']['x'] != x): | |
47 | return | |
48 | ||
49 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
50 | ||
51 | def setCallback(self, callback): | |
52 | pass | |
53 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import os, string | |
9 | ||
10 | initialized = False | |
11 | try: | |
12 | import enchant | |
13 | initialized = True | |
14 | except: | |
15 | pass | |
16 | ||
17 | class command(): | |
18 | def __init__(self): | |
19 | self.language = '' | |
20 | self.spellChecker = '' | |
21 | def initialize(self, environment): | |
22 | self.env = environment | |
23 | self.updateSpellLanguage() | |
24 | def shutdown(self): | |
25 | pass | |
26 | def getDescription(self): | |
27 | return 'No Description found' | |
28 | ||
29 | def updateSpellLanguage(self): | |
30 | if not initialized: | |
31 | self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True) | |
32 | return | |
33 | self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')) | |
34 | self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') | |
35 | ||
36 | def run(self): | |
37 | if not initialized: | |
38 | return | |
39 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'): | |
40 | return | |
41 | if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language: | |
42 | try: | |
43 | self.updateSpellLanguage() | |
44 | except: | |
45 | return | |
46 | ||
47 | # just when horizontal cursor move worddetection is needed | |
48 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
49 | return | |
50 | ||
51 | # for now no new line | |
52 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
53 | return | |
54 | # more than a keyecho? | |
55 | if len(self.env['screen']['newDelta']) > 1: | |
56 | return | |
57 | # deletion | |
58 | if self.env['runtime']['screenManager'].isNegativeDelta(): | |
59 | return | |
60 | # first place could not be the end of a word | |
61 | if self.env['screen']['newCursor']['x'] == 0: | |
62 | return | |
63 | ||
64 | # get the word (just for speedup only look at current line | |
65 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
66 | x, y, currWord, endOfScreen, lineBreak = word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
67 | # was this a typed word? | |
68 | if self.env['runtime']['screenManager'].isDelta(): | |
69 | if not(newContent[self.env['screen']['oldCursor']['x']] in string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~' and x != self.env['screen']['oldCursor']['x']): | |
70 | return | |
71 | else: | |
72 | currWord = currWord.strip(string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~') | |
73 | else: | |
74 | # or just arrow arround? | |
75 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
76 | return | |
77 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
78 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
79 | return | |
80 | ||
81 | # just on end of word | |
82 | if self.env['screen']['newCursor']['x'] > 0: | |
83 | if not newContent[self.env['screen']['oldCursor']['x'] - 1].lower() in string.ascii_lowercase: | |
84 | return | |
85 | ||
86 | # ignore bash buildins | |
87 | if currWord in ['cd','fg','bg','alias','bind','dir','caller','buildin','command','declare','echo','enable','help','let','local','logout',\ | |
88 | 'mapfile','printf','read','readarray','source','type','typeset','ulimit','unalias']: | |
89 | return | |
90 | # ignore the application name | |
91 | if currWord.upper() == 'FENRIR': | |
92 | return | |
93 | if currWord[0] =='-': | |
94 | return | |
95 | if currWord[0] == '/': | |
96 | return | |
97 | if currWord[0] == '#': | |
98 | return | |
99 | if currWord.startswith('./'): | |
100 | return | |
101 | if '@' in currWord and '.' in currWord: | |
102 | return | |
103 | if currWord[0] == '@': | |
104 | return | |
105 | if currWord.isnumeric(): | |
106 | return | |
107 | if currWord.isdecimal(): | |
108 | return | |
109 | if currWord.isspace(): | |
110 | return | |
111 | ||
112 | try: | |
113 | if os.path.exists("/bin/"+currWord): | |
114 | return | |
115 | except: | |
116 | pass | |
117 | try: | |
118 | if os.path.exists("/usr/bin/"+currWord): | |
119 | return | |
120 | except: | |
121 | pass | |
122 | try: | |
123 | if os.path.exists("/sbin/"+currWord): | |
124 | return | |
125 | except: | |
126 | pass | |
127 | ||
128 | if not self.spellChecker.check(currWord): | |
129 | self.env['runtime']['outputManager'].presentText(_('misspelled'), soundIcon='mispell', interrupt=False, flush=False) | |
130 | ||
131 | def setCallback(self, callback): | |
132 | pass | |
133 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'): | |
20 | return | |
21 | # detect typing or chilling | |
22 | if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']: | |
23 | return | |
24 | ||
25 | # More than just a deletion happend | |
26 | if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True): | |
27 | return | |
28 | ||
29 | # no deletion | |
30 | if not self.env['runtime']['screenManager'].isNegativeDelta(): | |
31 | return | |
32 | ||
33 | # too much for a single backspace... | |
34 | # word begin produce a diff wiht len == 2 |a | others with 1 |a| | |
35 | if len(self.env['screen']['newNegativeDelta']) > 2: | |
36 | return | |
37 | ||
38 | currNegativeDelta = self.env['screen']['newNegativeDelta'] | |
39 | if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \ | |
40 | currNegativeDelta.strip() != '': | |
41 | currNegativeDelta = currNegativeDelta.strip() | |
42 | self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
43 | def setCallback(self, callback): | |
44 | pass | |
45 |
+59
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import line_utils | |
8 | from fenrirscreenreader.utils import word_utils | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | self.lastIdent = -1 | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return '' | |
19 | ||
20 | def run(self): | |
21 | if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'): | |
22 | return | |
23 | if self.env['runtime']['screenManager'].isScreenChange(): | |
24 | self.lastIdent = 0 | |
25 | return | |
26 | # this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack | |
27 | if self.env['runtime']['screenManager'].isDelta(): | |
28 | return | |
29 | ||
30 | # is a vertical change? | |
31 | if not self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | ||
34 | x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) | |
35 | if currLine.isspace(): | |
36 | self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False) | |
37 | else: | |
38 | # ident | |
39 | currIdent = len(currLine) - len(currLine.lstrip()) | |
40 | if self.lastIdent == -1: | |
41 | self.lastIdent = currIdent | |
42 | doInterrupt = True | |
43 | if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'): | |
44 | if self.lastIdent != currIdent: | |
45 | self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False) | |
46 | doInterrupt = False | |
47 | # barrier | |
48 | sayLine = currLine | |
49 | if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'): | |
50 | isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y']) | |
51 | if isBarrier: | |
52 | sayLine = barrierLine | |
53 | # output | |
54 | self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False) | |
55 | self.lastIdent = currIdent | |
56 | def setCallback(self, callback): | |
57 | pass | |
58 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('exits review mode') | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'): | |
20 | return | |
21 | if self.env['runtime']['cursorManager'].isReviewMode(): | |
22 | self.env['runtime']['cursorManager'].clearReviewCursor() | |
23 | ||
24 | def setCallback(self, callback): | |
25 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import screen_utils | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('Reads attributes of current cursor position') | |
18 | def run(self): | |
19 | # is it enabled? | |
20 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'): | |
21 | return | |
22 | # is a vertical change? | |
23 | if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\ | |
24 | self.env['runtime']['cursorManager'].isCursorHorizontalMove()): | |
25 | return | |
26 | ||
27 | cursorPos = self.env['screen']['newCursor'] | |
28 | ||
29 | if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos): | |
30 | return | |
31 | self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False) | |
32 | def setCallback(self, callback): | |
33 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import screen_utils | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('Reads attributes of current cursor position') | |
18 | def run(self): | |
19 | # is it enabled? | |
20 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'): | |
21 | return | |
22 | # is a vertical change? | |
23 | if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\ | |
24 | self.env['runtime']['cursorManager'].isCursorHorizontalMove()): | |
25 | return | |
26 | ||
27 | cursorPos = self.env['screen']['newCursor'] | |
28 | ||
29 | if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos): | |
30 | return | |
31 | self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False) | |
32 | def setCallback(self, callback): | |
33 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('exits review mode') | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'): | |
20 | return | |
21 | if self.env['runtime']['cursorManager'].isReviewMode(): | |
22 | self.env['runtime']['cursorManager'].clearReviewCursor() | |
23 | ||
24 | def setCallback(self, callback): | |
25 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | # big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now) | |
20 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) | |
21 | if xMove > 1: | |
22 | return | |
23 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'): | |
24 | return | |
25 | # detect deletion or chilling | |
26 | if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: | |
27 | return | |
28 | # is there any change? | |
29 | if not self.env['runtime']['screenManager'].isDelta(): | |
30 | return | |
31 | ||
32 | # filter unneded space on word begin | |
33 | currDelta = self.env['screen']['newDelta'] | |
34 | if len(currDelta.strip()) != len(currDelta) and \ | |
35 | currDelta.strip() != '': | |
36 | currDelta = currDelta.strip() | |
37 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
38 | ||
39 | def setCallback(self, callback): | |
40 | pass | |
41 |
+42
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | # try to detect the tab completion by cursor change | |
20 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) | |
21 | if xMove == 1: | |
22 | return | |
23 | # is there any change? | |
24 | if not self.env['runtime']['screenManager'].isDelta(): | |
25 | return | |
26 | if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])): | |
27 | return | |
28 | # detect deletion or chilling | |
29 | if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: | |
30 | return | |
31 | ||
32 | # filter unneded space on word begin | |
33 | currDelta = self.env['screen']['newDelta'] | |
34 | if len(currDelta.strip()) != len(currDelta) and \ | |
35 | currDelta.strip() != '': | |
36 | currDelta = currDelta.strip() | |
37 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False) | |
38 | ||
39 | def setCallback(self, callback): | |
40 | pass | |
41 |
+51
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import char_utils | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return '' | |
18 | ||
19 | def run(self): | |
20 | if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'): | |
21 | return | |
22 | if self.env['runtime']['screenManager'].isScreenChange(): | |
23 | return | |
24 | # detect an change on the screen, we just want to cursor arround, so no change should appear | |
25 | if self.env['runtime']['screenManager'].isDelta(): | |
26 | return | |
27 | if self.env['runtime']['screenManager'].isNegativeDelta(): | |
28 | return | |
29 | # is a vertical change? | |
30 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
31 | return | |
32 | # is it a horizontal change? | |
33 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
34 | return | |
35 | ||
36 | # echo word insteed of char | |
37 | if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'): | |
38 | if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1: | |
39 | # get the word | |
40 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
41 | x, y, currWord, endOfScreen, lineBreak = \ | |
42 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
43 | if self.env['screen']['newCursor']['x'] == x: | |
44 | return | |
45 | x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) | |
46 | if not currChar.isspace(): | |
47 | self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
48 | def setCallback(self, callback): | |
49 | pass | |
50 |
+59
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import line_utils | |
8 | from fenrirscreenreader.utils import word_utils | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | self.lastIdent = -1 | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return '' | |
19 | ||
20 | def run(self): | |
21 | if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'): | |
22 | return | |
23 | if self.env['runtime']['screenManager'].isScreenChange(): | |
24 | self.lastIdent = 0 | |
25 | return | |
26 | # this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack | |
27 | if self.env['runtime']['screenManager'].isDelta(): | |
28 | return | |
29 | ||
30 | # is a vertical change? | |
31 | if not self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | ||
34 | x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) | |
35 | if currLine.isspace(): | |
36 | self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False) | |
37 | else: | |
38 | # ident | |
39 | currIdent = len(currLine) - len(currLine.lstrip()) | |
40 | if self.lastIdent == -1: | |
41 | self.lastIdent = currIdent | |
42 | doInterrupt = True | |
43 | if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'): | |
44 | if self.lastIdent != currIdent: | |
45 | self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False) | |
46 | doInterrupt = False | |
47 | # barrier | |
48 | sayLine = currLine | |
49 | if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'): | |
50 | isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y']) | |
51 | if isBarrier: | |
52 | sayLine = barrierLine | |
53 | # output | |
54 | self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False) | |
55 | self.lastIdent = currIdent | |
56 | def setCallback(self, callback): | |
57 | pass | |
58 |
+58
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is it enabled? | |
22 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'): | |
23 | return | |
24 | # is naviation? | |
25 | if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1: | |
26 | return | |
27 | # just when cursor move worddetection is needed | |
28 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
29 | return | |
30 | # for now no new line | |
31 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | # currently writing | |
34 | if self.env['runtime']['screenManager'].isDelta(): | |
35 | return | |
36 | ||
37 | # get the word | |
38 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
39 | x, y, currWord, endOfScreen, lineBreak = \ | |
40 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
41 | ||
42 | # is there a word? | |
43 | if currWord == '': | |
44 | return | |
45 | # at the end of a word | |
46 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
47 | return | |
48 | # at the end of a word | |
49 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
50 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
51 | return | |
52 | ||
53 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
54 | ||
55 | def setCallback(self, callback): | |
56 | pass | |
57 |
+54
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is navigation? | |
22 | if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1: | |
23 | return | |
24 | ||
25 | # just when cursor move worddetection is needed | |
26 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
27 | return | |
28 | # for now no new line | |
29 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
30 | return | |
31 | # currently writing | |
32 | if self.env['runtime']['screenManager'].isDelta(): | |
33 | return | |
34 | ||
35 | # get the word | |
36 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
37 | x, y, currWord, endOfScreen, lineBreak = \ | |
38 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
39 | ||
40 | # is there a word? | |
41 | if currWord == '': | |
42 | return | |
43 | ||
44 | # at the start of a word | |
45 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
46 | (self.env['screen']['newCursor']['x'] != x): | |
47 | return | |
48 | ||
49 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
50 | ||
51 | def setCallback(self, callback): | |
52 | pass | |
53 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import os, string | |
9 | ||
10 | initialized = False | |
11 | try: | |
12 | import enchant | |
13 | initialized = True | |
14 | except: | |
15 | pass | |
16 | ||
17 | class command(): | |
18 | def __init__(self): | |
19 | self.language = '' | |
20 | self.spellChecker = '' | |
21 | def initialize(self, environment): | |
22 | self.env = environment | |
23 | self.updateSpellLanguage() | |
24 | def shutdown(self): | |
25 | pass | |
26 | def getDescription(self): | |
27 | return 'No Description found' | |
28 | ||
29 | def updateSpellLanguage(self): | |
30 | if not initialized: | |
31 | return | |
32 | self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')) | |
33 | self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') | |
34 | ||
35 | def run(self): | |
36 | if not initialized: | |
37 | return | |
38 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'): | |
39 | return | |
40 | if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language: | |
41 | try: | |
42 | self.updateSpellLanguage() | |
43 | except: | |
44 | return | |
45 | ||
46 | # just when horizontal cursor move worddetection is needed | |
47 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
48 | return | |
49 | ||
50 | # for now no new line | |
51 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
52 | return | |
53 | # more than a keyecho? | |
54 | if len(self.env['screen']['newDelta']) > 1: | |
55 | return | |
56 | # deletion | |
57 | if self.env['runtime']['screenManager'].isNegativeDelta(): | |
58 | return | |
59 | # first place could not be the end of a word | |
60 | if self.env['screen']['newCursor']['x'] == 0: | |
61 | return | |
62 | ||
63 | # get the word (just for speedup only look at current line | |
64 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
65 | x, y, currWord, endOfScreen, lineBreak = word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
66 | # was this a typed word? | |
67 | if self.env['runtime']['screenManager'].isDelta(): | |
68 | if not(newContent[self.env['screen']['oldCursor']['x']] in string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~' and x != self.env['screen']['oldCursor']['x']): | |
69 | return | |
70 | else: | |
71 | currWord = currWord.strip(string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~') | |
72 | else: | |
73 | # or just arrow arround? | |
74 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
75 | return | |
76 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
77 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
78 | return | |
79 | ||
80 | # just on end of word | |
81 | if self.env['screen']['newCursor']['x'] > 0: | |
82 | if not newContent[self.env['screen']['oldCursor']['x'] - 1].lower() in string.ascii_lowercase: | |
83 | return | |
84 | ||
85 | # ignore bash buildins | |
86 | if currWord in ['cd','fg','bg','alias','bind','dir','caller','buildin','command','declare','echo','enable','help','let','local','logout',\ | |
87 | 'mapfile','printf','read','readarray','source','type','typeset','ulimit','unalias']: | |
88 | return | |
89 | # ignore the application name | |
90 | if currWord.upper() == 'FENRIR': | |
91 | return | |
92 | if currWord[0] =='-': | |
93 | return | |
94 | if currWord[0] == '/': | |
95 | return | |
96 | if currWord[0] == '#': | |
97 | return | |
98 | if currWord.startswith('./'): | |
99 | return | |
100 | if '@' in currWord and '.' in currWord: | |
101 | return | |
102 | if currWord[0] == '@': | |
103 | return | |
104 | if currWord.isnumeric(): | |
105 | return | |
106 | if currWord.isdecimal(): | |
107 | return | |
108 | if currWord.isspace(): | |
109 | return | |
110 | ||
111 | try: | |
112 | if os.path.exists("/bin/"+currWord): | |
113 | return | |
114 | except: | |
115 | pass | |
116 | try: | |
117 | if os.path.exists("/usr/bin/"+currWord): | |
118 | return | |
119 | except: | |
120 | pass | |
121 | try: | |
122 | if os.path.exists("/sbin/"+currWord): | |
123 | return | |
124 | except: | |
125 | pass | |
126 | ||
127 | if not self.spellChecker.check(currWord): | |
128 | self.env['runtime']['outputManager'].presentText(_('misspelled'), soundIcon='mispell', interrupt=False, flush=False) | |
129 | ||
130 | def setCallback(self, callback): | |
131 | pass | |
132 |
+46
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'): | |
20 | return | |
21 | # detect typing or chilling | |
22 | if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']: | |
23 | return | |
24 | ||
25 | # More than just a deletion happend | |
26 | if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True): | |
27 | return | |
28 | ||
29 | # no deletion | |
30 | if not self.env['runtime']['screenManager'].isNegativeDelta(): | |
31 | return | |
32 | ||
33 | # too much for a single backspace... | |
34 | # word begin produce a diff wiht len == 2 |a | others with 1 |a| | |
35 | if len(self.env['screen']['newNegativeDelta']) > 2: | |
36 | return | |
37 | ||
38 | currNegativeDelta = self.env['screen']['newNegativeDelta'] | |
39 | if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \ | |
40 | currNegativeDelta.strip() != '': | |
41 | currNegativeDelta = currNegativeDelta.strip() | |
42 | self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
43 | def setCallback(self, callback): | |
44 | pass | |
45 |
+26
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('exits review mode') | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'): | |
20 | return | |
21 | if self.env['runtime']['cursorManager'].isReviewMode(): | |
22 | self.env['runtime']['cursorManager'].clearReviewCursor() | |
23 | ||
24 | def setCallback(self, callback): | |
25 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import screen_utils | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('Reads attributes of current cursor position') | |
18 | def run(self): | |
19 | # is it enabled? | |
20 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'): | |
21 | return | |
22 | # is a vertical change? | |
23 | if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\ | |
24 | self.env['runtime']['cursorManager'].isCursorHorizontalMove()): | |
25 | return | |
26 | ||
27 | cursorPos = self.env['screen']['newCursor'] | |
28 | ||
29 | if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos): | |
30 | return | |
31 | self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False) | |
32 | def setCallback(self, callback): | |
33 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | # big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now) | |
20 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) | |
21 | if xMove > 1: | |
22 | return | |
23 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'): | |
24 | return | |
25 | # detect deletion or chilling | |
26 | if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: | |
27 | return | |
28 | # is there any change? | |
29 | if not self.env['runtime']['screenManager'].isDelta(): | |
30 | return | |
31 | ||
32 | # filter unneded space on word begin | |
33 | currDelta = self.env['screen']['newDelta'] | |
34 | if len(currDelta.strip()) != len(currDelta) and \ | |
35 | currDelta.strip() != '': | |
36 | currDelta = currDelta.strip() | |
37 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
38 | ||
39 | def setCallback(self, callback): | |
40 | pass | |
41 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is it enabled? | |
22 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'): | |
23 | return | |
24 | # is naviation? | |
25 | if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1: | |
26 | return | |
27 | # just when cursor move worddetection is needed | |
28 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
29 | return | |
30 | # for now no new line | |
31 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | # currently writing | |
34 | if self.env['runtime']['screenManager'].isDelta(): | |
35 | return | |
36 | ||
37 | # get the word | |
38 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
39 | x, y, currWord, endOfScreen, lineBreak = \ | |
40 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
41 | ||
42 | # is there a word? | |
43 | if currWord == '': | |
44 | return | |
45 | # at the end of a word | |
46 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
47 | return | |
48 | # at the end of a word | |
49 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
50 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
51 | return | |
52 | ||
53 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
54 | ||
55 | def setCallback(self, callback): | |
56 | pass | |
57 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import os, string | |
9 | ||
10 | initialized = False | |
11 | try: | |
12 | import enchant | |
13 | initialized = True | |
14 | except: | |
15 | pass | |
16 | ||
17 | class command(): | |
18 | def __init__(self): | |
19 | self.language = '' | |
20 | self.spellChecker = '' | |
21 | def initialize(self, environment): | |
22 | self.env = environment | |
23 | self.updateSpellLanguage() | |
24 | def shutdown(self): | |
25 | pass | |
26 | def getDescription(self): | |
27 | return 'No Description found' | |
28 | ||
29 | def updateSpellLanguage(self): | |
30 | if not initialized: | |
31 | return | |
32 | self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')) | |
33 | self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') | |
34 | ||
35 | def run(self): | |
36 | if not initialized: | |
37 | return | |
38 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'): | |
39 | return | |
40 | if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language: | |
41 | try: | |
42 | self.updateSpellLanguage() | |
43 | except: | |
44 | return | |
45 | ||
46 | # just when horizontal cursor move worddetection is needed | |
47 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
48 | return | |
49 | ||
50 | # for now no new line | |
51 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
52 | return | |
53 | # more than a keyecho? | |
54 | if len(self.env['screen']['newDelta']) > 1: | |
55 | return | |
56 | # deletion | |
57 | if self.env['runtime']['screenManager'].isNegativeDelta(): | |
58 | return | |
59 | # first place could not be the end of a word | |
60 | if self.env['screen']['newCursor']['x'] == 0: | |
61 | return | |
62 | ||
63 | # get the word (just for speedup only look at current line | |
64 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
65 | x, y, currWord, endOfScreen, lineBreak = word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
66 | # was this a typed word? | |
67 | if self.env['runtime']['screenManager'].isDelta(): | |
68 | if not(newContent[self.env['screen']['oldCursor']['x']] in string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~' and x != self.env['screen']['oldCursor']['x']): | |
69 | return | |
70 | else: | |
71 | currWord = currWord.strip(string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~') | |
72 | else: | |
73 | # or just arrow arround? | |
74 | if not newContent[self.env['screen']['newCursor']['x']].isspace(): | |
75 | return | |
76 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
77 | (x + len(currWord) != self.env['screen']['newCursor']['x']-1): | |
78 | return | |
79 | ||
80 | # just on end of word | |
81 | if self.env['screen']['newCursor']['x'] > 0: | |
82 | if not newContent[self.env['screen']['oldCursor']['x'] - 1].lower() in string.ascii_lowercase: | |
83 | return | |
84 | ||
85 | # ignore bash buildins | |
86 | if currWord in ['cd','fg','bg','alias','bind','dir','caller','buildin','command','declare','echo','enable','help','let','local','logout',\ | |
87 | 'mapfile','printf','read','readarray','source','type','typeset','ulimit','unalias']: | |
88 | return | |
89 | # ignore the application name | |
90 | if currWord.upper() == 'FENRIR': | |
91 | return | |
92 | if currWord[0] =='-': | |
93 | return | |
94 | if currWord[0] == '/': | |
95 | return | |
96 | if currWord[0] == '#': | |
97 | return | |
98 | if currWord.startswith('./'): | |
99 | return | |
100 | if '@' in currWord and '.' in currWord: | |
101 | return | |
102 | if currWord[0] == '@': | |
103 | return | |
104 | if currWord.isnumeric(): | |
105 | return | |
106 | if currWord.isdecimal(): | |
107 | return | |
108 | if currWord.isspace(): | |
109 | return | |
110 | ||
111 | try: | |
112 | if os.path.exists("/bin/"+currWord): | |
113 | return | |
114 | except: | |
115 | pass | |
116 | try: | |
117 | if os.path.exists("/usr/bin/"+currWord): | |
118 | return | |
119 | except: | |
120 | pass | |
121 | try: | |
122 | if os.path.exists("/sbin/"+currWord): | |
123 | return | |
124 | except: | |
125 | pass | |
126 | ||
127 | if not self.spellChecker.check(currWord): | |
128 | self.env['runtime']['outputManager'].presentText(_('misspelled'), soundIcon='mispell', interrupt=False, flush=False) | |
129 | ||
130 | def setCallback(self, callback): | |
131 | pass | |
132 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'): | |
20 | return | |
21 | # detect typing or chilling | |
22 | if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']: | |
23 | return | |
24 | ||
25 | # More than just a deletion happend | |
26 | if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True): | |
27 | return | |
28 | ||
29 | # no deletion | |
30 | if not self.env['runtime']['screenManager'].isNegativeDelta(): | |
31 | return | |
32 | ||
33 | # too much for a single backspace... | |
34 | # word begin produce a diff wiht len == 2 |a | others with 1 |a| | |
35 | if len(self.env['screen']['newNegativeDelta']) > 2: | |
36 | return | |
37 | ||
38 | currNegativeDelta = self.env['screen']['newNegativeDelta'] | |
39 | if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \ | |
40 | currNegativeDelta.strip() != '': | |
41 | currNegativeDelta = currNegativeDelta.strip() | |
42 | self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
43 | def setCallback(self, callback): | |
44 | pass | |
45 |
+51
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import char_utils | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return '' | |
18 | ||
19 | def run(self): | |
20 | if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'): | |
21 | return | |
22 | if self.env['runtime']['screenManager'].isScreenChange(): | |
23 | return | |
24 | # detect an change on the screen, we just want to cursor arround, so no change should appear | |
25 | if self.env['runtime']['screenManager'].isDelta(): | |
26 | return | |
27 | if self.env['runtime']['screenManager'].isNegativeDelta(): | |
28 | return | |
29 | # is a vertical change? | |
30 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
31 | return | |
32 | # is it a horizontal change? | |
33 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
34 | return | |
35 | ||
36 | # echo word insteed of char | |
37 | if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'): | |
38 | if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1: | |
39 | # get the word | |
40 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
41 | x, y, currWord, endOfScreen, lineBreak = \ | |
42 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
43 | if self.env['screen']['newCursor']['x'] == x: | |
44 | return | |
45 | x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) | |
46 | if not currChar.isspace(): | |
47 | self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) | |
48 | def setCallback(self, callback): | |
49 | pass | |
50 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No Description found' | |
17 | ||
18 | def run(self): | |
19 | # try to detect the tab completion by cursor change | |
20 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) | |
21 | if xMove == 1: | |
22 | return | |
23 | # is there any change? | |
24 | if not self.env['runtime']['screenManager'].isDelta(): | |
25 | return | |
26 | if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])): | |
27 | return | |
28 | # detect deletion or chilling | |
29 | if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: | |
30 | return | |
31 | ||
32 | # filter unneded space on word begin | |
33 | currDelta = self.env['screen']['newDelta'] | |
34 | if len(currDelta.strip()) != len(currDelta) and \ | |
35 | currDelta.strip() != '': | |
36 | currDelta = currDelta.strip() | |
37 | self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False) | |
38 | ||
39 | def setCallback(self, callback): | |
40 | pass | |
41 |
+54
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import word_utils | |
8 | import string | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | pass | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No Description found' | |
19 | ||
20 | def run(self): | |
21 | # is navigation? | |
22 | if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1: | |
23 | return | |
24 | ||
25 | # just when cursor move worddetection is needed | |
26 | if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): | |
27 | return | |
28 | # for now no new line | |
29 | if self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
30 | return | |
31 | # currently writing | |
32 | if self.env['runtime']['screenManager'].isDelta(): | |
33 | return | |
34 | ||
35 | # get the word | |
36 | newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
37 | x, y, currWord, endOfScreen, lineBreak = \ | |
38 | word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) | |
39 | ||
40 | # is there a word? | |
41 | if currWord == '': | |
42 | return | |
43 | ||
44 | # at the start of a word | |
45 | if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \ | |
46 | (self.env['screen']['newCursor']['x'] != x): | |
47 | return | |
48 | ||
49 | self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) | |
50 | ||
51 | def setCallback(self, callback): | |
52 | pass | |
53 |
+59
-0
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import line_utils | |
8 | from fenrirscreenreader.utils import word_utils | |
9 | ||
10 | class command(): | |
11 | def __init__(self): | |
12 | self.lastIdent = -1 | |
13 | def initialize(self, environment): | |
14 | self.env = environment | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return '' | |
19 | ||
20 | def run(self): | |
21 | if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'): | |
22 | return | |
23 | if self.env['runtime']['screenManager'].isScreenChange(): | |
24 | self.lastIdent = 0 | |
25 | return | |
26 | # this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack | |
27 | if self.env['runtime']['screenManager'].isDelta(): | |
28 | return | |
29 | ||
30 | # is a vertical change? | |
31 | if not self.env['runtime']['cursorManager'].isCursorVerticalMove(): | |
32 | return | |
33 | ||
34 | x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) | |
35 | if currLine.isspace(): | |
36 | self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False) | |
37 | else: | |
38 | # ident | |
39 | currIdent = len(currLine) - len(currLine.lstrip()) | |
40 | if self.lastIdent == -1: | |
41 | self.lastIdent = currIdent | |
42 | doInterrupt = True | |
43 | if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'): | |
44 | if self.lastIdent != currIdent: | |
45 | self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False) | |
46 | doInterrupt = False | |
47 | # barrier | |
48 | sayLine = currLine | |
49 | if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'): | |
50 | isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y']) | |
51 | if isBarrier: | |
52 | sayLine = barrierLine | |
53 | # output | |
54 | self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False) | |
55 | self.lastIdent = currIdent | |
56 | def setCallback(self, callback): | |
57 | pass | |
58 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import screen_utils | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('Reads attributes of current cursor position') | |
18 | def run(self): | |
19 | # is it enabled? | |
20 | if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'): | |
21 | return | |
22 | # is a vertical change? | |
23 | if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\ | |
24 | self.env['runtime']['cursorManager'].isCursorHorizontalMove()): | |
25 | return | |
26 | ||
27 | cursorPos = self.env['screen']['newCursor'] | |
28 | ||
29 | if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos): | |
30 | return | |
31 | self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False) | |
32 | def setCallback(self, callback): | |
33 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('exits review mode') | |
17 | ||
18 | def run(self): | |
19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'): | |
20 | return | |
21 | if self.env['runtime']['cursorManager'].isReviewMode(): | |
22 | self.env['runtime']['cursorManager'].clearReviewCursor() | |
23 | ||
24 | def setCallback(self, callback): | |
25 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | if self.env['runtime']['helpManager'].isTutorialMode(): | |
19 | self.env['runtime']['inputManager'].keyEcho() | |
20 | ||
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | pass | |
19 | #self.env['runtime']['inputManager'].updateInputDevices() | |
20 | def setCallback(self, callback): | |
21 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | import time | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | self.lastTime = time.time() | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No description found' | |
19 | def run(self): | |
20 | playSound = False | |
21 | deviceList = self.env['runtime']['inputManager'].getLastDetectedDevices() | |
22 | try: | |
23 | for deviceEntry in deviceList: | |
24 | # dont play sounds for virtual devices | |
25 | playSound = playSound or not deviceEntry['virtual'] | |
26 | except: | |
27 | playSound = True | |
28 | if playSound: | |
29 | if time.time() - self.lastTime > 5: | |
30 | self.env['runtime']['outputManager'].playSoundIcon(soundIcon = 'accept', interrupt=True) | |
31 | lastTime = time.time() | |
32 | def setCallback(self, callback): | |
33 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | import time | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | self.lastTime = time.time() | |
15 | def shutdown(self): | |
16 | pass | |
17 | def getDescription(self): | |
18 | return 'No description found' | |
19 | def run(self): | |
20 | if time.time() - self.lastTime > 2: | |
21 | self.env['runtime']['outputManager'].playSoundIcon(soundIcon = 'accept', interrupt=True) | |
22 | lastTime = time.time() | |
23 | def setCallback(self, callback): | |
24 | pass |
12 | 12 | def shutdown(self): |
13 | 13 | pass |
14 | 14 | def getDescription(self): |
15 | return _('enables or disables tracking of highlighted') | |
16 | ||
15 | return _('enables or disables tracking of highlighted') | |
17 | 16 | def run(self): |
18 | 17 | if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'): |
19 | 18 | return |
20 | 19 | attributeDelta = self.env['runtime']['attributeManager'].getAttributeDelta() |
21 | self.env['runtime']['outputManager'].presentText(attributeDelta, soundIcon='', interrupt=True, flush=False) | |
22 | ||
20 | self.env['runtime']['outputManager'].presentText(attributeDelta, soundIcon='', interrupt=True, flush=False) | |
23 | 21 | def setCallback(self, callback): |
24 | 22 | pass |
13 | 13 | def shutdown(self): |
14 | 14 | pass |
15 | 15 | def getDescription(self): |
16 | return '' | |
16 | return '' | |
17 | 17 | def run(self): |
18 | 18 | if self.env['screen']['newAttribDelta'] != '': |
19 | 19 | return |
30 | 30 | if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: |
31 | 31 | if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]): |
32 | 32 | return |
33 | if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: | |
33 | elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: | |
34 | 34 | if not (self.env['runtime']['byteManager'].getLastByteKey() in [b'^[[A',b'^[[B']): |
35 | 35 | return |
36 | ||
36 | ||
37 | 37 | prevLine = self.env['screen']['oldContentText'].split('\n')[self.env['screen']['newCursor']['y']] |
38 | currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
38 | currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] | |
39 | 39 | if prevLine == currLine: |
40 | 40 | if self.env['screen']['newDelta'] != '': |
41 | return | |
41 | return | |
42 | 42 | if not currLine.isspace(): |
43 | 43 | currPrompt = currLine.find('$') |
44 | 44 | rootPrompt = currLine.find('#') |
46 | 46 | if rootPrompt > 0: |
47 | 47 | currPrompt = rootPrompt |
48 | 48 | else: |
49 | announce = currLine | |
49 | announce = currLine | |
50 | 50 | if currPrompt > 0: |
51 | 51 | remove_digits = str.maketrans('0123456789', ' ') |
52 | 52 | if prevLine[:currPrompt].translate(remove_digits) == currLine[:currPrompt].translate(remove_digits): |
53 | 53 | announce = currLine[currPrompt+1:] |
54 | 54 | else: |
55 | announce = currLine | |
55 | announce = currLine | |
56 | 56 | |
57 | 57 | if currLine.isspace(): |
58 | 58 | self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False) |
59 | else: | |
59 | else: | |
60 | 60 | self.env['runtime']['outputManager'].presentText(announce, interrupt=True, flush=False) |
61 | 61 | self.env['commandsIgnore']['onScreenUpdate']['CHAR_DELETE_ECHO'] = True |
62 | 62 | self.env['commandsIgnore']['onScreenUpdate']['CHAR_ECHO'] = True |
13 | 13 | def shutdown(self): |
14 | 14 | pass |
15 | 15 | def getDescription(self): |
16 | return 'No Description found' | |
16 | return 'No Description found' | |
17 | 17 | |
18 | 18 | def run(self): |
19 | 19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'): |
20 | 20 | return |
21 | 21 | # is there something to read? |
22 | 22 | if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True): |
23 | return | |
24 | ||
25 | # this must be a keyecho or something | |
23 | return | |
24 | ||
25 | # this must be a keyecho or something | |
26 | 26 | #if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1: |
27 | 27 | xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) |
28 | 28 | yMove = abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y']) |
30 | 30 | if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']): |
31 | 31 | # if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2: |
32 | 32 | if not '\n' in self.env['screen']['newDelta']: |
33 | return | |
33 | return | |
34 | 34 | #print(xMove, yMove, len(self.env['screen']['newDelta']), len(self.env['screen']['newNegativeDelta'])) |
35 | 35 | self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False) |
36 | 36 |
14 | 14 | def shutdown(self): |
15 | 15 | pass |
16 | 16 | def getDescription(self): |
17 | return 'No Description found' | |
18 | ||
17 | return 'No Description found' | |
19 | 18 | def run(self): |
20 | 19 | if not self.env['runtime']['settingsManager'].getSettingAsBool('promote', 'enabled'): |
21 | 20 | return |
24 | 23 | if int(time.time() - self.env['input']['lastInputTime']) < self.env['runtime']['settingsManager'].getSettingAsInt('promote', 'inactiveTimeoutSec'): |
25 | 24 | return |
26 | 25 | if len(self.env['runtime']['settingsManager'].getSetting('promote', 'list')) == 0: |
27 | return | |
26 | return | |
28 | 27 | for promote in self.env['runtime']['settingsManager'].getSetting('promote', 'list').split(','): |
29 | 28 | if promote in self.env['screen']['newDelta']: |
30 | self.env['runtime']['outputManager'].playSoundIcon('PromotedText') | |
29 | self.env['runtime']['outputManager'].playSoundIcon('PromotedText') | |
31 | 30 | self.env['input']['lastInputTime'] = time.time() |
32 | 31 | return |
33 | ||
34 | 32 | def setCallback(self, callback): |
35 | 33 | pass |
36 | 34 |
13 | 13 | def shutdown(self): |
14 | 14 | pass |
15 | 15 | def getDescription(self): |
16 | return 'No Description found' | |
17 | ||
16 | return 'No Description found' | |
18 | 17 | def run(self): |
19 | 18 | if not self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'): |
20 | 19 | return |
21 | 20 | if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True): |
22 | return | |
23 | ||
21 | return | |
24 | 22 | self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y']) |
25 | ||
26 | 23 | def setCallback(self, callback): |
27 | 24 | pass |
28 | 25 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get current quick menu entry') | |
17 | def run(self): | |
18 | menu = '' | |
19 | value = '' | |
20 | menu = self.env['runtime']['quickMenuManager'].getCurrentEntry() | |
21 | if menu != '': | |
22 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
23 | self.env['runtime']['outputManager'].presentText(menu + ' ' + value, interrupt=True) | |
24 | def setCallback(self, callback): | |
25 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get current quick menu value') | |
17 | def run(self): | |
18 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
19 | self.env['runtime']['outputManager'].presentText(value, interrupt=True) | |
20 | def setCallback(self, callback): | |
21 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get next quick menu entry') | |
17 | def run(self): | |
18 | menu = '' | |
19 | value = '' | |
20 | if self.env['runtime']['quickMenuManager'].nextEntry(): | |
21 | menu = self.env['runtime']['quickMenuManager'].getCurrentEntry() | |
22 | if menu != '': | |
23 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
24 | self.env['runtime']['outputManager'].presentText(menu + ' ' + value, interrupt=True) | |
25 | else: | |
26 | self.env['runtime']['outputManager'].presentText(_('Quick menu not available'), interrupt=True) | |
27 | def setCallback(self, callback): | |
28 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get next quick menu value') | |
17 | def run(self): | |
18 | if self.env['runtime']['quickMenuManager'].nextValue(): | |
19 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
20 | self.env['runtime']['outputManager'].presentText(value, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get previous quick menu entry') | |
17 | def run(self): | |
18 | menu = '' | |
19 | value = '' | |
20 | if self.env['runtime']['quickMenuManager'].prevEntry(): | |
21 | menu = self.env['runtime']['quickMenuManager'].getCurrentEntry() | |
22 | if menu != '': | |
23 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
24 | self.env['runtime']['outputManager'].presentText(menu + ' ' + value, interrupt=True) | |
25 | else: | |
26 | self.env['runtime']['outputManager'].presentText(_('Quick menu not available'), interrupt=True) | |
27 | def setCallback(self, callback): | |
28 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get previous quick menu value') | |
17 | def run(self): | |
18 | if self.env['runtime']['quickMenuManager'].prevValue(): | |
19 | value = self.env['runtime']['quickMenuManager'].getCurrentValue() | |
20 | self.env['runtime']['outputManager'].presentText(value, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get current v menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].getCurrentEntry() | |
19 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
20 | def setCallback(self, callback): | |
21 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('leave v menu submenu') | |
17 | def run(self): | |
18 | self.env['runtime']['vmenuManager'].decLevel() | |
19 | text = self.env['runtime']['vmenuManager'].getCurrentEntry() | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('execute v menu entry') | |
17 | def run(self): | |
18 | self.env['runtime']['vmenuManager'].executeMenu() | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('enter v menu submenu') | |
17 | def run(self): | |
18 | self.env['runtime']['vmenuManager'].incLevel() | |
19 | text = self.env['runtime']['vmenuManager'].getCurrentEntry() | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get next v menu entry') | |
17 | def run(self): | |
18 | self.env['runtime']['vmenuManager'].nextIndex() | |
19 | text = self.env['runtime']['vmenuManager'].getCurrentEntry() | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('get prev v menu entry') | |
17 | def run(self): | |
18 | self.env['runtime']['vmenuManager'].prevIndex() | |
19 | text = self.env['runtime']['vmenuManager'].getCurrentEntry() | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | def setCallback(self, callback): | |
22 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('a') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('b') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('c') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('d') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('e') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('f') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('g') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('h') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('i') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('j') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('k') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('l') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('m') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('n') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('o') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('p') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('q') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('r') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('s') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('t') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('u') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('v') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('a') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('x') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('y') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return _('search for an menu entry') | |
17 | def run(self): | |
18 | text = self.env['runtime']['vmenuManager'].searchEntry('z') | |
19 | if text != '': | |
20 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
21 | else: | |
22 | self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True) | |
23 | def setCallback(self, callback): | |
24 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run open macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run open save' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run replace macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run search macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | import datetime | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('presents the date') | |
18 | ||
19 | def run(self): | |
20 | dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat') | |
21 | ||
22 | # get the time formatted | |
23 | dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat) | |
24 | ||
25 | # present the time via speak and braile, there is no soundicon, interrupt the current speech | |
26 | self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True) | |
27 | ||
28 | def setCallback(self, callback): | |
29 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | self.keyMakro = [[1, 'KEY_LEFTCTRL'], [1, 'KEY_G'], [0.05,'sleep'] ,[0, 'KEY_G'], [0, 'KEY_LEFTCTRL']] | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return 'No description found' | |
18 | def run(self): | |
19 | self.env['runtime']['inputManager'].sendKeys(self.keyMakro) | |
20 | def setCallback(self, callback): | |
21 | pass | |
22 | ||
23 | ||
24 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | self.macro = [[1,'KEY_LEFTSHIFT'],[1,'KEY_LEFTCTRL'],[1,'KEY_N'],[0.05,'SLEEP'],[0,'KEY_N'],[0,'KEY_LEFTCTRL'],[0,'KEY_LEFTSHIFT']] | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return 'No description found' | |
18 | def run(self): | |
19 | self.env['runtime']['inputManager'].sendKeys(self.macro) | |
20 | def setCallback(self, callback): | |
21 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run open save' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run replace macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run search macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | import datetime | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('presents the date') | |
18 | ||
19 | def run(self): | |
20 | dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat') | |
21 | ||
22 | # get the time formatted | |
23 | dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat) | |
24 | ||
25 | # present the time via speak and braile, there is no soundicon, interrupt the current speech | |
26 | self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True) | |
27 | ||
28 | def setCallback(self, callback): | |
29 | pass |
0 | #!/usr/bin/env python | |
1 | # -*- encoding: utf-8 | |
2 | from fenrirscreenreader.core import debug | |
3 | ||
4 | ||
5 | class command(): | |
6 | def __init__(self): | |
7 | pass | |
8 | ||
9 | def initialize(self, environment): | |
10 | self.env = environment | |
11 | self.keyMakro = [[1, 'KEY_LEFTCTRL'], | |
12 | [1, 'KEY_G'], | |
13 | [0.05, 'SLEEP'], | |
14 | [0, 'KEY_G'], | |
15 | [0, 'KEY_LEFTCTRL']] | |
16 | ||
17 | def shutdown(self): | |
18 | pass | |
19 | ||
20 | def getDescription(self): | |
21 | return "Learn about the Nano text editor." | |
22 | ||
23 | def run(self): | |
24 | self.env['runtime']['outputManager'].presentText( | |
25 | "Okay, loading the information about Nano.", interrupt=True) | |
26 | if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: | |
27 | self.env['runtime']['inputManager'].sendKeys(self.keyMakro) | |
28 | elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: | |
29 | self.env['runtime']['byteManager'].sendBytes(self.byteMakro) | |
30 | ||
31 | def setCallback(self, callback): | |
32 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run open macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/usr/bin/env python | |
1 | # -*- encoding: utf-8 | |
2 | from fenrirscreenreader.core import debug | |
3 | ||
4 | ||
5 | class command(): | |
6 | def __init__(self): | |
7 | pass | |
8 | ||
9 | def initialize(self, environment): | |
10 | self.env = environment | |
11 | self.keyMakro = [[1, 'KEY_LEFTCTRL'], | |
12 | [1, 'KEY_S'], | |
13 | [0.05, 'SLEEP'], | |
14 | [0, 'KEY_S'], | |
15 | [0, 'KEY_LEFTCTRL']] | |
16 | ||
17 | def shutdown(self): | |
18 | pass | |
19 | ||
20 | def getDescription(self): | |
21 | return "Save your work." | |
22 | ||
23 | def run(self): | |
24 | self.env['runtime']['outputManager'].presentText( | |
25 | "Okay, you will now be asked to save your work.", interrupt=True) | |
26 | if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: | |
27 | self.env['runtime']['inputManager'].sendKeys(self.keyMakro) | |
28 | elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: | |
29 | self.env['runtime']['byteManager'].sendBytes(self.byteMakro) | |
30 | ||
31 | def setCallback(self, callback): | |
32 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run replace macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run search macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | import datetime | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('presents the date') | |
18 | ||
19 | def run(self): | |
20 | dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat') | |
21 | ||
22 | # get the time formatted | |
23 | dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat) | |
24 | ||
25 | # present the time via speak and braile, there is no soundicon, interrupt the current speech | |
26 | self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True) | |
27 | ||
28 | def setCallback(self, callback): | |
29 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run open macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run open save' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run replace macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | def shutdown(self): | |
14 | pass | |
15 | def getDescription(self): | |
16 | return 'No description found' | |
17 | def run(self): | |
18 | self.env['runtime']['outputManager'].presentText('ok i run search macro' , interrupt=True) | |
19 | def setCallback(self, callback): | |
20 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | import datetime | |
8 | ||
9 | class command(): | |
10 | def __init__(self): | |
11 | pass | |
12 | def initialize(self, environment): | |
13 | self.env = environment | |
14 | def shutdown(self): | |
15 | pass | |
16 | def getDescription(self): | |
17 | return _('presents the date') | |
18 | ||
19 | def run(self): | |
20 | dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat') | |
21 | ||
22 | # get the time formatted | |
23 | dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat) | |
24 | ||
25 | # present the time via speak and braile, there is no soundicon, interrupt the current speech | |
26 | self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True) | |
27 | ||
28 | def setCallback(self, callback): | |
29 | pass |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | ||
8 | class command(): | |
9 | def __init__(self): | |
10 | pass | |
11 | def initialize(self, environment): | |
12 | self.env = environment | |
13 | # examples: | |
14 | # self.keyMakro = [[1,'KEY_LEFTCTRL'],[1,'KEY_O'],[0.05,'SLEEP'],[0,'KEY_O'],[0,'KEY_LEFTCTRL']] | |
15 | # self.keyMakro = [[1,'KEY_LEFTSHIFT'],[1,'KEY_LEFTCTRL'],[1,'KEY_N'],[0.05,'SLEEP'],[0,'KEY_N'],[0,'KEY_LEFTCTRL'],[0,'KEY_LEFTSHIFT']] | |
16 | self.keyMakro = [] | |
17 | self.byteMakro = [] | |
18 | def shutdown(self): | |
19 | pass | |
20 | def getDescription(self): | |
21 | return 'No description found' | |
22 | def run(self): | |
23 | if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: | |
24 | self.env['runtime']['inputManager'].sendKeys(self.keyMakro) | |
25 | elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: | |
26 | self.env['runtime']['byteManager'].sendBytes(self.byteMakro) | |
27 | def setCallback(self, callback): | |
28 | pass |
13 | 13 | self.currAttributeDelta = '' |
14 | 14 | self.currAttributeCursor = None |
15 | 15 | self.prefAttributeCursor = None |
16 | self.initDefaultAttributes() | |
17 | self.prevLastCursorAttribute = None | |
18 | self.currLastCursorAttribute = None | |
19 | ||
16 | self.initDefaultAttributes() | |
17 | self.prevLastCursorAttribute = None | |
18 | self.currLastCursorAttribute = None | |
19 | ||
20 | 20 | def initialize(self, environment): |
21 | self.env = environment | |
21 | self.env = environment | |
22 | 22 | def shutdown(self): |
23 | 23 | pass |
24 | 24 | def setLastCursorAttribute(self, lastCursorAttribute): |
25 | 25 | self.prevLastCursorAttribute = self.currLastCursorAttribute |
26 | self.currLastCursorAttribute = lastCursorAttribute | |
27 | def resetLastCursorAttribute(self, lastCursorAttribute): | |
26 | self.currLastCursorAttribute = lastCursorAttribute | |
27 | def resetLastCursorAttribute(self): | |
28 | 28 | self.prevLastCursorAttribute = None |
29 | self.currLastCursorAttribute = None | |
29 | self.currLastCursorAttribute = None | |
30 | 30 | def isLastCursorAttributeChange(self): |
31 | 31 | if self.prevLastCursorAttribute == None: |
32 | 32 | return False |
42 | 42 | def resetAttributeAll(self): |
43 | 43 | self.resetAttributeDelta() |
44 | 44 | self.resetAttributeCursor() |
45 | def getAttributeDelta(self): | |
46 | return self.currAttributeDelta | |
45 | def getAttributeDelta(self): | |
46 | return self.currAttributeDelta | |
47 | 47 | def resetAttributeDelta(self): |
48 | self.currAttributeDelta = '' | |
49 | def setAttributeDelta(self, currAttributeDelta): | |
48 | self.currAttributeDelta = '' | |
49 | def setAttributeDelta(self, currAttributeDelta): | |
50 | 50 | self.currAttributeDelta = currAttributeDelta |
51 | 51 | def resetAttributeCursor(self): |
52 | 52 | self.currAttributeCursor = None |
53 | 53 | self.prefAttributeCursor = None |
54 | 54 | def setAttributeCursor(self, currAttributeCursor): |
55 | self.prefAttributeCursor = self.currAttributeCursor | |
55 | self.prefAttributeCursor = self.currAttributeCursor | |
56 | 56 | self.currAttributeCursor = currAttributeCursor.copy() |
57 | 57 | def resetAttributes(self, currAttributes): |
58 | self.prevAttributes = None | |
59 | self.currAttributes = currAttributes | |
58 | self.prevAttributes = None | |
59 | self.currAttributes = currAttributes | |
60 | 60 | def setAttributes(self, currAttributes): |
61 | self.prevAttributes = self.currAttributes | |
61 | self.prevAttributes = self.currAttributes | |
62 | 62 | self.currAttributes = currAttributes.copy() |
63 | ||
63 | 64 | def getAttributeByXY(self, x, y): |
64 | 65 | if not self.currAttributes: |
65 | 66 | return None |
66 | 67 | if len(self.currAttributes) < y: |
67 | 68 | return None |
68 | 69 | if len(self.currAttributes[y]) < x - 1: |
69 | return None | |
70 | try: | |
70 | return None | |
71 | try: | |
71 | 72 | return self.currAttributes[y][x] |
72 | 73 | except KeyError: |
73 | 74 | try: |
80 | 81 | return |
81 | 82 | if len(attribute) != 10: |
82 | 83 | return |
83 | self.defaultAttributes.append(attribute) | |
84 | self.defaultAttributes.append(attribute) | |
84 | 85 | def initDefaultAttributes(self): |
85 | 86 | self.defaultAttributes = [None] |
86 | 87 | self.defaultAttributes.append([ |
94 | 95 | False, # blink |
95 | 96 | 'default', # fontsize |
96 | 97 | 'default' # fontfamily |
97 | ]) #end attribute | |
98 | ]) #end attribute | |
98 | 99 | def isDefaultAttribute(self,attribute): |
99 | 100 | return attribute in self.defaultAttributes |
100 | 101 | def hasAttributes(self, cursor, update=True): |
105 | 106 | attribute = self.getAttributeByXY( cursorPos['x'], cursorPos['y']) |
106 | 107 | |
107 | 108 | if update: |
108 | self.setLastCursorAttribute(attribute) | |
109 | self.setLastCursorAttribute(attribute) | |
109 | 110 | if not self.isLastCursorAttributeChange(): |
110 | 111 | return False |
111 | 112 | |
133 | 134 | # "italics", |
134 | 135 | # "underscore", |
135 | 136 | # "strikethrough", |
136 | # "reverse", | |
137 | # "blink" | |
137 | # "reverse", | |
138 | # "blink" | |
138 | 139 | # "fontsieze" |
139 | # "fontfamily" | |
140 | # "fontfamily" | |
140 | 141 | if attributeFormatString == '': |
141 | 142 | attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString') |
142 | 143 | if not attributeFormatString: |
147 | 148 | return '' |
148 | 149 | if len(attribute) != 10: |
149 | 150 | return '' |
150 | ||
151 | ||
151 | 152 | # 0 FG color (name) |
152 | 153 | try: |
153 | 154 | attributeFormatString = attributeFormatString.replace('fenrirFGColor', _(attribute[0])) |
168 | 169 | pass |
169 | 170 | attributeFormatString = attributeFormatString.replace('fenrirBold', '') |
170 | 171 | |
171 | # 3 italics (True/ False) | |
172 | try: | |
173 | if attribute[3]: | |
172 | # 3 italics (True/ False) | |
173 | try: | |
174 | if attribute[3]: | |
174 | 175 | attributeFormatString = attributeFormatString.replace('fenrirItalics', _('italic')) |
175 | 176 | except Exception as e: |
176 | 177 | pass |
194 | 195 | |
195 | 196 | # 6 reverse (True/ False) |
196 | 197 | try: |
197 | if attribute[6]: | |
198 | if attribute[6]: | |
198 | 199 | attributeFormatString = attributeFormatString.replace('fenrirReverse', _('reverse')) |
199 | 200 | except Exception as e: |
200 | 201 | pass |
201 | 202 | attributeFormatString = attributeFormatString.replace('fenrirReverse', '') |
202 | 203 | |
203 | # 7 blink (True/ False) | |
204 | try: | |
205 | if attribute[7]: | |
204 | # 7 blink (True/ False) | |
205 | try: | |
206 | if attribute[7]: | |
206 | 207 | attributeFormatString = attributeFormatString.replace('fenrirBlink', _('blink')) |
207 | 208 | except Exception as e: |
208 | 209 | pass |
235 | 236 | currCursor = None |
236 | 237 | # screen change |
237 | 238 | if self.prevAttributes == None: |
238 | return result, currCursor | |
239 | return result, currCursor | |
239 | 240 | # no change |
240 | 241 | if self.prevAttributes == self.currAttributes: |
241 | 242 | return result, currCursor |
242 | 243 | # error case |
243 | 244 | if self.currAttributes == None: |
244 | return result, currCursor | |
245 | return result, currCursor | |
245 | 246 | # special case for pty if not text exists. |
246 | 247 | if len(self.currAttributes) == 0: |
247 | return result, currCursor | |
248 | return result, currCursor | |
248 | 249 | text = self.env['runtime']['screenManager'].getScreenText() |
249 | 250 | textLines = text.split('\n') |
250 | 251 | |
267 | 268 | if line < 0: |
268 | 269 | return False |
269 | 270 | if line > len(currAttributes): |
270 | return False | |
271 | return False | |
271 | 272 | useful = False |
272 | 273 | if mode == 'default': |
273 | 274 | # non default tracking |
277 | 278 | if line == 0: |
278 | 279 | useful = (currAttributes[line][column][attribute] != currAttributes[line + 1][column][attribute]) and (currAttributes[line][column][attribute] != currAttributes[line + 2][column][attribute]) |
279 | 280 | elif line >= len(prevAttributes): |
280 | useful = (currAttributes[line][column][attribute] != currAttributes[line - 1][column][attribute]) and (currAttributes[line][column][attribute] != currAttributes[line - 2][column][attribute]) | |
281 | useful = (currAttributes[line][column][attribute] != currAttributes[line - 1][column][attribute]) and (currAttributes[line][column][attribute] != currAttributes[line - 2][column][attribute]) | |
281 | 282 | else: |
282 | useful = (currAttributes[line][column][attribute] != currAttributes[line + 1][column][attribute]) and (currAttributes[line][column][attribute] != currAttributes[line - 1][column][attribute]) | |
283 | useful = (currAttributes[line][column][attribute] != currAttributes[line + 1][column][attribute]) and (currAttributes[line][column][attribute] != currAttributes[line - 1][column][attribute]) | |
283 | 284 | elif mode == 'barrier': |
284 | 285 | # to be implement |
285 | 286 | useful = True |
286 | ||
287 | ||
287 | 288 | return useful |
288 | 289 |
40 | 40 | |
41 | 41 | if not isBarrier: |
42 | 42 | sayLine = '' |
43 | return isBarrier, sayLine | |
44 | ||
45 | def hasBorder(self, text, xCursor, yCursor, validBorder, barrierPos): | |
46 | # check for corners here | |
47 | lastLineNo = len(text) - 1 | |
48 | if yCursor <= 0: | |
49 | if not (text[0][barrierPos] in validBorder): | |
50 | return False | |
51 | if len(text) > 1: | |
52 | if not (text[1][barrierPos] in validBorder): | |
53 | return False | |
54 | if len(text) > 2: | |
55 | if not (text[2][barrierPos] in validBorder): | |
56 | return False | |
57 | elif yCursor >= lastLineNo: | |
58 | if not (text[lastLineNo][barrierPos] in validBorder): | |
59 | return False | |
60 | if len(text) > 1: | |
61 | if not (text[lastLineNo - 1][barrierPos] in validBorder): | |
62 | return False | |
63 | if len(text) > 2: | |
64 | if not (text[lastLineNo - 2][barrierPos] in validBorder): | |
65 | return False | |
66 | else: | |
67 | if not (text[yCursor][barrierPos] in validBorder): | |
68 | return False | |
69 | if not (text[yCursor - 1][barrierPos] in validBorder): | |
70 | return False | |
71 | if not (text[yCursor + 1][barrierPos] in validBorder): | |
72 | return False | |
73 | return True | |
43 | return isBarrier, sayLine | |
44 | ||
74 | 45 | def getBarrierText(self, text, xCursor, yCursor): |
75 | 46 | line = text[yCursor] |
76 | 47 | if not self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled'): |
88 | 59 | offset = xCursor - 1 |
89 | 60 | start = line[:offset].rfind(b) |
90 | 61 | if start != -1: |
91 | if not self.hasBorder(text, xCursor, yCursor, leftBarriers, start): | |
92 | start = -1 | |
93 | else: | |
94 | start += 1 | |
62 | start += 1 | |
95 | 63 | break |
96 | 64 | if start == -1: |
97 | 65 | return False, line |
100 | 68 | end = line[start:].find(b) |
101 | 69 | if end != -1: |
102 | 70 | end = start + end |
103 | if not self.hasBorder(text, xCursor, yCursor,rightBarriers, end): | |
104 | end = -1 | |
105 | 71 | break |
106 | 72 | if end == -1: |
107 | 73 | return False, line |
28 | 28 | if convertedEscapeSequence[0] == 94 and convertedEscapeSequence[1] ==91: |
29 | 29 | convertedEscapeSequence = b'^[' + convertedEscapeSequence[2:] |
30 | 30 | return convertedEscapeSequence |
31 | def handleByteStream(self, eventData, sep = b'\x1b'): | |
32 | buffer = eventData | |
33 | # handle prefix | |
34 | endIndex = buffer.find(sep) | |
35 | if endIndex > 0: | |
36 | currSequence = buffer[:endIndex] | |
37 | buffer = buffer[endIndex:] | |
38 | self.handleSingleByteSequence(currSequence) | |
39 | # special handlig for none found (performance) | |
40 | elif endIndex == -1: | |
41 | self.handleSingleByteSequence(buffer) | |
42 | return | |
43 | # handle outstanding sequence | |
44 | while buffer != b'': | |
45 | endIndex = buffer[len(sep):].find(sep) | |
46 | if endIndex == -1: | |
47 | currSequence = buffer | |
48 | buffer = b'' | |
49 | else: | |
50 | currSequence = buffer[:endIndex + len(sep)] | |
51 | buffer = buffer[endIndex + len(sep):] | |
52 | self.handleSingleByteSequence(currSequence) | |
31 | 53 | def handleByteInput(self, eventData): |
32 | 54 | if not eventData: |
33 | 55 | return |
34 | 56 | if eventData == b'': |
35 | 57 | return |
36 | ||
58 | try: | |
59 | self.env['runtime']['debug'].writeDebugOut("handleByteInput " + eventData.decode('utf8') ,debug.debugLevel.INFO) | |
60 | except: | |
61 | pass | |
62 | self.handleByteStream(eventData) | |
63 | def handleSingleByteSequence(self, eventData): | |
37 | 64 | convertedEscapeSequence = self.unifyEscapeSeq(eventData) |
38 | 65 | |
39 | 66 | if self.switchCtrlModeOnce > 0: |
81 | 108 | self.env['runtime']['outputManager'].presentText(_('bypass'), soundIcon='PTYBypass', interrupt=True, flush=True) |
82 | 109 | return True |
83 | 110 | return False |
111 | def sendBytes(self, byteMacro): | |
112 | pass | |
84 | 113 | def detectByteCommand(self, escapeSequence): |
85 | 114 | convertedEscapeSequence = self.unifyEscapeSeq(escapeSequence) |
86 | 115 | command = self.env['runtime']['inputManager'].getCommandForShortcut(convertedEscapeSequence) |
30 | 30 | def shutdown(self): |
31 | 31 | for commandFolder in self.env['general']['commandFolderList']: |
32 | 32 | self.env['runtime']['commandManager'].shutdownCommands(commandFolder) |
33 | ||
33 | ||
34 | def loadFile(self, filepath = ''): | |
35 | if filepath == '': | |
36 | return None | |
37 | if not os.path.exists(filepath): | |
38 | self.env['runtime']['debug'].writeDebugOut("loadFile: filepath not exists:" + filepath ,debug.debugLevel.WARNING) | |
39 | return None | |
40 | if os.path.isdir(filepath): | |
41 | self.env['runtime']['debug'].writeDebugOut("loadFile: filepath is a directory:" + filepath ,debug.debugLevel.ERROR) | |
42 | return None | |
43 | if not os.access(filepath, os.R_OK): | |
44 | self.env['runtime']['debug'].writeDebugOut("loadFile: filepath not readable:" + filepath ,debug.debugLevel.ERROR) | |
45 | return None | |
46 | ||
47 | try: | |
48 | fileName, fileExtension = os.path.splitext(filepath) | |
49 | fileName = fileName.split('/')[-1] | |
50 | if fileName.startswith('__'): | |
51 | return None | |
52 | if fileExtension.lower() == '.py': | |
53 | command_mod = module_utils.importModule(fileName, filepath) | |
54 | command = command_mod.command() | |
55 | command.initialize(self.env) | |
56 | self.env['runtime']['debug'].writeDebugOut("loadFile: Load command:" + filepath ,debug.debugLevel.INFO, onAnyLevel=True) | |
57 | return command | |
58 | except Exception as e: | |
59 | self.env['runtime']['debug'].writeDebugOut("loadFile: Loading command:" + filepath ,debug.debugLevel.ERROR) | |
60 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
61 | return None | |
34 | 62 | def loadCommands(self, section='commands',commandPath=''): |
35 | 63 | if commandPath =='': |
36 | 64 | commandPath = fenrirPath+ "/commands/" |
37 | 65 | if not commandPath.endswith('/'): |
38 | commandPath += '/' | |
66 | commandPath += '/' | |
39 | 67 | commandFolder = commandPath + section +"/" |
40 | 68 | if not os.path.exists(commandFolder): |
41 | self.env['runtime']['debug'].writeDebugOut("commandFolder not exists:" + commandFolder ,debug.debugLevel.WARNING) | |
69 | self.env['runtime']['debug'].writeDebugOut("loadCommands: commandFolder not exists:" + commandFolder ,debug.debugLevel.WARNING) | |
42 | 70 | return |
43 | 71 | if not os.path.isdir(commandFolder): |
44 | self.env['runtime']['debug'].writeDebugOut("commandFolder not a directory:" + commandFolder ,debug.debugLevel.ERROR) | |
45 | return | |
72 | self.env['runtime']['debug'].writeDebugOut("loadCommands: commandFolder not a directory:" + commandFolder ,debug.debugLevel.ERROR) | |
73 | return | |
46 | 74 | if not os.access(commandFolder, os.R_OK): |
47 | self.env['runtime']['debug'].writeDebugOut("commandFolder not readable:" + commandFolder ,debug.debugLevel.ERROR) | |
48 | return | |
75 | self.env['runtime']['debug'].writeDebugOut("loadCommands: commandFolder not readable:" + commandFolder ,debug.debugLevel.ERROR) | |
76 | return | |
49 | 77 | self.env['commands'][section] = {} |
50 | 78 | self.env['commandsIgnore'][section] = {} |
51 | 79 | commandList = glob.glob(commandFolder+'*') |
65 | 93 | self.env['commands'][section][fileName.upper()] = command_mod.command() |
66 | 94 | self.env['commandsIgnore'][section][fileName.upper()[fileName.upper().find('-')+1:]+'_IGNORE'] = False |
67 | 95 | self.env['commands'][section][fileName.upper()].initialize(self.env) |
68 | self.env['runtime']['debug'].writeDebugOut("Load command:" + section + "." + fileName.upper() ,debug.debugLevel.INFO, onAnyLevel=True) | |
69 | except Exception as e: | |
70 | self.env['runtime']['debug'].writeDebugOut("Loading command:" + command ,debug.debugLevel.ERROR) | |
96 | self.env['runtime']['debug'].writeDebugOut("loadCommands: Load command:" + section + "." + fileName.upper() ,debug.debugLevel.INFO, onAnyLevel=True) | |
97 | except Exception as e: | |
98 | self.env['runtime']['debug'].writeDebugOut("loadCommands: Loading command:" + command ,debug.debugLevel.ERROR) | |
71 | 99 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) |
72 | 100 | continue |
73 | 101 | |
117 | 145 | if not self.env['runtime']['inputManager'].isValidKey(key.upper()): |
118 | 146 | self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' script:' + fileName ,debug.debugLevel.WARNING) |
119 | 147 | invalid = True |
120 | break | |
148 | break | |
121 | 149 | shortcutKeys.append(key.upper()) |
122 | 150 | if invalid: |
123 | continue | |
151 | continue | |
124 | 152 | if not 'KEY_SCRIPT' in shortcutKeys: |
125 | shortcutKeys.append('KEY_SCRIPT') | |
153 | shortcutKeys.append('KEY_SCRIPT') | |
126 | 154 | shortcut.append(1) |
127 | 155 | shortcut.append(sorted(shortcutKeys)) |
128 | self.env['bindings'][str(shortcut)] = fileName.upper() | |
156 | self.env['bindings'][str(shortcut)] = fileName.upper() | |
129 | 157 | except Exception as e: |
130 | 158 | self.env['runtime']['debug'].writeDebugOut("Loading script:" + fileName ,debug.debugLevel.ERROR) |
131 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
159 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
132 | 160 | continue |
133 | 161 | def shutdownCommands(self, section): |
134 | 162 | for command in sorted(self.env['commands'][section]): |
145 | 173 | return |
146 | 174 | #unload |
147 | 175 | oldScript = unLoadScript |
148 | if self.commandExists(oldScript, trigger): | |
176 | if self.commandExists(oldScript, trigger): | |
149 | 177 | try: |
150 | 178 | self.env['runtime']['debug'].writeDebugOut("Executing switchtrigger.unload:" + trigger + "." + oldScript ,debug.debugLevel.INFO) |
151 | self.env['commands'][trigger][oldScript].unload() | |
179 | self.env['commands'][trigger][oldScript].unload() | |
152 | 180 | except Exception as e: |
153 | 181 | self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + oldScript ,debug.debugLevel.ERROR) |
154 | 182 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) |
155 | 183 | #load |
156 | 184 | newScript = loadScript |
157 | if self.commandExists(newScript, trigger): | |
185 | if self.commandExists(newScript, trigger): | |
158 | 186 | try: |
159 | 187 | self.env['runtime']['debug'].writeDebugOut("Executing switchtrigger.load:" + trigger + "." + newScript ,debug.debugLevel.INFO) |
160 | self.env['commands'][trigger][newScript].load() | |
188 | self.env['commands'][trigger][newScript].load() | |
161 | 189 | except Exception as e: |
162 | 190 | self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + newScript ,debug.debugLevel.ERROR) |
163 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
191 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
164 | 192 | |
165 | 193 | def executeDefaultTrigger(self, trigger, force=False): |
166 | 194 | if not force: |
167 | 195 | if self.env['runtime']['screenManager'].isSuspendingScreen(): |
168 | 196 | return |
169 | 197 | for command in sorted(self.env['commands'][trigger]): |
170 | if self.commandExists(command, trigger): | |
198 | if self.commandExists(command, trigger): | |
171 | 199 | try: |
172 | 200 | if self.env['commandsIgnore'][trigger][command[command.find('-')+1:]+'_IGNORE']: |
173 | 201 | self.env['commandsIgnore'][trigger][command[command.find('-')+1:]+'_IGNORE'] = False |
174 | self.env['runtime']['debug'].writeDebugOut("Ignore trigger.command:" + trigger + "." + command ,debug.debugLevel.INFO) | |
202 | self.env['runtime']['debug'].writeDebugOut("Ignore trigger.command:" + trigger + "." + command ,debug.debugLevel.INFO) | |
175 | 203 | else: |
176 | self.env['runtime']['debug'].writeDebugOut("Executing trigger.command:" + trigger + "." + command ,debug.debugLevel.INFO) | |
177 | self.env['commands'][trigger][command].run() | |
204 | self.env['runtime']['debug'].writeDebugOut("Executing trigger.command:" + trigger + "." + command ,debug.debugLevel.INFO) | |
205 | self.env['commands'][trigger][command].run() | |
178 | 206 | except Exception as e: |
179 | 207 | self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + command + str(e) ,debug.debugLevel.ERROR) |
180 | 208 | |
184 | 212 | if self.commandExists(command, section): |
185 | 213 | try: |
186 | 214 | if self.env['runtime']['helpManager'].isTutorialMode() and section != 'help': |
187 | self.env['runtime']['debug'].writeDebugOut("Tutorial for command:" + section + "." + command ,debug.debugLevel.INFO) | |
215 | self.env['runtime']['debug'].writeDebugOut("Tutorial for command:" + section + "." + command ,debug.debugLevel.INFO) | |
188 | 216 | description = self.getCommandDescription(command, section) |
189 | self.env['runtime']['outputManager'].presentText(description, interrupt=True) | |
217 | self.env['runtime']['outputManager'].presentText(description, interrupt=False) | |
190 | 218 | else: |
191 | self.env['runtime']['debug'].writeDebugOut("Executing command:" + section + "." + command ,debug.debugLevel.INFO) | |
219 | self.env['runtime']['debug'].writeDebugOut("Executing command:" + section + "." + command ,debug.debugLevel.INFO) | |
192 | 220 | self.runCommand(command, section) |
193 | 221 | except Exception as e: |
194 | 222 | self.env['runtime']['debug'].writeDebugOut("Executing command:" + section + "." + command +' ' + str(e),debug.debugLevel.ERROR) |
212 | 240 | self.env['commandInfo']['lastCommandExecutionTime'] = time.time() |
213 | 241 | |
214 | 242 | def commandExists(self, command, section = 'commands'): |
215 | return( command in self.env['commands'][section]) | |
216 | def getShortcutForCommand(self, command): | |
217 | shortcut = '' | |
218 | 243 | try: |
219 | shortcut = list(self.env['bindings'].keys())[list(self.env['bindings'].values()).index(command)] | |
244 | return( command in self.env['commands'][section]) | |
245 | except: | |
246 | return False | |
247 | def getShortcutForCommand(self, command, formatKeys = False): | |
248 | shortcut = [] | |
249 | try: | |
250 | rawShortcut = list(self.env['bindings'].keys())[list(self.env['bindings'].values()).index(command)] | |
251 | # prefer numbers for multitap | |
252 | for k in ['2', '3', '4', '5', '6', '7', '8']: | |
253 | if k in rawShortcut: | |
254 | formattedKey = k | |
255 | if formatKeys: | |
256 | formattedKey = formattedKey.lower() | |
257 | formattedKey += ' times ' | |
258 | shortcut.append(formattedKey) | |
259 | rawShortcut.remove(k) | |
260 | # prefer metha keys | |
261 | for k in ['KEY_FENRIR', 'KEY_SCRIPT', 'KEY_CTRL', 'KEY_SHIFT', 'KEY_ALT', 'KEY_META']: | |
262 | if k in rawShortcut: | |
263 | formattedKey = k | |
264 | if formatKeys: | |
265 | formattedKey = formattedKey.lower() | |
266 | formattedKey = formattedKey.replace('key_kp', ' keypad ') | |
267 | formattedKey = formattedKey.replace('key_', ' ') | |
268 | shortcut.append(formattedKey) | |
269 | rawShortcut.remove(k) | |
270 | # handle other keys | |
271 | for k in rawShortcut: | |
272 | formattedKey = k | |
273 | if formatKeys: | |
274 | formattedKey = formattedKey.lower() | |
275 | formattedKey = formattedKey.replace('key_kp', ' keypad ') | |
276 | formattedKey = formattedKey.replace('key_', ' ') | |
277 | shortcut.append(formattedKey) | |
220 | 278 | except: |
221 | 279 | pass |
222 | 280 | return shortcut |
5 | 5 | import pathlib, os |
6 | 6 | |
7 | 7 | class debugManager(): |
8 | def __init__(self, fileName = '/var/log/fenrirscreenreader/fenrir.log'): | |
8 | def __init__(self, fileName = ''): | |
9 | 9 | self._file = None |
10 | 10 | self._fileOpened = False |
11 | self._fileName = fileName | |
11 | self._fileName = '/tmp/fenrir_' + str(os.getpid()) + '_' + str(datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S')) + '.log' | |
12 | if fileName != '': | |
13 | self._fileName = fileName | |
12 | 14 | def initialize(self, environment): |
13 | self.env = environment | |
15 | self.env = environment | |
14 | 16 | def shutdown(self): |
15 | 17 | self.closeDebugFile() |
16 | 18 | def __del__(self): |
26 | 28 | if self._fileName != '': |
27 | 29 | directory = os.path.dirname(self._fileName) |
28 | 30 | if not os.path.exists(directory): |
29 | pathlib.Path(directory).mkdir(parents=True, exist_ok=True) | |
31 | pathlib.Path(directory).mkdir(parents=True, exist_ok=True) | |
30 | 32 | try: |
31 | 33 | self._file = open(self._fileName,'a') |
32 | 34 | self._fileOpened = True |
37 | 37 | parser.add_argument('-o', '--options', metavar='SECTION#SETTING=VALUE;..', default='', help='Overwrite options in given settings file. Sections, settings and Values are cases sensitive') |
38 | 38 | parser.add_argument('-d', '--debug', action='store_true', help='Turns on Debugmode') |
39 | 39 | parser.add_argument('-p', '--print', action='store_true', help='Print debug messages on screen') |
40 | parser.add_argument('-e', '--emulated-pty', action='store_true', help='Use PTY emulation and escape sequences for input') | |
40 | parser.add_argument('-e', '--emulated-pty', action='store_true', help='Use PTY emulation and escape sequences for input. Allows to use fenrir on the desktop, in a terminal for X or Wayland') | |
41 | 41 | parser.add_argument('-E', '--emulated-evdev', action='store_true', help='Use PTY emulation and evdev for input (single instance)') |
42 | 42 | try: |
43 | 43 | args = parser.parse_args() |
67 | 67 | else: |
68 | 68 | if self.environment['runtime']['helpManager'].isTutorialMode(): |
69 | 69 | self.environment['runtime']['inputManager'].clearEventBuffer() |
70 | self.environment['runtime']['inputManager'].keyEcho(event['Data']) | |
71 | ||
72 | if self.environment['runtime']['vmenuManager'].getActive(): | |
73 | self.environment['runtime']['inputManager'].clearEventBuffer() | |
70 | 74 | |
71 | 75 | self.detectShortcutCommand() |
72 | 76 | |
75 | 79 | if self.singleKeyCommand: |
76 | 80 | if self.environment['runtime']['inputManager'].noKeyPressed(): |
77 | 81 | self.environment['runtime']['inputManager'].clearEventBuffer() |
78 | else: | |
82 | else: | |
79 | 83 | self.environment['runtime']['inputManager'].writeEventBuffer() |
80 | 84 | if self.environment['runtime']['inputManager'].noKeyPressed(): |
81 | 85 | self.modifierInput = False |
82 | 86 | self.singleKeyCommand = False |
87 | self.environment['runtime']['inputManager'].handleDeviceGrab() | |
83 | 88 | if self.environment['input']['keyForeward'] > 0: |
84 | 89 | self.environment['input']['keyForeward'] -=1 |
85 | 90 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onKeyInput') |
90 | 95 | if event['Data'] == b'': |
91 | 96 | return |
92 | 97 | self.environment['runtime']['byteManager'].handleByteInput(event['Data']) |
93 | ||
94 | 98 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onByteInput') |
95 | 99 | def handleExecuteCommand(self, event): |
96 | 100 | if not event['Data']: |
97 | return | |
101 | return | |
98 | 102 | if event['Data'] == '': |
99 | 103 | return |
100 | 104 | command = event['Data'] |
101 | 105 | |
106 | # special modes | |
102 | 107 | if self.environment['runtime']['helpManager'].isTutorialMode(): |
103 | 108 | if self.environment['runtime']['commandManager'].commandExists( command, 'help'): |
104 | 109 | self.environment['runtime']['commandManager'].executeCommand( command, 'help') |
105 | 110 | return |
106 | self.environment['runtime']['commandManager'].executeCommand( command, 'commands') | |
111 | elif self.environment['runtime']['vmenuManager'].getActive(): | |
112 | if self.environment['runtime']['commandManager'].commandExists( command, 'vmenu-navigation'): | |
113 | self.environment['runtime']['commandManager'].executeCommand( command, 'vmenu-navigation') | |
114 | return | |
115 | ||
116 | # default | |
117 | self.environment['runtime']['commandManager'].executeCommand( command, 'commands') | |
107 | 118 | def handleRemoteIncomming(self, event): |
108 | 119 | if not event['Data']: |
109 | 120 | return |
110 | self.environment['runtime']['remoteManager'].handleRemoteIncomming(event['Data']) | |
111 | def handleScreenChange(self, event): | |
121 | self.environment['runtime']['remoteManager'].handleRemoteIncomming(event['Data']) | |
122 | def handleScreenChange(self, event): | |
112 | 123 | self.environment['runtime']['screenManager'].hanldeScreenChange(event['Data']) |
113 | ''' | |
124 | ''' | |
114 | 125 | if self.environment['runtime']['applicationManager'].isApplicationChange(): |
115 | 126 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange') |
116 | 127 | self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \ |
117 | 128 | self.environment['runtime']['applicationManager'].getPrevApplication(), \ |
118 | self.environment['runtime']['applicationManager'].getCurrentApplication()) | |
119 | ''' | |
120 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged') | |
121 | self.environment['runtime']['screenDriver'].getCurrScreen() | |
129 | self.environment['runtime']['applicationManager'].getCurrentApplication()) | |
130 | ''' | |
131 | if self.environment['runtime']['vmenuManager'].getActive(): | |
132 | return | |
133 | ||
134 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged') | |
135 | self.environment['runtime']['screenDriver'].getCurrScreen() | |
122 | 136 | def handleScreenUpdate(self, event): |
123 | 137 | #startTime = time.time() |
124 | 138 | self.environment['runtime']['screenManager'].handleScreenUpdate(event['Data']) |
127 | 141 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange') |
128 | 142 | self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \ |
129 | 143 | self.environment['runtime']['applicationManager'].getPrevApplication(), \ |
130 | self.environment['runtime']['applicationManager'].getCurrentApplication()) | |
144 | self.environment['runtime']['applicationManager'].getCurrentApplication()) | |
131 | 145 | ''' |
132 | 146 | # timout for the last keypress |
133 | 147 | if time.time() - self.environment['runtime']['inputManager'].getLastInputTime() >= 0.3: |
134 | self.environment['runtime']['inputManager'].clearLastDeepInput() | |
135 | # has cursor changed? | |
148 | self.environment['runtime']['inputManager'].clearLastDeepInput() | |
149 | # has cursor changed? | |
136 | 150 | if self.environment['runtime']['cursorManager'].isCursorVerticalMove() or \ |
137 | 151 | self.environment['runtime']['cursorManager'].isCursorHorizontalMove(): |
138 | 152 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onCursorChange') |
139 | 153 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenUpdate') |
140 | 154 | self.environment['runtime']['inputManager'].clearLastDeepInput() |
141 | 155 | #print('handleScreenUpdate:',time.time() - startTime) |
142 | ||
143 | 156 | def handlePlugInputDevice(self, event): |
157 | try: | |
158 | self.environment['runtime']['inputManager'].setLastDetectedDevices(event['Data']) | |
159 | except: | |
160 | pass | |
144 | 161 | self.environment['runtime']['inputManager'].handlePlugInputDevice(event['Data']) |
145 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onPlugInputDevice', force=True) | |
146 | ||
162 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onPlugInputDevice', force=True) | |
163 | self.environment['runtime']['inputManager'].setLastDetectedDevices(None) | |
147 | 164 | def handleHeartBeat(self, event): |
148 | 165 | self.environment['runtime']['commandManager'].executeDefaultTrigger('onHeartBeat',force=True) |
149 | #self.environment['runtime']['outputManager'].brailleText(flush=False) | |
150 | ||
151 | ||
152 | def detectShortcutCommand(self): | |
166 | #self.environment['runtime']['outputManager'].brailleText(flush=False) | |
167 | ||
168 | ||
169 | def detectShortcutCommand(self): | |
153 | 170 | if self.environment['input']['keyForeward'] > 0: |
154 | 171 | return |
155 | 172 | if self.environment['runtime']['inputManager'].isKeyPress(): |
160 | 177 | self.singleKeyCommand = len( self.environment['runtime']['inputManager'].getLastDeepestInput() ) == 1 |
161 | 178 | # key is already released. we need the old one |
162 | 179 | if not( self.singleKeyCommand and self.environment['runtime']['inputManager'].noKeyPressed()): |
163 | shortcut = self.environment['runtime']['inputManager'].getCurrShortcut() | |
180 | shortcut = self.environment['runtime']['inputManager'].getCurrShortcut() | |
164 | 181 | self.command = self.environment['runtime']['inputManager'].getCommandForShortcut(shortcut) |
165 | ||
182 | ||
166 | 183 | if not self.modifierInput: |
167 | 184 | if self.environment['runtime']['inputManager'].isKeyPress(): |
168 | 185 | if self.command != '': |
171 | 188 | if not (self.singleKeyCommand or self.modifierInput): |
172 | 189 | return |
173 | 190 | |
174 | # fire event | |
191 | # fire event | |
175 | 192 | if self.command != '': |
176 | if self.modifierInput: | |
193 | if self.modifierInput: | |
177 | 194 | self.environment['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, self.command) |
178 | self.command = '' | |
179 | else: | |
195 | self.command = '' | |
196 | else: | |
180 | 197 | if self.singleKeyCommand: |
181 | 198 | if self.environment['runtime']['inputManager'].noKeyPressed(): |
182 | 199 | self.environment['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, self.command) |
183 | 200 | self.command = '' |
184 | 201 | def setProcessName(self, name = 'fenrir'): |
185 | 202 | """Attempts to set the process name to 'fenrir'.""" |
186 | ||
187 | #sys.argv[0] = name | |
188 | ||
189 | # Disabling the import error of setproctitle. | |
190 | # pylint: disable-msg=F0401 | |
191 | 203 | try: |
192 | 204 | from setproctitle import setproctitle |
193 | 205 | except ImportError: |
216 | 228 | self.shutdownRequest() |
217 | 229 | |
218 | 230 | def shutdown(self): |
219 | self.environment['runtime']['eventManager'].stopMainEventLoop() | |
220 | self.environment['runtime']['outputManager'].presentText(_("Quit Fenrir"), soundIcon='ScreenReaderOff', interrupt=True) | |
231 | self.environment['runtime']['inputManager'].ungrabAllDevices() | |
232 | self.environment['runtime']['eventManager'].stopMainEventLoop() | |
233 | self.environment['runtime']['outputManager'].presentText(_("Quit Fenrir"), soundIcon='ScreenReaderOff', interrupt=True) | |
221 | 234 | self.environment['runtime']['eventManager'].cleanEventQueue() |
222 | 235 | time.sleep(0.6) |
223 | 236 | for currManager in self.environment['general']['managerList']: |
224 | 237 | if self.environment['runtime'][currManager]: |
225 | self.environment['runtime'][currManager].shutdown() | |
238 | self.environment['runtime'][currManager].shutdown() | |
226 | 239 | del self.environment['runtime'][currManager] |
227 | 240 | |
228 | 241 | self.environment = None |
13 | 13 | 'managerList':[ 'attributeManager','punctuationManager', 'byteManager', 'cursorManager', 'applicationManager', 'commandManager' |
14 | 14 | , 'screenManager', 'inputManager','outputManager', 'helpManager', 'memoryManager', 'eventManager','processManager', 'debug'], |
15 | 15 | 'commandFolderList':['commands','onKeyInput', 'onByteInput', 'onCursorChange', 'onScreenUpdate','onScreenChanged','onHeartBeat', 'onPlugInputDevice' |
16 | ,'onApplicationChange','onSwitchApplicationProfile','help',], | |
16 | ,'onApplicationChange','onSwitchApplicationProfile','help','vmenu-navigation',], | |
17 | 17 | } |
9 | 9 | class helpManager(): |
10 | 10 | def __init__(self): |
11 | 11 | self.helpDict = {} |
12 | self.tutorialListIndex = None | |
12 | self.tutorialListIndex = None | |
13 | 13 | def initialize(self, environment): |
14 | 14 | self.env = environment |
15 | 15 | def shutdown(self): |
17 | 17 | def toggleTutorialMode(self): |
18 | 18 | self.setTutorialMode(not self.env['general']['tutorialMode']) |
19 | 19 | def setTutorialMode(self, newTutorialMode): |
20 | self.env['general']['tutorialMode'] = newTutorialMode | |
20 | if self.env['runtime']['vmenuManager'].getActive(): | |
21 | return | |
22 | self.env['general']['tutorialMode'] = newTutorialMode | |
21 | 23 | if newTutorialMode: |
22 | self.createHelpDict() | |
24 | self.createHelpDict() | |
23 | 25 | self.env['bindings'][str([1, ['KEY_ESC']])] = 'TOGGLE_TUTORIAL_MODE' |
24 | 26 | self.env['bindings'][str([1, ['KEY_UP']])] = 'PREV_HELP' |
25 | 27 | self.env['bindings'][str([1, ['KEY_DOWN']])] = 'NEXT_HELP' |
26 | self.env['bindings'][str([1, ['KEY_SPACE']])] = 'CURR_HELP' | |
28 | self.env['bindings'][str([1, ['KEY_SPACE']])] = 'CURR_HELP' | |
27 | 29 | else: |
28 | 30 | try: |
29 | del(self.env['bindings'][str([1, ['KEY_ESC']])]) | |
30 | del(self.env['bindings'][str([1, ['KEY_UP']])]) | |
31 | del(self.env['bindings'][str([1, ['KEY_DOWN']])]) | |
32 | del(self.env['bindings'][str([1, ['KEY_SPACE']])]) | |
31 | self.env['bindings'] = self.env['runtime']['settingsManager'].getBindingBackup() | |
33 | 32 | except: |
34 | pass | |
33 | pass | |
35 | 34 | def isTutorialMode(self): |
36 | return self.env['general']['tutorialMode'] | |
35 | return self.env['general']['tutorialMode'] | |
36 | def getFormattedShortcutForCommand(self, command): | |
37 | shortcut = [] | |
38 | rawShortcut = [] | |
39 | try: | |
40 | rawShortcut = list(self.env['bindings'].keys())[list(self.env['bindings'].values()).index(command)] | |
41 | rawShortcut = self.env['rawBindings'][rawShortcut] | |
42 | # prefer numbers for multitap | |
43 | if rawShortcut[0] in range(2, 9): | |
44 | formattedKey = str(rawShortcut[0]) +' times ' | |
45 | shortcut.append(formattedKey) | |
46 | # prefer metha keys | |
47 | for k in ['KEY_FENRIR', 'KEY_SCRIPT', 'KEY_CTRL', 'KEY_SHIFT', 'KEY_ALT', 'KEY_META']: | |
48 | if k in rawShortcut[1]: | |
49 | formattedKey = k | |
50 | formattedKey = formattedKey.lower() | |
51 | formattedKey = formattedKey.replace('key_kp', ' keypad ') | |
52 | formattedKey = formattedKey.replace('key_', ' ') | |
53 | shortcut.append(formattedKey) | |
54 | rawShortcut[1].remove(k) | |
55 | # handle other keys | |
56 | for k in rawShortcut[1]: | |
57 | formattedKey = k | |
58 | formattedKey = formattedKey.lower() | |
59 | formattedKey = formattedKey.replace('key_kp', ' keypad ') | |
60 | formattedKey = formattedKey.replace('key_', ' ') | |
61 | shortcut.append(formattedKey) | |
62 | except Exception as e: | |
63 | return '' | |
64 | shortcut = str(shortcut) | |
65 | shortcut = shortcut.replace('[','') | |
66 | shortcut = shortcut.replace(']','') | |
67 | shortcut = shortcut.replace("'",'') | |
68 | return shortcut | |
69 | ||
37 | 70 | def getCommandHelpText(self, command, section = 'commands'): |
38 | 71 | commandName = command.lower() |
39 | commandName = commandName.split('__-__')[0] | |
40 | commandName = commandName.replace('_',' ') | |
72 | commandName = commandName.split('__-__')[0] | |
73 | commandName = commandName.replace('_',' ') | |
41 | 74 | commandName = commandName.replace('_',' ') |
42 | 75 | if command == 'TOGGLE_TUTORIAL_MODE': |
43 | 76 | commandDescription = _('toggles the tutorial mode') |
44 | 77 | else: |
45 | commandDescription = self.env['runtime']['commandManager'].getCommandDescription( command, section = 'commands') | |
78 | commandDescription = self.env['runtime']['commandManager'].getCommandDescription(command, section = 'commands') | |
46 | 79 | if commandDescription == '': |
47 | 80 | commandDescription = 'no Description available' |
48 | commandShortcut = self.env['runtime']['commandManager'].getShortcutForCommand( command) | |
49 | commandShortcut = commandShortcut.replace('KEY_',' ') | |
50 | commandShortcut = commandShortcut.replace('[','') | |
51 | commandShortcut = commandShortcut.replace(']','') | |
52 | commandShortcut = commandShortcut.replace("'",'') | |
81 | commandShortcut = self.getFormattedShortcutForCommand(command) | |
53 | 82 | if commandShortcut == '': |
54 | 83 | commandShortcut = 'unbound' |
55 | 84 | helptext = commandName + ', Shortcut ' + commandShortcut + ', Description ' + commandDescription |
56 | 85 | return helptext |
57 | 86 | def createHelpDict(self, section = 'commands'): |
58 | self.helpDict = {} | |
87 | self.helpDict = {} | |
59 | 88 | for command in sorted(self.env['commands'][section].keys()): |
60 | self.helpDict[len(self.helpDict)] = self.getCommandHelpText(command, section) | |
89 | self.helpDict[len(self.helpDict)] = self.getCommandHelpText(command, section) | |
61 | 90 | if len(self.helpDict) > 0: |
62 | 91 | self.tutorialListIndex = 0 |
63 | 92 | else: |
64 | self.tutorialListIndex = None | |
65 | def getHelpForCurrentIndex(self): | |
93 | self.tutorialListIndex = None | |
94 | def getHelpForCurrentIndex(self): | |
66 | 95 | if self.tutorialListIndex == None: |
67 | 96 | return '' |
68 | 97 | return self.helpDict[self.tutorialListIndex] |
10 | 10 | self._initialized = False |
11 | 11 | def initialize(self, environment): |
12 | 12 | self.env = environment |
13 | self.env['runtime']['inputManager'].setShortcutType('KEY') | |
13 | self.env['runtime']['inputManager'].setShortcutType('KEY') | |
14 | 14 | self._isInitialized = True |
15 | 15 | def shutdown(self): |
16 | 16 | if self._initialized: |
17 | self.removeAllDevices() | |
17 | self.removeAllDevices() | |
18 | 18 | self._isInitialized = False |
19 | 19 | def getInputEvent(self): |
20 | 20 | time.sleep(0.1) |
21 | 21 | return None |
22 | 22 | def clearEventBuffer(self): |
23 | 23 | if not self._initialized: |
24 | return | |
24 | return | |
25 | 25 | del self.env['input']['eventBuffer'][:] |
26 | 26 | def updateInputDevices(self, newDevices = None, init = False): |
27 | 27 | if not self._initialized: |
28 | return | |
28 | return | |
29 | 29 | def getLedState(self, led = 0): |
30 | 30 | if not self._initialized: |
31 | return False | |
31 | return False | |
32 | 32 | return False |
33 | 33 | def toggleLedState(self, led = 0): |
34 | 34 | if not self._initialized: |
35 | 35 | return |
36 | 36 | def grabAllDevices(self): |
37 | 37 | if not self._initialized: |
38 | return | |
38 | return True | |
39 | return True | |
39 | 40 | def ungrabAllDevices(self): |
40 | 41 | if not self._initialized: |
41 | return | |
42 | return True | |
43 | return True | |
42 | 44 | def hasIDevices(self): |
43 | 45 | if not self._initialized: |
44 | 46 | return False |
45 | 47 | return True |
46 | 48 | def removeAllDevices(self): |
47 | 49 | if not self._initialized: |
48 | return | |
50 | return | |
51 | def sendKey(self): | |
52 | if not self._initialized: | |
53 | return | |
49 | 54 | def __del__(self): |
50 | 55 | if not self._initialized: |
51 | return | |
56 | return | |
52 | 57 | try: |
53 | 58 | self.removeAllDevices() |
54 | 59 | except: |
5 | 5 | |
6 | 6 | from fenrirscreenreader.core import debug |
7 | 7 | from fenrirscreenreader.core import inputData |
8 | import os, inspect, time | |
8 | import os, inspect, time, traceback | |
9 | 9 | currentdir = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe())))) |
10 | 10 | fenrirPath = os.path.dirname(currentdir) |
11 | 11 | |
12 | 12 | class inputManager(): |
13 | 13 | def __init__(self): |
14 | 14 | self.shortcutType = 'KEY' |
15 | self.executeDeviceGrab = False | |
15 | self.executeDeviceGrab = False | |
16 | self.lastDetectedDevices = None | |
16 | 17 | def setShortcutType(self, shortcutType = 'KEY'): |
17 | 18 | if shortcutType in ['KEY', 'BYTE']: |
18 | 19 | self.shortcutType = shortcutType |
32 | 33 | self.env['input']['newScrollLock'] = self.env['runtime']['inputDriver'].getLedState(2) |
33 | 34 | self.env['input']['oldScrollLock'] = self.env['input']['newScrollLock'] |
34 | 35 | self.lastDeepestInput = [] |
36 | self.lastEvent = None | |
35 | 37 | self.env['input']['shortcutRepeat'] = 1 |
36 | 38 | self.lastInputTime = time.time() |
37 | 39 | def shutdown(self): |
46 | 48 | return event |
47 | 49 | def setExecuteDeviceGrab(self, newExecuteDeviceGrab = True): |
48 | 50 | self.executeDeviceGrab = newExecuteDeviceGrab |
49 | def handleDeviceGrab(self): | |
51 | def handleDeviceGrab(self, force = False): | |
52 | if force: | |
53 | self.setExecuteDeviceGrab() | |
50 | 54 | if not self.executeDeviceGrab: |
51 | 55 | return |
52 | 56 | if self.env['input']['eventBuffer'] != []: |
53 | 57 | return |
54 | 58 | if not self.noKeyPressed(): |
55 | return | |
59 | return | |
56 | 60 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'): |
57 | return | |
61 | self.executeDeviceGrab = False | |
62 | return | |
58 | 63 | if self.env['runtime']['screenManager'].getCurrScreenIgnored(): |
59 | self.ungrabAllDevices() | |
64 | while not self.ungrabAllDevices(): | |
65 | time.sleep(0.25) | |
66 | self.env['runtime']['debug'].writeDebugOut("retry ungrabAllDevices " ,debug.debugLevel.WARNING) | |
67 | self.env['runtime']['debug'].writeDebugOut("All devices ungrabbed" ,debug.debugLevel.INFO) | |
60 | 68 | else: |
61 | self.grabAllDevices() | |
62 | self.executeDeviceGrab = False | |
69 | while not self.grabAllDevices(): | |
70 | time.sleep(0.25) | |
71 | self.env['runtime']['debug'].writeDebugOut("retry grabAllDevices" ,debug.debugLevel.WARNING) | |
72 | self.env['runtime']['debug'].writeDebugOut("All devices grabbed" ,debug.debugLevel.INFO) | |
73 | self.executeDeviceGrab = False | |
74 | def sendKeys(self, keyMacro): | |
75 | for e in keyMacro: | |
76 | key = '' | |
77 | value = 0 | |
78 | if len(e) != 2: | |
79 | continue | |
80 | if isinstance(e[0], int) and isinstance(e[1], str): | |
81 | key = e[1].upper() | |
82 | value = e[0] | |
83 | elif isinstance(e[1], int) and isinstance(e[0], str): | |
84 | key = e[0].upper() | |
85 | value = e[1] | |
86 | else: | |
87 | continue | |
88 | if key.upper() == 'SLEEP': | |
89 | time.sleep(value) | |
90 | else: | |
91 | self.env['runtime']['inputDriver'].sendKey(key, value) | |
92 | def getLastEvent(self): | |
93 | return self.lastEvent | |
63 | 94 | def handleInputEvent(self, eventData): |
64 | #print(eventData) | |
65 | 95 | if not eventData: |
66 | 96 | return |
97 | self.lastEvent = eventData | |
67 | 98 | # a hang apears.. try to fix |
68 | 99 | if self.env['input']['eventBuffer'] == []: |
69 | 100 | if self.env['input']['currInput'] != []: |
70 | self.env['input']['currInput'] = [] | |
71 | self.env['input']['shortcutRepeat'] = 1 | |
72 | ||
101 | self.env['input']['currInput'] = [] | |
102 | self.env['input']['shortcutRepeat'] = 1 | |
103 | ||
73 | 104 | self.env['input']['prevInput'] = self.env['input']['currInput'].copy() |
74 | 105 | if eventData['EventState'] == 0: |
75 | 106 | if eventData['EventName'] in self.env['input']['currInput']: |
78 | 109 | self.env['input']['currInput'] = sorted(self.env['input']['currInput']) |
79 | 110 | elif len(self.env['input']['currInput']) == 0: |
80 | 111 | self.env['input']['shortcutRepeat'] = 1 |
81 | self.lastInputTime = time.time() | |
112 | self.lastInputTime = time.time() | |
82 | 113 | elif eventData['EventState'] == 1: |
83 | 114 | if not eventData['EventName'] in self.env['input']['currInput']: |
84 | 115 | self.env['input']['currInput'].append(eventData['EventName']) |
91 | 122 | self.env['input']['shortcutRepeat'] += 1 |
92 | 123 | else: |
93 | 124 | self.env['input']['shortcutRepeat'] = 1 |
94 | self.handleLedStates(eventData) | |
125 | self.handleLedStates(eventData) | |
95 | 126 | self.lastInputTime = time.time() |
96 | 127 | elif eventData['EventState'] == 2: |
97 | self.lastInputTime = time.time() | |
128 | self.lastInputTime = time.time() | |
98 | 129 | |
99 | 130 | self.env['input']['oldNumLock'] = self.env['input']['newNumLock'] |
100 | 131 | self.env['input']['newNumLock'] = self.env['runtime']['inputDriver'].getLedState() |
105 | 136 | self.env['runtime']['debug'].writeDebugOut("currInput " + str(self.env['input']['currInput'] ) ,debug.debugLevel.INFO) |
106 | 137 | if self.noKeyPressed(): |
107 | 138 | self.env['input']['prevInput'] = [] |
108 | self.handleDeviceGrab() | |
109 | ||
139 | ||
110 | 140 | def handleLedStates(self, mEvent): |
111 | 141 | try: |
112 | 142 | if mEvent['EventName'] == 'KEY_NUMLOCK': |
113 | self.env['runtime']['inputDriver'].toggleLedState() | |
114 | elif mEvent['EventName'] == 'KEY_CAPSLOCK': | |
115 | self.env['runtime']['inputDriver'].toggleLedState(1) | |
116 | elif mEvent['EventName'] == 'KEY_SCROLLLOCK': | |
117 | self.env['runtime']['inputDriver'].toggleLedState(2) | |
143 | self.env['runtime']['inputDriver'].toggleLedState() | |
144 | elif mEvent['EventName'] == 'KEY_CAPSLOCK': | |
145 | self.env['runtime']['inputDriver'].toggleLedState(1) | |
146 | elif mEvent['EventName'] == 'KEY_SCROLLLOCK': | |
147 | self.env['runtime']['inputDriver'].toggleLedState(2) | |
118 | 148 | except: |
119 | 149 | pass |
120 | 150 | def grabAllDevices(self): |
121 | 151 | if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'): |
122 | 152 | try: |
123 | self.env['runtime']['inputDriver'].grabAllDevices() | |
153 | return self.env['runtime']['inputDriver'].grabAllDevices() | |
124 | 154 | except Exception as e: |
125 | pass | |
155 | return False | |
156 | return True | |
126 | 157 | def ungrabAllDevices(self): |
127 | 158 | if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'): |
128 | 159 | try: |
129 | self.env['runtime']['inputDriver'].ungrabAllDevices() | |
160 | return self.env['runtime']['inputDriver'].ungrabAllDevices() | |
130 | 161 | except Exception as e: |
131 | pass | |
162 | return False | |
163 | return True | |
132 | 164 | def handlePlugInputDevice(self, eventData): |
133 | self.env['runtime']['inputManager'].updateInputDevices(eventData) | |
134 | ||
165 | for deviceEntry in eventData: | |
166 | self.updateInputDevices(deviceEntry['device']) | |
135 | 167 | def updateInputDevices(self, newDevice = None): |
136 | 168 | try: |
137 | self.env['runtime']['inputDriver'].updateInputDevices(newDevice) | |
138 | except: | |
139 | pass | |
140 | self.setExecuteDeviceGrab() | |
169 | self.env['runtime']['inputDriver'].updateInputDevices(newDevice) | |
170 | except: | |
171 | pass | |
141 | 172 | try: |
142 | 173 | if self.env['runtime']['screenManager']: |
143 | self.handleDeviceGrab() | |
174 | self.handleDeviceGrab(force = True) | |
144 | 175 | except: |
145 | 176 | pass |
146 | 177 | def removeAllDevices(self): |
156 | 187 | return '' |
157 | 188 | eventName = eventName.upper() |
158 | 189 | if eventName == 'KEY_LEFTCTRL': |
159 | eventName = 'KEY_CTRL' | |
190 | eventName = 'KEY_CTRL' | |
160 | 191 | elif eventName == 'KEY_RIGHTCTRL': |
161 | 192 | eventName = 'KEY_CTRL' |
162 | 193 | elif eventName == 'KEY_LEFTSHIFT': |
170 | 201 | elif eventName == 'KEY_LEFTMETA': |
171 | 202 | eventName = 'KEY_META' |
172 | 203 | elif eventName == 'KEY_RIGHTMETA': |
173 | eventName = 'KEY_META' | |
204 | eventName = 'KEY_META' | |
174 | 205 | if self.isFenrirKey(eventName): |
175 | 206 | eventName = 'KEY_FENRIR' |
176 | 207 | if self.isScriptKey(eventName): |
177 | eventName = 'KEY_SCRIPT' | |
208 | eventName = 'KEY_SCRIPT' | |
178 | 209 | return eventName |
179 | 210 | |
180 | 211 | def clearEventBuffer(self): |
181 | 212 | try: |
182 | 213 | self.env['runtime']['inputDriver'].clearEventBuffer() |
183 | 214 | except Exception as e: |
184 | pass | |
215 | pass | |
185 | 216 | def setLastDeepestInput(self, currentDeepestInput): |
186 | 217 | self.lastDeepestInput = currentDeepestInput |
187 | 218 | def clearLastDeepInput(self): |
188 | self.lastDeepestInput = [] | |
219 | self.lastDeepestInput = [] | |
189 | 220 | def getLastInputTime(self): |
190 | return self.lastInputTime | |
221 | return self.lastInputTime | |
191 | 222 | def getLastDeepestInput(self): |
192 | 223 | return self.lastDeepestInput |
193 | 224 | def writeEventBuffer(self): |
208 | 239 | shortcut.append(self.env['input']['shortcutRepeat']) |
209 | 240 | shortcut.append(self.getLastDeepestInput()) |
210 | 241 | return str(shortcut) |
211 | ||
242 | ||
212 | 243 | def getPrevShortcut(self): |
213 | 244 | shortcut = [] |
214 | 245 | shortcut.append(self.env['input']['shortcutRepeat']) |
220 | 251 | shortcut.append(self.env['input']['shortcutRepeat']) |
221 | 252 | if inputSequence: |
222 | 253 | shortcut.append(inputSequence) |
223 | else: | |
254 | else: | |
224 | 255 | shortcut.append(self.env['input']['currInput']) |
225 | 256 | if len(self.env['input']['prevInput']) < len(self.env['input']['currInput']): |
226 | 257 | if self.env['input']['shortcutRepeat'] > 1 and not self.shortcutExists(str(shortcut)): |
227 | 258 | shortcut = [] |
228 | 259 | self.env['input']['shortcutRepeat'] = 1 |
229 | 260 | shortcut.append(self.env['input']['shortcutRepeat']) |
230 | shortcut.append(self.env['input']['currInput']) | |
231 | self.env['runtime']['debug'].writeDebugOut("currShortcut " + str(shortcut) ,debug.debugLevel.INFO) | |
261 | shortcut.append(self.env['input']['currInput']) | |
262 | self.env['runtime']['debug'].writeDebugOut("currShortcut " + str(shortcut) ,debug.debugLevel.INFO) | |
232 | 263 | return str(shortcut) |
233 | ||
264 | ||
234 | 265 | def currKeyIsModifier(self): |
235 | 266 | if len(self.getLastDeepestInput()) != 1: |
236 | 267 | return False |
237 | 268 | return (self.env['input']['currInput'][0] =='KEY_FENRIR') or (self.env['input']['currInput'][0] == 'KEY_SCRIPT') |
238 | ||
269 | ||
239 | 270 | def isFenrirKey(self, eventName): |
240 | 271 | return eventName in self.env['input']['fenrirKey'] |
241 | ||
272 | ||
242 | 273 | def isScriptKey(self, eventName): |
243 | 274 | return eventName in self.env['input']['scriptKey'] |
244 | ||
275 | ||
245 | 276 | def getCommandForShortcut(self, shortcut): |
246 | 277 | if not self.shortcutExists(shortcut): |
247 | 278 | return '' |
248 | 279 | return self.env['bindings'][shortcut] |
280 | def keyEcho(self, eventData = None): | |
281 | if not eventData: | |
282 | eventData = self.getLastEvent() | |
283 | if not eventData: | |
284 | return | |
285 | keyName = '' | |
286 | if eventData['EventState'] == 1: | |
287 | keyName = eventData['EventName'].lower() | |
288 | if keyName.startswith('key_'): | |
289 | keyName = keyName[4:] | |
290 | self.env['runtime']['outputManager'].presentText(_(keyName), interrupt=True) | |
249 | 291 | |
250 | 292 | def shortcutExists(self, shortcut): |
251 | 293 | return(shortcut in self.env['bindings']) |
258 | 300 | break |
259 | 301 | line = line.replace('\n','') |
260 | 302 | if line.replace(" ","") == '': |
261 | continue | |
303 | continue | |
262 | 304 | if line.replace(" ","").startswith("#"): |
263 | 305 | continue |
264 | 306 | if line.count("=") != 1: |
277 | 319 | shortcutRepeat = int(key) |
278 | 320 | except: |
279 | 321 | if not self.isValidKey(key.upper()): |
280 | self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' command:' +commandName ,debug.debugLevel.WARNING) | |
322 | self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' command:' +commandName ,debug.debugLevel.WARNING) | |
281 | 323 | invalid = True |
282 | 324 | break |
283 | 325 | shortcutKeys.append(key.upper()) |
286 | 328 | shortcut.append(shortcutRepeat) |
287 | 329 | shortcut.append(sorted(shortcutKeys)) |
288 | 330 | if len(shortcutKeys) != 1 and not 'KEY_FENRIR' in shortcutKeys: |
289 | self.env['runtime']['debug'].writeDebugOut("invalid shortcut (missing KEY_FENRIR): "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.ERROR) | |
290 | continue | |
331 | self.env['runtime']['debug'].writeDebugOut("invalid shortcut (missing KEY_FENRIR): "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.ERROR) | |
332 | continue | |
291 | 333 | self.env['runtime']['debug'].writeDebugOut("Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO, onAnyLevel=True) |
292 | self.env['bindings'][str(shortcut)] = commandName | |
334 | self.env['bindings'][str(shortcut)] = commandName | |
335 | self.env['rawBindings'][str(shortcut)] = shortcut | |
293 | 336 | kbConfig.close() |
294 | 337 | # fix bindings |
295 | 338 | self.env['bindings'][str([1, ['KEY_F1', 'KEY_FENRIR']])] = 'TOGGLE_TUTORIAL_MODE' |
296 | 339 | def isValidKey(self, key): |
297 | return key in inputData.keyNames | |
340 | return key in inputData.keyNames | |
341 | def setLastDetectedDevices(self, devices): | |
342 | self.lastDetectedDevices =devices | |
343 | def getLastDetectedDevices(self): | |
344 | return self.lastDetectedDevices |
134 | 134 | else: |
135 | 135 | displayText = self.getBrailleTextWithOffset(self.env['output']['messageText'], self.env['output']['messageOffset']) |
136 | 136 | self.env['runtime']['brailleDriver'].writeText('flush'+displayText) |
137 | ||
137 | def resetSpeechDriver(self): | |
138 | try: | |
139 | self.env['runtime']['speechDriver'].reset() | |
140 | except Exception as e: | |
141 | self.env['runtime']['debug'].writeDebugOut("reset " + str(e),debug.debugLevel.ERROR) | |
142 | ||
138 | 143 | def getBrailleCursor(self): |
139 | 144 | if self.env['runtime']['settingsManager'].getSetting('braille', 'cursorFollowMode').upper() == 'REVIEW': |
140 | 145 | return self.env['runtime']['cursorManager'].getReviewOrTextCursor() |
262 | 267 | if not self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'): |
263 | 268 | self.env['runtime']['debug'].writeDebugOut("Sound disabled in outputManager.speakText",debug.debugLevel.INFO) |
264 | 269 | return False |
265 | ||
270 | ||
271 | try: | |
272 | e = self.env['soundIcons'][soundIcon] | |
273 | except: | |
274 | self.env['runtime']['debug'].writeDebugOut("SoundIcon doesnt exist: " + soundIcon, debug.debugLevel.WARNING) | |
275 | return False | |
276 | ||
266 | 277 | if self.env['runtime']['soundDriver'] == None: |
267 | 278 | self.env['runtime']['debug'].writeDebugOut("No speechDriver in outputManager.speakText",debug.debugLevel.ERROR) |
268 | return False | |
279 | return False | |
280 | ||
269 | 281 | try: |
270 | 282 | self.env['runtime']['soundDriver'].setVolume(self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')) |
283 | except Exception as e: | |
284 | self.env['runtime']['debug'].writeDebugOut("outputManager.playSoundIcon::setVolume: " + str(e),debug.debugLevel.ERROR) | |
285 | ||
286 | try: | |
271 | 287 | self.env['runtime']['soundDriver'].playSoundFile(self.env['soundIcons'][soundIcon], interrupt) |
272 | 288 | return True |
273 | 289 | except Exception as e: |
274 | self.env['runtime']['debug'].writeDebugOut("\"playSoundIcon\" in outputManager.speakText ",debug.debugLevel.ERROR) | |
275 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
290 | self.env['runtime']['debug'].writeDebugOut("outputManager.playSoundIcon::playSoundFile: " + str(e),debug.debugLevel.ERROR) | |
291 | return False | |
292 | ||
276 | 293 | return False |
294 | def tempDisableSpeech(self): | |
295 | if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'): | |
296 | self.presentText(_("speech temporary disabled"), soundIcon='SpeechOff', interrupt=True) | |
297 | self.env['commandBuffer']['enableSpeechOnKeypress'] = True | |
298 | self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'))) | |
299 | self.interruptOutput() | |
277 | 300 | def announceActiveCursor(self, interrupt_p=False): |
278 | 301 | if self.env['runtime']['cursorManager'].isReviewMode(): |
279 | 302 | self.presentText(' review cursor ', interrupt=interrupt_p) |
22 | 22 | |
23 | 23 | def terminateAllProcesses(self): |
24 | 24 | for proc in self._Processes: |
25 | try: | |
26 | proc.terminate() | |
27 | except KeyboardInterrupt: | |
28 | pass | |
29 | except: | |
30 | pass | |
31 | proc.join() | |
25 | #try: | |
26 | # proc.terminate() | |
27 | #except KeyboardInterrupt: | |
28 | # pass | |
29 | #except: | |
30 | # pass | |
31 | proc.join() | |
32 | 32 | for t in self._Threads: |
33 | t.join() | |
33 | t.join() | |
34 | 34 | def heartBeatTimer(self, active): |
35 | 35 | try: |
36 | 36 | time.sleep(0.5) |
5 | 5 | |
6 | 6 | from fenrirscreenreader.core import debug |
7 | 7 | import string |
8 | from collections import OrderedDict | |
8 | 9 | |
9 | 10 | punctuationData = { |
10 | 11 | 'LEVELDICT':{ |
14 | 15 | 'all': string.punctuation + ' §', |
15 | 16 | }, |
16 | 17 | 'PUNCTDICT':{ |
17 | ' ':'space', | |
18 | '&':'and', | |
19 | "'":"apostrophe", | |
20 | '@':'at', | |
21 | '\\':'backslash', | |
22 | '|':'bar', | |
23 | '!':'bang', | |
24 | '^':'carrot', | |
25 | ':':'colon', | |
26 | ',':'comma', | |
27 | '-':'dash', | |
28 | '$':'dollar', | |
29 | '.':'dot', | |
30 | '>':'greater', | |
31 | '`':'grave', | |
32 | '#':'hash', | |
33 | '{':'left brace', | |
34 | '[':'left bracket', | |
35 | '(':'left paren', | |
36 | '<':'less', | |
37 | '%':'percent', | |
38 | '+':'plus', | |
39 | '?':'question', | |
40 | '"':'quote', | |
41 | ')':'right paren', | |
42 | '}':'right brace', | |
43 | ']':'right bracket', | |
44 | ';':'semicolon', | |
45 | '/':'slash', | |
46 | '*':'star', | |
47 | '~':'tilde', | |
48 | '_':'line', | |
49 | '=':'equals', | |
50 | 18 | }, |
51 | 'CUSTOMDICT':{ | |
52 | }, | |
53 | 'EMOTICONDICT':{ | |
54 | ':)':'smiley', | |
55 | ';)':'winking face', | |
56 | 'XD':'loool', | |
57 | ':@':'angry face', | |
58 | ':D':'lought' | |
59 | }, | |
19 | 'CUSTOMDICT':OrderedDict(), | |
20 | 'EMOTICONDICT':OrderedDict(), | |
60 | 21 | } |
32 | 32 | del currAllPunctNone[ord(char)] |
33 | 33 | except: |
34 | 34 | pass |
35 | return text.translate(currAllPunctNone) | |
36 | ||
35 | return text.translate(currAllPunctNone) | |
37 | 36 | def useCustomDict(self, text, customDict, seperator=''): |
38 | 37 | resultText = str(text) |
39 | 38 | if customDict: |
40 | 39 | for key,item in customDict.items(): |
41 | resultText = resultText.replace(str(key),seperator + str(item) + seperator) | |
40 | try: | |
41 | regexLbl = 'REGEX;' | |
42 | if key.upper().startswith(regexLbl) and (len(key) > len(regexLbl)): | |
43 | resultText = re.sub(str(key[len(regexLbl):]), seperator + str(item) + seperator, resultText) | |
44 | else: | |
45 | resultText = resultText.replace(str(key),seperator + str(item) + seperator) | |
46 | except Exception as e: | |
47 | self.env['runtime']['debug'].writeDebugOut("useCustomDict replace:'" + key + "' with '" + item +"' failed:" + str(e),debug.debugLevel.ERROR, onAnyLevel=False) | |
42 | 48 | return resultText |
43 | ||
44 | 49 | def usePunctuationDict(self, text, punctuationDict, punctuation): |
45 | 50 | resultText = str(text) |
46 | 51 | |
48 | 53 | if ' ' in punctuation: |
49 | 54 | resultText = resultText.replace(' ',' ' + punctuationDict[' '] + ' ') |
50 | 55 | for key,item in punctuationDict.items(): |
51 | if key in punctuation and key not in ' ': | |
56 | if (punctuation != '' and key in punctuation) and key not in ' ': | |
52 | 57 | if self.env['runtime']['settingsManager'].getSetting('general', 'respectPunctuationPause') and \ |
53 | 58 | len(key) == 1 and \ |
54 | 59 | key in "',.;:?!": |
55 | resultText = resultText.replace(str(key),' ' +str(item) + str(key) + ' ') | |
60 | resultText = resultText.replace(str(key),' ' +str(item) + str(key) + ' ') | |
56 | 61 | else: |
57 | 62 | resultText = resultText.replace(str(key),' ' +str(item) + ' ') |
58 | 63 | return resultText |
95 | 100 | if line.replace(" ","") == '': |
96 | 101 | continue |
97 | 102 | if line.replace(" ","").startswith("#"): |
98 | continue | |
103 | if not line.replace(" ","").startswith("#:===:"): | |
104 | continue | |
99 | 105 | if line.replace(" ","").upper().startswith("[") and \ |
100 | 106 | line.replace(" ","").upper().endswith("DICT]"): |
101 | 107 | currDictName = line[line.find('[') + 1 :line.upper().find('DICT]') + 4].upper() |
113 | 119 | sepLine[1] = ':===:' |
114 | 120 | self.env['punctuation'][currDictName][sepLine[0]] = sepLine[1] |
115 | 121 | self.env['runtime']['debug'].writeDebugOut("Punctuation: " + currDictName + '.' + str(sepLine[0]) + ' :' + sepLine[1] ,debug.debugLevel.INFO, onAnyLevel=True) |
116 | dictConfig.close() | |
122 | dictConfig.close() |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.core.settingsData import settingsData | |
8 | ||
9 | class quickMenuManager(): | |
10 | def __init__(self): | |
11 | self.position = 0 | |
12 | self.quickMenu = [] | |
13 | self.settings = settingsData | |
14 | ||
15 | def initialize(self, environment): | |
16 | self.env = environment | |
17 | self.loadMenu(self.env['runtime']['settingsManager'].getSetting('menu', 'quickMenu')) | |
18 | def shutdown(self): | |
19 | pass | |
20 | def loadMenu(self, menuString): | |
21 | self.position = 0 | |
22 | self.quickMenu = [] | |
23 | if menuString == '': | |
24 | return | |
25 | entrys = menuString.split(';') | |
26 | for e in entrys: | |
27 | entry = e.split('#') | |
28 | if len(entry) != 2: | |
29 | continue | |
30 | try: | |
31 | t = self.settings[entry[0]][entry[1]] | |
32 | except: | |
33 | print(entry[0],entry[1], 'not found') | |
34 | continue | |
35 | self.quickMenu.append({'section': entry[0], 'setting': entry[1]}) | |
36 | def nextEntry(self): | |
37 | if len(self.quickMenu) == 0: | |
38 | return False | |
39 | self.position += 1 | |
40 | if self.position >= len(self.quickMenu): | |
41 | self.position = 0 | |
42 | return True | |
43 | def prevEntry(self): | |
44 | if len(self.quickMenu) == 0: | |
45 | return False | |
46 | self.position -= 1 | |
47 | if self.position < 0: | |
48 | self.position = len(self.quickMenu) - 1 | |
49 | return True | |
50 | def nextValue(self): | |
51 | if len(self.quickMenu) == 0: | |
52 | return False | |
53 | section = self.quickMenu[self.position]['section'] | |
54 | setting = self.quickMenu[self.position]['setting'] | |
55 | valueString = '' | |
56 | try: | |
57 | valueString = self.env['runtime']['settingsManager'].getSetting(section, setting) | |
58 | except: | |
59 | return False | |
60 | ||
61 | try: | |
62 | if isinstance(self.settings[section][setting], str): | |
63 | value = str(valueString) | |
64 | return False | |
65 | elif isinstance(self.settings[section][setting], bool): | |
66 | if not valueString in ['True','False']: | |
67 | return False | |
68 | value = not value | |
69 | self.env['runtime']['settingsManager'].setSetting(section, setting, str(value)) | |
70 | elif isinstance(self.settings[section][setting], int): | |
71 | value = int(valueString) | |
72 | value += 1 | |
73 | self.env['runtime']['settingsManager'].setSetting(section, setting, str(value)) | |
74 | elif isinstance(self.settings[section][setting], float): | |
75 | value = float(valueString) | |
76 | value += 0.05 | |
77 | if value > 1.0: | |
78 | value = 1.0 | |
79 | self.env['runtime']['settingsManager'].setSetting(section, setting, str(value)[:4]) | |
80 | except Exception as e: | |
81 | return False | |
82 | return True | |
83 | def prevValue(self): | |
84 | if len(self.quickMenu) == 0: | |
85 | return False | |
86 | section = self.quickMenu[self.position]['section'] | |
87 | setting = self.quickMenu[self.position]['setting'] | |
88 | valueString = '' | |
89 | try: | |
90 | valueString = self.env['runtime']['settingsManager'].getSetting(section, setting) | |
91 | except: | |
92 | return False | |
93 | try: | |
94 | if isinstance(self.settings[section][setting], str): | |
95 | value = str(valueString) | |
96 | return False | |
97 | elif isinstance(self.settings[section][setting], bool): | |
98 | if not valueString in ['True','False']: | |
99 | return False | |
100 | value = not value | |
101 | self.env['runtime']['settingsManager'].setSetting(section, setting, str(value)) | |
102 | elif isinstance(self.settings[section][setting], int): | |
103 | value = int(valueString) | |
104 | value -= 1 | |
105 | if value < 0: | |
106 | value = 0 | |
107 | self.env['runtime']['settingsManager'].setSetting(section, setting, str(value)) | |
108 | elif isinstance(self.settings[section][setting], float): | |
109 | value = float(valueString) | |
110 | value -= 0.05 | |
111 | if value < 0.0: | |
112 | value = 0.0 | |
113 | self.env['runtime']['settingsManager'].setSetting(section, setting, str(value)[:4]) | |
114 | except Exception as e: | |
115 | return False | |
116 | return True | |
117 | def getCurrentEntry(self): | |
118 | if len(self.quickMenu) == 0: | |
119 | return '' | |
120 | try: | |
121 | return _(self.quickMenu[self.position]['section']) + ' ' + _(self.quickMenu[self.position]['setting']) | |
122 | except: | |
123 | return _('setting invalid') | |
124 | def getCurrentValue(self): | |
125 | if len(self.quickMenu) == 0: | |
126 | return '' | |
127 | try: | |
128 | return self.env['runtime']['settingsManager'].getSetting(self.quickMenu[self.position]['section'], self.quickMenu[self.position]['setting']) | |
129 | except: | |
130 | return _('setting value invalid') |
34 | 34 | # command controll |
35 | 35 | self.commandConst = 'COMMAND ' |
36 | 36 | self.sayConst = 'SAY ' |
37 | self.vmenuConst = 'VMENU ' | |
38 | self.resetVmenuConst = 'RESETVMENU' | |
37 | 39 | self.interruptConst = 'INTERRUPT' |
40 | self.quitAppConst = 'QUITAPPLICATION' | |
41 | self.tempDisableSpeechConst = 'TEMPDISABLESPEECH' | |
38 | 42 | self.defineWindowConst = 'WINDOW ' |
39 | 43 | self.resetWindowConst = 'RESETWINDOW' |
44 | self.setClipboardConst = 'CLIPBOARD ' | |
40 | 45 | # setting controll |
41 | 46 | self.settingConst = 'SETTING ' |
42 | 47 | self.setSettingConst = 'SET ' |
43 | self.saveSettingConst = 'SAVE ' | |
48 | self.saveAsSettingConst = 'SAVEAS ' | |
49 | self.saveSettingConst = 'SAVE' | |
44 | 50 | self.resetSettingConst = 'RESET' |
45 | 51 | def initialize(self, environment): |
46 | 52 | self.env = environment |
58 | 64 | if upperSettingsText.startswith(self.setSettingConst): |
59 | 65 | parameterText = settingsText[len(self.setSettingConst):] |
60 | 66 | self.setSettings(parameterText) |
67 | # save as setting | |
68 | elif upperSettingsText.startswith(self.saveAsSettingConst): | |
69 | parameterText = settingsText[len(self.saveAsSettingConst):] | |
70 | self.saveSettings(parameterText) | |
61 | 71 | # save setting |
62 | if upperSettingsText.startswith(self.saveSettingConst): | |
63 | parameterText = settingsText[len(self.saveSettingConst):] | |
64 | self.saveSettings(parameterText) | |
72 | elif upperSettingsText == self.saveSettingConst: | |
73 | self.saveSettings() | |
65 | 74 | # reset setting |
66 | if upperSettingsText.startswith(self.resetSettingConst): | |
75 | elif upperSettingsText == self.resetSettingConst: | |
67 | 76 | self.resetSettings() |
77 | ||
68 | 78 | def handleCommandExecution(self, commandText): |
69 | 79 | if not self.env['runtime']['settingsManager'].getSettingAsBool('remote', 'enableCommandRemote'): |
70 | 80 | return |
76 | 86 | parameterText = commandText[len(self.sayConst):] |
77 | 87 | self.say(parameterText) |
78 | 88 | # interrupt |
79 | if upperCommandText.startswith(self.interruptConst): | |
89 | elif upperCommandText == self.interruptConst: | |
80 | 90 | self.interruptSpeech() |
91 | # temp disable speech | |
92 | elif upperCommandText == self.tempDisableSpeechConst: | |
93 | self.tempDisableSpeech() | |
94 | # set vmenu | |
95 | elif upperCommandText.startswith(self.vmenuConst): | |
96 | parameterText = commandText[len(self.vmenuConst):] | |
97 | self.setVMenu(parameterText) | |
98 | # reset vmenu | |
99 | elif upperCommandText == self.resetVmenuConst: | |
100 | self.resetVMenu() | |
101 | # quit fenrir | |
102 | elif upperCommandText == self.quitAppConst: | |
103 | self.quitFenrir() | |
81 | 104 | # define window |
82 | if upperCommandText.startswith(self.defineWindowConst): | |
105 | elif upperCommandText.startswith(self.defineWindowConst): | |
83 | 106 | parameterText = commandText[len(self.defineWindowConst):] |
84 | 107 | self.defineWindow(parameterText) |
85 | 108 | # reset window |
86 | if upperCommandText.startswith(self.resetWindowConst): | |
109 | elif upperCommandText == self.resetWindowConst: | |
87 | 110 | self.resetWindow() |
111 | # set clipboard | |
112 | elif upperCommandText.startswith(self.setClipboardConst): | |
113 | parameterText = commandText[len(self.setClipboardConst):] | |
114 | self.setClipboard(parameterText) | |
115 | def tempDisableSpeech(self): | |
116 | self.env['runtime']['outputManager'].tempDisableSpeech() | |
117 | def setVMenu(self, vmenu = ''): | |
118 | self.env['runtime']['vmenuManager'].setCurrMenu(vmenu) | |
119 | def resetVMenu(self): | |
120 | self.env['runtime']['vmenuManager'].setCurrMenu() | |
121 | def setClipboard(self, text = ''): | |
122 | self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', text) | |
123 | def quitFenrir(self): | |
124 | self.env['runtime']['eventManager'].stopMainEventLoop() | |
88 | 125 | def defineWindow(self, windowText): |
89 | 126 | start = {} |
90 | 127 | end = {} |
110 | 147 | self.env['runtime']['outputManager'].speakText(text) |
111 | 148 | def interruptSpeech(self): |
112 | 149 | self.env['runtime']['outputManager'].interruptOutput() |
113 | def saveSettings(self, settingConfigPath): | |
150 | def saveSettings(self, settingConfigPath = None): | |
114 | 151 | if not settingConfigPath: |
115 | return | |
152 | settingConfigPath = self.env['runtime']['settingsManager'].getSettingsFile() | |
116 | 153 | if settingConfigPath == '': |
117 | 154 | return |
118 | 155 | self.env['runtime']['settingsManager'].saveSettings(settingConfigPath) |
120 | 157 | self.env['runtime']['settingsManager'].resetSettingArgDict() |
121 | 158 | def setSettings(self, settingsArgs): |
122 | 159 | self.env['runtime']['settingsManager'].parseSettingArgs(settingsArgs) |
160 | self.env['runtime']['screenManager'].updateScreenIgnored() | |
161 | self.env['runtime']['inputManager'].handleDeviceGrab(force = True) | |
123 | 162 | def handleRemoteIncomming(self, eventData): |
124 | 163 | if not eventData: |
125 | 164 | return |
126 | 165 | upperEventData = eventData.upper() |
127 | 166 | self.env['runtime']['debug'].writeDebugOut('remoteManager:handleRemoteIncomming: event: ' + str(eventData),debug.debugLevel.INFO) |
128 | ||
167 | ||
129 | 168 | if upperEventData.startswith(self.settingConst): |
130 | 169 | settingsText = eventData[len(self.settingConst):] |
131 | 170 | self.handleSettingsChange(settingsText) |
23 | 23 | def initialize(self, environment): |
24 | 24 | self.env = environment |
25 | 25 | self.env['runtime']['settingsManager'].loadDriver(\ |
26 | self.env['runtime']['settingsManager'].getSetting('screen', 'driver'), 'screenDriver') | |
27 | self.getCurrScreen() | |
26 | self.env['runtime']['settingsManager'].getSetting('screen', 'driver'), 'screenDriver') | |
28 | 27 | self.getCurrScreen() |
29 | self.getSessionInformation() | |
28 | self.getCurrScreen() | |
29 | self.getSessionInformation() | |
30 | 30 | self.updateScreenIgnored() |
31 | self.updateScreenIgnored() | |
31 | self.updateScreenIgnored() | |
32 | 32 | def resetScreenText(self, screenText): |
33 | 33 | self.prevScreenText = '' |
34 | self.currScreenText = screenText | |
34 | self.currScreenText = screenText | |
35 | 35 | def setScreenText(self, screenText): |
36 | 36 | self.prevScreenText = self.currScreenText |
37 | 37 | self.currScreenText = screenText |
43 | 43 | except: |
44 | 44 | pass |
45 | 45 | def getSessionInformation(self): |
46 | try: | |
46 | try: | |
47 | 47 | self.env['runtime']['screenDriver'].getSessionInformation() |
48 | 48 | except: |
49 | pass | |
50 | ||
49 | pass | |
51 | 50 | def shutdown(self): |
52 | 51 | self.env['runtime']['settingsManager'].shutdownDriver('screenDriver') |
53 | 52 | def isCurrScreenIgnoredChanged(self): |
54 | 53 | return self.getCurrScreenIgnored() != self.getPrevScreenIgnored() |
55 | 54 | def hanldeScreenChange(self, eventData): |
56 | 55 | self.getCurrScreen() |
57 | self.getSessionInformation() | |
58 | self.updateScreenIgnored() | |
56 | self.getSessionInformation() | |
57 | self.updateScreenIgnored() | |
59 | 58 | if self.isCurrScreenIgnoredChanged(): |
60 | 59 | self.env['runtime']['inputManager'].setExecuteDeviceGrab() |
61 | self.env['runtime']['inputManager'].handleDeviceGrab() | |
62 | ||
63 | if self.isScreenChange(): | |
60 | self.env['runtime']['inputManager'].handleDeviceGrab() | |
61 | if self.isScreenChange(): | |
64 | 62 | self.changeBrailleScreen() |
65 | ||
66 | if not self.isSuspendingScreen(self.env['screen']['newTTY']): | |
63 | if not self.isSuspendingScreen(self.env['screen']['newTTY']): | |
67 | 64 | self.update(eventData, 'onScreenChange') |
68 | 65 | self.env['screen']['lastScreenUpdate'] = time.time() |
69 | 66 | else: |
70 | self.env['runtime']['outputManager'].interruptOutput() | |
71 | ||
67 | self.env['runtime']['outputManager'].interruptOutput() | |
72 | 68 | def handleScreenUpdate(self, eventData): |
73 | 69 | self.env['screen']['oldApplication'] = self.env['screen']['newApplication'] |
74 | 70 | self.updateScreenIgnored() |
75 | 71 | if self.isCurrScreenIgnoredChanged(): |
76 | 72 | self.env['runtime']['inputManager'].setExecuteDeviceGrab() |
77 | self.env['runtime']['inputManager'].handleDeviceGrab() | |
78 | if not self.getCurrScreenIgnored(): | |
73 | self.env['runtime']['inputManager'].handleDeviceGrab() | |
74 | if not self.getCurrScreenIgnored(): | |
79 | 75 | self.update(eventData, 'onScreenUpdate') |
80 | 76 | #if trigger == 'onUpdate' or self.isScreenChange() \ |
81 | 77 | # or len(self.env['screen']['newDelta']) > 6: |
82 | # self.env['runtime']['screenDriver'].getCurrApplication() | |
78 | # self.env['runtime']['screenDriver'].getCurrApplication() | |
83 | 79 | self.env['screen']['lastScreenUpdate'] = time.time() |
84 | elif self.isCurrScreenIgnoredChanged(): | |
85 | self.env['runtime']['outputManager'].interruptOutput() | |
80 | elif self.isCurrScreenIgnoredChanged(): | |
81 | self.env['runtime']['outputManager'].interruptOutput() | |
86 | 82 | def getCurrScreenIgnored(self): |
87 | 83 | return self.currScreenIgnored |
88 | 84 | def getPrevScreenIgnored(self): |
89 | return self.prevScreenIgnored | |
85 | return self.prevScreenIgnored | |
90 | 86 | def updateScreenIgnored(self): |
91 | self.prevScreenIgnored = self.currScreenIgnored | |
92 | self.currScreenIgnored = self.isSuspendingScreen(self.env['screen']['newTTY']) | |
87 | self.prevScreenIgnored = self.currScreenIgnored | |
88 | self.currScreenIgnored = self.isSuspendingScreen(self.env['screen']['newTTY']) | |
93 | 89 | def update(self, eventData, trigger='onUpdate'): |
94 | 90 | # set new "old" values |
95 | 91 | self.env['screen']['oldContentBytes'] = self.env['screen']['newContentBytes'] |
96 | 92 | self.env['screen']['oldContentText'] = self.env['screen']['newContentText'] |
97 | self.env['screen']['oldCursor'] = self.env['screen']['newCursor'].copy() | |
93 | self.env['screen']['oldCursor'] = self.env['screen']['newCursor'].copy() | |
98 | 94 | self.env['screen']['oldDelta'] = self.env['screen']['newDelta'] |
99 | 95 | self.env['screen']['oldNegativeDelta'] = self.env['screen']['newNegativeDelta'] |
100 | 96 | self.env['screen']['newContentBytes'] = eventData['bytes'] |
103 | 99 | self.env['screen']['lines'] = int( eventData['lines']) |
104 | 100 | self.env['screen']['columns'] = int( eventData['columns']) |
105 | 101 | self.colums = int( eventData['columns']) |
106 | self.rows = int( eventData['lines']) | |
102 | self.rows = int( eventData['lines']) | |
107 | 103 | self.env['screen']['newCursor']['x'] = int( eventData['textCursor']['x']) |
108 | 104 | self.env['screen']['newCursor']['y'] = int( eventData['textCursor']['y']) |
109 | 105 | self.env['screen']['newTTY'] = eventData['screen'] |
112 | 108 | # screen change |
113 | 109 | if self.isScreenChange(): |
114 | 110 | self.env['screen']['oldContentBytes'] = b'' |
115 | self.resetScreenText(eventData['text']) | |
111 | self.resetScreenText(eventData['text']) | |
116 | 112 | self.env['runtime']['attributeManager'].resetAttributes(eventData['attributes']) |
117 | self.env['runtime']['attributeManager'].resetAttributeCursor() | |
113 | self.env['runtime']['attributeManager'].resetAttributeCursor() | |
118 | 114 | self.env['screen']['oldContentText'] = '' |
119 | 115 | self.env['screen']['oldCursor']['x'] = 0 |
120 | 116 | self.env['screen']['oldCursor']['y'] = 0 |
121 | self.env['screen']['oldDelta'] = '' | |
122 | self.env['screen']['oldNegativeDelta'] = '' | |
117 | self.env['screen']['oldDelta'] = '' | |
118 | self.env['screen']['oldNegativeDelta'] = '' | |
123 | 119 | else: |
124 | self.setScreenText(eventData['text']) | |
120 | self.setScreenText(eventData['text']) | |
125 | 121 | self.env['runtime']['attributeManager'].setAttributes(eventData['attributes']) |
126 | 122 | # initialize current deltas |
127 | 123 | self.env['screen']['newNegativeDelta'] = '' |
130 | 126 | |
131 | 127 | # changes on the screen |
132 | 128 | oldScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['oldContentText'])) |
133 | newScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['newContentText'])) | |
129 | newScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['newContentText'])) | |
134 | 130 | typing = False |
135 | diffList = [] | |
136 | ||
131 | diffList = [] | |
132 | ||
137 | 133 | if (self.env['screen']['oldContentText'] != self.env['screen']['newContentText']): |
138 | 134 | if self.env['screen']['newContentText'] != '' and self.env['screen']['oldContentText'] == '': |
139 | 135 | if oldScreenText == '' and\ |
141 | 137 | self.env['screen']['newDelta'] = newScreenText |
142 | 138 | else: |
143 | 139 | cursorLineStart = self.env['screen']['newCursor']['y'] * self.env['screen']['columns'] + self.env['screen']['newCursor']['y'] |
144 | cursorLineEnd = cursorLineStart + self.env['screen']['columns'] | |
140 | cursorLineEnd = cursorLineStart + self.env['screen']['columns'] | |
145 | 141 | if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) >= 1 and \ |
146 | 142 | self.env['screen']['oldCursor']['y'] == self.env['screen']['newCursor']['y'] and \ |
147 | 143 | self.env['screen']['newContentText'][:cursorLineStart] == self.env['screen']['oldContentText'][:cursorLineStart] and \ |
151 | 147 | #if cursorLineStart < cursorLineStart + self.env['screen']['newCursor']['x'] - 4: |
152 | 148 | # cursorLineStartOffset = cursorLineStart + self.env['screen']['newCursor']['x'] - 4 |
153 | 149 | if cursorLineEnd > cursorLineStart + self.env['screen']['newCursor']['x'] + 3: |
154 | cursorLineEndOffset = cursorLineStart + self.env['screen']['newCursor']['x'] + 3 | |
150 | cursorLineEndOffset = cursorLineStart + self.env['screen']['newCursor']['x'] + 3 | |
155 | 151 | oldScreenText = self.env['screen']['oldContentText'][cursorLineStartOffset:cursorLineEndOffset] |
156 | 152 | # oldScreenText = re.sub(' +',' ',oldScreenText) |
157 | 153 | newScreenText = self.env['screen']['newContentText'][cursorLineStartOffset:cursorLineEndOffset] |
158 | 154 | #newScreenText = re.sub(' +',' ',newScreenText) |
159 | 155 | diff = self.differ.compare(oldScreenText, newScreenText) |
160 | 156 | diffList = list(diff) |
161 | typing = True | |
157 | typing = True | |
162 | 158 | tempNewDelta = ''.join(x[2:] for x in diffList if x[0] == '+') |
163 | 159 | if tempNewDelta.strip() != '': |
164 | 160 | if tempNewDelta != ''.join(newScreenText[self.env['screen']['oldCursor']['x']:self.env['screen']['newCursor']['x']].rstrip()): |
166 | 162 | typing = False |
167 | 163 | else: |
168 | 164 | diff = self.differ.compare(oldScreenText.split('\n'),\ |
169 | newScreenText.split('\n')) | |
165 | newScreenText.split('\n')) | |
170 | 166 | diffList = list(diff) |
171 | 167 | |
172 | 168 | if not typing: |
173 | 169 | self.env['screen']['newDelta'] = '\n'.join(x[2:] for x in diffList if x[0] == '+') |
174 | 170 | else: |
175 | self.env['screen']['newDelta'] = ''.join(x[2:] for x in diffList if x[0] == '+') | |
171 | self.env['screen']['newDelta'] = ''.join(x[2:] for x in diffList if x[0] == '+') | |
176 | 172 | self.env['screen']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x[0] == '-') |
177 | 173 | |
178 | 174 | # track highlighted |
180 | 176 | if self.env['runtime']['attributeManager'].isAttributeChange(): |
181 | 177 | if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'): |
182 | 178 | attributeDelta, attributeCursor = self.env['runtime']['attributeManager'].trackHighlights() |
183 | if attributeCursor: | |
179 | if attributeCursor: | |
184 | 180 | self.env['runtime']['attributeManager'].setAttributeCursor(attributeCursor) |
185 | self.env['runtime']['attributeManager'].setAttributeDelta(attributeDelta) | |
181 | self.env['runtime']['attributeManager'].setAttributeDelta(attributeDelta) | |
186 | 182 | except Exception as e: |
187 | 183 | self.env['runtime']['debug'].writeDebugOut('screenManager:update:highlight: ' + str(e),debug.debugLevel.ERROR) |
188 | 184 | |
192 | 188 | ignoreScreens = [] |
193 | 189 | fixIgnoreScreens = self.env['runtime']['settingsManager'].getSetting('screen', 'suspendingScreen') |
194 | 190 | if fixIgnoreScreens != '': |
195 | ignoreScreens.extend(fixIgnoreScreens.split(',')) | |
191 | ignoreScreens.extend(fixIgnoreScreens.split(',')) | |
196 | 192 | if self.env['runtime']['settingsManager'].getSettingAsBool('screen', 'autodetectSuspendingScreen'): |
197 | 193 | ignoreScreens.extend(self.env['screen']['autoIgnoreScreens']) |
198 | self.env['runtime']['debug'].writeDebugOut('screenManager:isSuspendingScreen ignore:' + str(ignoreScreens) + ' current:'+ str(screen ), debug.debugLevel.INFO) | |
194 | self.env['runtime']['debug'].writeDebugOut('screenManager:isSuspendingScreen ignore:' + str(ignoreScreens) + ' current:'+ str(screen ), debug.debugLevel.INFO) | |
199 | 195 | return (screen in ignoreScreens) |
200 | 196 | |
201 | 197 | def isScreenChange(self): |
207 | 203 | if ignoreSpace: |
208 | 204 | newDelta = newDelta.strip() |
209 | 205 | return newDelta != '' |
210 | def isNegativeDelta(self): | |
206 | def isNegativeDelta(self): | |
211 | 207 | return self.env['screen']['newNegativeDelta'] != '' |
212 | 208 | def getWindowAreaInText(self, text): |
213 | 209 | if not self.env['runtime']['cursorManager'].isApplicationWindowSet(): |
219 | 215 | for line in windowList: |
220 | 216 | windowText += line[self.env['commandBuffer']['windowArea'][currApp]['1']['x']:self.env['commandBuffer']['windowArea'][currApp]['2']['x'] + 1] + '\n' |
221 | 217 | return windowText |
222 | ||
218 | ||
223 | 219 | def injectTextToScreen(self, text, screen = None): |
224 | 220 | try: |
225 | 221 | self.env['runtime']['screenDriver'].injectTextToScreen(text, screen) |
239 | 235 | self.env['runtime']['debug'].writeDebugOut('screenManager:changeBrailleScreen:leveScreen ' + str(e),debug.debugLevel.ERROR) |
240 | 236 | if not self.isSuspendingScreen(): |
241 | 237 | try: |
242 | self.env['runtime']['brailleDriver'].enterScreen(self.env['screen']['newTTY']) | |
243 | except Exception as e: | |
238 | self.env['runtime']['brailleDriver'].enterScreen(self.env['screen']['newTTY']) | |
239 | except Exception as e: | |
244 | 240 | self.env['runtime']['debug'].writeDebugOut('screenManager:changeBrailleScreen:enterScreen ' + str(e),debug.debugLevel.ERROR) |
55 | 55 | 'general':{ |
56 | 56 | 'debugLevel': debug.debugLevel.DEACTIVE, |
57 | 57 | 'debugMode': 'FILE', |
58 | 'debugFile': '/var/log/fenrirscreenreader/fenrir.log', | |
58 | 'debugFile': '', | |
59 | 59 | 'punctuationProfile':'default', |
60 | 60 | 'punctuationLevel': 'some', |
61 | 61 | 'respectPunctuationPause':True, |
83 | 83 | 'enabled': True, |
84 | 84 | 'driver': 'unixDriver', |
85 | 85 | 'port': 22447, |
86 | 'socketpath':'/tmp/', | |
86 | 'socketFile':'', | |
87 | 87 | 'enableSettingsRemote': True, |
88 | 88 | 'enableCommandRemote': True, |
89 | 89 | }, |
97 | 97 | 'endOfScreen': True, |
98 | 98 | 'leaveReviewOnCursorChange': True, |
99 | 99 | 'leaveReviewOnScreenChange': True, |
100 | }, | |
101 | 'menu':{ | |
102 | 'vmenuPath': '', | |
103 | 'quickMenu': 'speech#rate;speech#pitch;speech#volume', | |
100 | 104 | }, |
101 | 105 | 'promote':{ |
102 | 106 | 'enabled': True, |
21 | 21 | from fenrirscreenreader.core import cursorManager |
22 | 22 | from fenrirscreenreader.core import applicationManager |
23 | 23 | from fenrirscreenreader.core import helpManager |
24 | from fenrirscreenreader.core import vmenuManager | |
24 | 25 | from fenrirscreenreader.core import textManager |
25 | 26 | from fenrirscreenreader.core import tableManager |
26 | 27 | from fenrirscreenreader.core import byteManager |
28 | 29 | from fenrirscreenreader.core import barrierManager |
29 | 30 | from fenrirscreenreader.core import remoteManager |
30 | 31 | from fenrirscreenreader.core import sayAllManager |
32 | from fenrirscreenreader.core import quickMenuManager | |
31 | 33 | from fenrirscreenreader.core import environment |
32 | 34 | from fenrirscreenreader.core.settingsData import settingsData |
33 | 35 | from fenrirscreenreader.core import debug |
37 | 39 | def __init__(self): |
38 | 40 | self.settings = settingsData |
39 | 41 | self.settingArgDict = {} |
42 | self.bindingsBackup = None | |
43 | self.settingsFile = '' | |
40 | 44 | def initialize(self, environment): |
41 | 45 | self.env = environment |
42 | 46 | def shutdown(self): |
43 | 47 | pass |
44 | ||
48 | def getBindingBackup(self): | |
49 | return self.bindingsBackup.copy() | |
45 | 50 | def loadSoundIcons(self, soundIconPath): |
46 | 51 | siConfig = open(soundIconPath + '/soundicons.conf',"r") |
47 | 52 | while(True): |
70 | 75 | self.env['soundIcons'][soundIcon] = soundIconFile |
71 | 76 | self.env['runtime']['debug'].writeDebugOut("SoundIcon: " + soundIcon + '.' + soundIconFile, debug.debugLevel.INFO, onAnyLevel=True) |
72 | 77 | siConfig.close() |
73 | ||
78 | def getSettingsFile(self): | |
79 | return self.settingsFile | |
80 | def setSettingsFile(self, settingsFile): | |
81 | if not os.path.exists(settingsFile): | |
82 | return | |
83 | if not os.access(settingsFile, os.R_OK): | |
84 | return | |
85 | self.settingsFile = settingsFile | |
74 | 86 | def loadSettings(self, settingConfigPath): |
75 | 87 | if not os.path.exists(settingConfigPath): |
76 | 88 | return False |
77 | 89 | if not os.access(settingConfigPath, os.R_OK): |
78 | 90 | return False |
79 | 91 | self.env['settings'] = ConfigParser() |
80 | self.env['settings'].read(settingConfigPath) | |
92 | try: | |
93 | self.env['settings'].read(settingConfigPath) | |
94 | except: | |
95 | return False | |
96 | self.setSettingsFile(settingConfigPath) | |
81 | 97 | return True |
82 | 98 | def saveSettings(self, settingConfigPath): |
83 | 99 | # set opt dict here |
194 | 210 | self.env['input']['scriptKey'].append(key) |
195 | 211 | def resetSettingArgDict(self): |
196 | 212 | self.settingArgDict = {} |
213 | self.env['runtime']['outputManager'].resetSpeechDriver() | |
197 | 214 | def setOptionArgDict(self, section, setting, value): |
198 | 215 | #section = section.lower() |
199 | 216 | #setting = setting.lower() |
222 | 239 | #self.env['runtime']['debug'].writeDebugOut('settingsManager:setOptionArgDict:Datatype missmatch: '+ section + '#' + setting + '=' + value + ' Error:' + str(e), debug.debugLevel.ERROR) |
223 | 240 | return |
224 | 241 | |
225 | ||
226 | ||
227 | 242 | def parseSettingArgs(self, settingArgs): |
228 | 243 | for optionElem in settingArgs.split(';'): |
229 | if len(optionElem.split('#',1)) != 2: | |
230 | continue | |
231 | if len(optionElem.split('#',1)[1].split('=',1)) != 2: | |
232 | continue | |
233 | ||
234 | section = str(optionElem.split('#',1)[0]) | |
235 | option = str(optionElem.split('#',1)[1].split('=',1)[0]) | |
236 | value = optionElem.split('#',1)[1].split('=',1)[1] | |
244 | settingValList = [] | |
245 | sectionOptionList = [] | |
246 | section = '' | |
247 | option = '' | |
248 | value = '' | |
249 | settingValList = optionElem.split('=',1) | |
250 | if len(settingValList) != 2: | |
251 | continue | |
252 | if '#' in settingValList[0]: | |
253 | sectionOptionList = settingValList[0].split('#', 1) | |
254 | elif '.' in settingValList[0]: | |
255 | sectionOptionList = settingValList[0].split('.', 1) | |
256 | elif ',' in settingValList[0]: | |
257 | sectionOptionList = settingValList[0].split(',', 1) | |
258 | elif '!' in settingValList[0]: | |
259 | sectionOptionList = settingValList[0].split('!', 1) | |
260 | else: | |
261 | continue | |
262 | if len(sectionOptionList) != 2: | |
263 | continue | |
264 | ||
265 | section = str(sectionOptionList[0]) | |
266 | option = str(sectionOptionList[1]) | |
267 | value = str(settingValList[1]) | |
237 | 268 | self.setOptionArgDict(section, option, value) |
238 | 269 | |
239 | 270 | def initFenrirConfig(self, cliArgs, fenrirManager = None, environment = environment.environment): |
276 | 307 | # TODO needs cleanup use dict |
277 | 308 | #self.setOptionArgDict('keyboard', 'keyboardLayout', 'pty') |
278 | 309 | self.setSetting('keyboard', 'keyboardLayout', 'pty') |
279 | self.setSetting('general', 'debugFile', '/tmp/fenrir-pty.log') | |
280 | 310 | if cliArgs.emulated_evdev: |
281 | 311 | self.setSetting('screen', 'driver', 'ptyDriver') |
282 | 312 | self.setSetting('keyboard', 'driver', 'evdevDriver') |
382 | 412 | environment['runtime']['barrierManager'].initialize(environment) |
383 | 413 | environment['runtime']['sayAllManager'] = sayAllManager.sayAllManager() |
384 | 414 | environment['runtime']['sayAllManager'].initialize(environment) |
415 | environment['runtime']['vmenuManager'] = vmenuManager.vmenuManager() | |
416 | environment['runtime']['vmenuManager'].initialize(environment) | |
417 | environment['runtime']['quickMenuManager'] = quickMenuManager.quickMenuManager() | |
418 | environment['runtime']['quickMenuManager'].initialize(environment) | |
419 | ||
420 | # only possible after having input and screen managers with clean buffer | |
421 | environment['runtime']['inputManager'].writeEventBuffer() | |
422 | environment['runtime']['inputManager'].handleDeviceGrab(force = True) | |
423 | ||
385 | 424 | environment['runtime']['debug'].writeDebugOut('\/-------environment-------\/',debug.debugLevel.INFO, onAnyLevel=True) |
386 | 425 | environment['runtime']['debug'].writeDebugOut(str(environment), debug.debugLevel.INFO, onAnyLevel=True) |
387 | 426 | environment['runtime']['debug'].writeDebugOut('\/-------settings.conf-------\/', debug.debugLevel.INFO, onAnyLevel=True) |
388 | 427 | environment['runtime']['debug'].writeDebugOut(str(environment['settings']._sections) , debug.debugLevel.INFO, onAnyLevel=True) |
389 | 428 | environment['runtime']['debug'].writeDebugOut('\/-------self.settingArgDict-------\/',debug.debugLevel.INFO, onAnyLevel=True) |
390 | 429 | environment['runtime']['debug'].writeDebugOut(str( self.settingArgDict) ,debug.debugLevel.INFO, onAnyLevel=True) |
430 | self.bindingsBackup = environment['bindings'].copy() | |
431 | ||
391 | 432 | return environment |
7 | 7 | |
8 | 8 | class speechDriver(): |
9 | 9 | def __init__(self): |
10 | pass | |
11 | def initialize(self, environment): | |
10 | 12 | self._isInitialized = False |
11 | 13 | self.language = None |
12 | 14 | self.voice = None |
14 | 16 | self.pitch = None |
15 | 17 | self.rate = None |
16 | 18 | self.volume = None |
17 | def initialize(self, environment): | |
18 | 19 | self.env = environment |
19 | self._isInitialized = True | |
20 | ||
20 | self._isInitialized = True | |
21 | 21 | def shutdown(self): |
22 | 22 | if self._isInitialized: |
23 | 23 | self.cancel() |
24 | self._isInitialized = False | |
24 | self._isInitialized = False | |
25 | 25 | |
26 | 26 | def speak(self,text, queueable=True): |
27 | 27 | if not self._isInitialized: |
31 | 31 | |
32 | 32 | def cancel(self): |
33 | 33 | if not self._isInitialized: |
34 | return | |
34 | return | |
35 | 35 | |
36 | 36 | def setCallback(self, callback): |
37 | 37 | if not self._isInitialized: |
38 | return | |
38 | return | |
39 | 39 | if not callback: |
40 | 40 | return |
41 | 41 | |
47 | 47 | if not self._isInitialized: |
48 | 48 | return |
49 | 49 | if voice == '': |
50 | return | |
50 | return | |
51 | 51 | self.voice = voice |
52 | 52 | |
53 | 53 | def setPitch(self, pitch): |
76 | 76 | if not isinstance(module, str): |
77 | 77 | return |
78 | 78 | if module == '': |
79 | return | |
79 | return | |
80 | 80 | self.module = module |
81 | ||
81 | def reset(self): | |
82 | self.shutdown() | |
83 | self.initialize(self.env) | |
82 | 84 | def setLanguage(self, language): |
83 | 85 | if not self._isInitialized: |
84 | 86 | return |
85 | 87 | if not isinstance(language, str): |
86 | 88 | return |
87 | 89 | if language == '': |
88 | return | |
90 | return | |
89 | 91 | self.language = language |
90 | 92 | def setVolume(self, volume): |
91 | 93 | if not self._isInitialized: |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | # Fenrir TTY screen reader | |
4 | # By Chrys, Storm Dragon, and contributers. | |
5 | ||
6 | from fenrirscreenreader.core import debug | |
7 | from fenrirscreenreader.utils import module_utils | |
8 | import os, inspect, time | |
9 | ||
10 | currentdir = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe())))) | |
11 | fenrirPath = os.path.dirname(currentdir) | |
12 | ||
13 | class vmenuManager(): | |
14 | def __init__(self): | |
15 | self.menuDict = {} | |
16 | self.currIndex = None | |
17 | self.currMenu = '' | |
18 | self.active = False | |
19 | self.reset = True | |
20 | self.useTimeout = True | |
21 | self.searchText = '' | |
22 | self.lastSearchTime = time.time() | |
23 | def initialize(self, environment): | |
24 | self.env = environment | |
25 | # use default path | |
26 | self.defaultVMenuPath = fenrirPath+ "/commands/vmenu-profiles/" + self.env['runtime']['inputManager'].getShortcutType() | |
27 | # if there is no user configuration | |
28 | if self.env['runtime']['settingsManager'].getSetting('menu', 'vmenuPath') != '': | |
29 | self.defaultVMenuPath = self.env['runtime']['settingsManager'].getSetting('menu', 'vmenuPath') | |
30 | if not self.defaultVMenuPath.endswith('/'): | |
31 | self.defaultVMenuPath += '/' | |
32 | self.defaultVMenuPath += self.env['runtime']['inputManager'].getShortcutType() | |
33 | ||
34 | self.createMenuTree() | |
35 | self.closeAfterAction = False | |
36 | def shutdown(self): | |
37 | pass | |
38 | def clearSearchText(self): | |
39 | self.searchText = '' | |
40 | def searchEntry(self, value, forceReset = False): | |
41 | if self.currIndex == None: | |
42 | return '' | |
43 | if self.reset or forceReset: | |
44 | self.clearSearchText() | |
45 | else: | |
46 | if self.useTimeout: | |
47 | if time.time() - self.lastSearchTime > 1: | |
48 | self.clearSearchText() | |
49 | self.searchText += value.upper() | |
50 | self.lastSearchTime = time.time() | |
51 | startIndex = self.getCurrIndex() | |
52 | while True: | |
53 | if not self.nextIndex(): | |
54 | return '' | |
55 | entry = self.getCurrentEntry() | |
56 | if entry.upper().startswith(self.searchText): | |
57 | return entry | |
58 | if startIndex == self.getCurrIndex(): | |
59 | return '' | |
60 | ||
61 | def setCurrMenu(self, currMenu = ''): | |
62 | self.currIndex = None | |
63 | self.currMenu = '' | |
64 | if currMenu != '': | |
65 | currMenu += ' ' + _('Menu') | |
66 | try: | |
67 | t = self.menuDict[currMenu] | |
68 | l = list(self.menuDict.keys()) | |
69 | self.currIndex = [l.index(currMenu)] | |
70 | except Exception as e: | |
71 | print(e) | |
72 | self.currMenu = '' | |
73 | self.currIndex = None | |
74 | return | |
75 | if self.incLevel(): | |
76 | self.currMenu = currMenu | |
77 | else: | |
78 | self.currMenu = '' | |
79 | self.currIndex = None | |
80 | def getCurrMenu(self): | |
81 | return self.currMenu | |
82 | def getActive(self): | |
83 | return self.active | |
84 | def togglelVMenuMode(self, closeAfterAction = True): | |
85 | self.setActive(not self.getActive(), closeAfterAction) | |
86 | def setActive(self, active, closeAfterAction = True): | |
87 | if self.env['runtime']['helpManager'].isTutorialMode(): | |
88 | return | |
89 | self.active = active | |
90 | if self.active: | |
91 | self.closeAfterAction = closeAfterAction | |
92 | try: | |
93 | self.createMenuTree() | |
94 | except Exception as e: | |
95 | print(e) | |
96 | try: | |
97 | if self.currMenu != '': | |
98 | self.setCurrMenu(self.currMenu) | |
99 | if self.currIndex == None: | |
100 | if len(self.menuDict) > 0: | |
101 | self.currIndex = [0] | |
102 | except Exception as e: | |
103 | print(e) | |
104 | try: | |
105 | # navigation | |
106 | self.env['bindings'][str([1, ['KEY_ESC']])] = 'TOGGLE_VMENU_MODE' | |
107 | self.env['bindings'][str([1, ['KEY_UP']])] = 'PREV_VMENU_ENTRY' | |
108 | self.env['bindings'][str([1, ['KEY_DOWN']])] = 'NEXT_VMENU_ENTRY' | |
109 | self.env['bindings'][str([1, ['KEY_SPACE']])] = 'CURR_VMENU_ENTRY' | |
110 | self.env['bindings'][str([1, ['KEY_LEFT']])] = 'DEC_LEVEL_VMENU' | |
111 | self.env['bindings'][str([1, ['KEY_RIGHT']])] = 'INC_LEVEL_VMENU' | |
112 | self.env['bindings'][str([1, ['KEY_ENTER']])] = 'EXEC_VMENU_ENTRY' | |
113 | # search | |
114 | self.env['bindings'][str([1, ['KEY_A']])] = 'SEARCH_A' | |
115 | self.env['bindings'][str([1, ['KEY_B']])] = 'SEARCH_B' | |
116 | self.env['bindings'][str([1, ['KEY_C']])] = 'SEARCH_C' | |
117 | self.env['bindings'][str([1, ['KEY_D']])] = 'SEARCH_D' | |
118 | self.env['bindings'][str([1, ['KEY_E']])] = 'SEARCH_E' | |
119 | self.env['bindings'][str([1, ['KEY_F']])] = 'SEARCH_F' | |
120 | self.env['bindings'][str([1, ['KEY_G']])] = 'SEARCH_G' | |
121 | self.env['bindings'][str([1, ['KEY_H']])] = 'SEARCH_H' | |
122 | self.env['bindings'][str([1, ['KEY_I']])] = 'SEARCH_I' | |
123 | self.env['bindings'][str([1, ['KEY_J']])] = 'SEARCH_J' | |
124 | self.env['bindings'][str([1, ['KEY_K']])] = 'SEARCH_K' | |
125 | self.env['bindings'][str([1, ['KEY_L']])] = 'SEARCH_L' | |
126 | self.env['bindings'][str([1, ['KEY_M']])] = 'SEARCH_M' | |
127 | self.env['bindings'][str([1, ['KEY_N']])] = 'SEARCH_N' | |
128 | self.env['bindings'][str([1, ['KEY_O']])] = 'SEARCH_O' | |
129 | self.env['bindings'][str([1, ['KEY_P']])] = 'SEARCH_P' | |
130 | self.env['bindings'][str([1, ['KEY_Q']])] = 'SEARCH_Q' | |
131 | self.env['bindings'][str([1, ['KEY_R']])] = 'SEARCH_R' | |
132 | self.env['bindings'][str([1, ['KEY_S']])] = 'SEARCH_S' | |
133 | self.env['bindings'][str([1, ['KEY_T']])] = 'SEARCH_T' | |
134 | self.env['bindings'][str([1, ['KEY_U']])] = 'SEARCH_U' | |
135 | self.env['bindings'][str([1, ['KEY_V']])] = 'SEARCH_V' | |
136 | self.env['bindings'][str([1, ['KEY_W']])] = 'SEARCH_W' | |
137 | self.env['bindings'][str([1, ['KEY_X']])] = 'SEARCH_X' | |
138 | self.env['bindings'][str([1, ['KEY_Y']])] = 'SEARCH_Y' | |
139 | self.env['bindings'][str([1, ['KEY_Z']])] = 'SEARCH_Z' | |
140 | except Exception as e: | |
141 | print(e) | |
142 | else: | |
143 | try: | |
144 | self.currIndex = None | |
145 | self.env['bindings'] = self.env['runtime']['settingsManager'].getBindingBackup() | |
146 | except: | |
147 | pass | |
148 | def createMenuTree(self, resetIndex = True): | |
149 | if resetIndex: | |
150 | self.currIndex = None | |
151 | menu = self.fs_tree_to_dict( self.defaultVMenuPath) | |
152 | if menu: | |
153 | self.menuDict = menu | |
154 | # index still valid? | |
155 | if self.currIndex != None: | |
156 | try: | |
157 | r = self.getValueByPath(self.menuDict, self.currIndex) | |
158 | if r == {}: | |
159 | self.currIndex = None | |
160 | except: | |
161 | self.currIndex = None | |
162 | def executeMenu(self): | |
163 | if self.currIndex == None: | |
164 | return | |
165 | try: | |
166 | command = self.getValueByPath(self.menuDict, self.currIndex) | |
167 | if not command == None: | |
168 | command.run() | |
169 | if self.closeAfterAction: | |
170 | self.setActive(False) | |
171 | except Exception as e: | |
172 | try: | |
173 | self.incLevel() | |
174 | text = self.getCurrentEntry() | |
175 | self.env['runtime']['outputManager'].presentText(text, interrupt=True) | |
176 | except: | |
177 | print(e) | |
178 | ||
179 | def incLevel(self): | |
180 | if self.currIndex == None: | |
181 | return False | |
182 | try: | |
183 | r = self.getValueByPath(self.menuDict, self.currIndex +[0]) | |
184 | if r == {}: | |
185 | return False | |
186 | except: | |
187 | return False | |
188 | self.currIndex.append(0) | |
189 | return True | |
190 | def decLevel(self): | |
191 | if self.currIndex == None: | |
192 | return False | |
193 | if self.currMenu != '': | |
194 | if len(self.currIndex) <= 2: | |
195 | return False | |
196 | elif len(self.currIndex) == 1: | |
197 | return False | |
198 | self.currIndex = self.currIndex[:len(self.currIndex) - 1] | |
199 | return True | |
200 | def nextIndex(self): | |
201 | if self.currIndex == None: | |
202 | return False | |
203 | if self.currIndex[len(self.currIndex) - 1] + 1 >= len(self.getNestedByPath(self.menuDict, self.currIndex[:-1])): | |
204 | self.currIndex[len(self.currIndex) - 1] = 0 | |
205 | else: | |
206 | self.currIndex[len(self.currIndex) - 1] += 1 | |
207 | return True | |
208 | def getCurrIndex(self): | |
209 | if self.currIndex == None: | |
210 | return 0 | |
211 | return self.currIndex[len(self.currIndex) - 1] | |
212 | def prevIndex(self): | |
213 | if self.currIndex == None: | |
214 | return False | |
215 | if self.currIndex[len(self.currIndex) - 1] == 0: | |
216 | self.currIndex[len(self.currIndex) - 1] = len(self.getNestedByPath(self.menuDict, self.currIndex[:-1])) - 1 | |
217 | else: | |
218 | self.currIndex[len(self.currIndex) - 1] -= 1 | |
219 | return True | |
220 | ||
221 | def getCurrentEntry(self): | |
222 | return self.getKeysByPath(self.menuDict, self.currIndex)[self.currIndex[-1]] | |
223 | def fs_tree_to_dict(self, path_): | |
224 | for root, dirs, files in os.walk(path_): | |
225 | tree = {d + ' ' + _('Menu'): self.fs_tree_to_dict(os.path.join(root, d)) for d in dirs if not d.startswith('__')} | |
226 | for f in files: | |
227 | try: | |
228 | fileName, fileExtension = os.path.splitext(f) | |
229 | fileName = fileName.split('/')[-1] | |
230 | if fileName.startswith('__'): | |
231 | continue | |
232 | command = self.env['runtime']['commandManager'].loadFile(root + '/' + f) | |
233 | tree.update({fileName + ' ' + _('Action'): command}) | |
234 | except Exception as e: | |
235 | print(e) | |
236 | return tree # note we discontinue iteration trough os.walk | |
237 | def getNestedByPath(self, complete, path): | |
238 | path = path.copy() | |
239 | if path != []: | |
240 | index = list(complete.keys())[path[0]] | |
241 | nested = self.getNestedByPath(complete[index], path[1:]) | |
242 | return nested | |
243 | else: | |
244 | return complete | |
245 | ||
246 | ||
247 | def getKeysByPath(self, complete, path): | |
248 | if not isinstance(complete, dict): | |
249 | return[] | |
250 | d = complete | |
251 | for i in path[:-1]: | |
252 | d = d[list(d.keys())[i]] | |
253 | return list(d.keys()) | |
254 | ||
255 | def getValueByPath(self, complete, path): | |
256 | if not isinstance(complete, dict): | |
257 | return complete | |
258 | d = complete.copy() | |
259 | for i in path: | |
260 | d = d[list(d.keys())[i]] | |
261 | return d |
3 | 3 | # Fenrir TTY screen reader |
4 | 4 | # By Chrys, Storm Dragon, and contributers. |
5 | 5 | |
6 | version = '1.9.4' | |
7 | codename = 'tucher' | |
6 | version = '1.9.7' | |
7 | codename = 'krug' |
13 | 13 | |
14 | 14 | def initialize(self, environment): |
15 | 15 | self.env = environment |
16 | self.env['runtime']['inputManager'].setShortcutType('KEY') | |
17 | self._initialized = True | |
18 | print('Input Debug Driver: Initialized') | |
16 | self.env['runtime']['inputManager'].setShortcutType('KEY') | |
17 | self._initialized = True | |
18 | print('Input Debug Driver: Initialized') | |
19 | 19 | |
20 | 20 | def shutdown(self): |
21 | 21 | if self._initialized: |
22 | self.removeAllDevices() | |
23 | self._initialized = False | |
22 | self.removeAllDevices() | |
23 | self._initialized = False | |
24 | 24 | print('Input Debug Driver: Shutdown') |
25 | 25 | |
26 | 26 | def getInputEvent(self): |
31 | 31 | return None |
32 | 32 | def writeEventBuffer(self): |
33 | 33 | if not self._initialized: |
34 | return | |
34 | return | |
35 | 35 | print('Input Debug Driver: writeEventBuffer') |
36 | 36 | def clearEventBuffer(self): |
37 | 37 | if not self._initialized: |
38 | return | |
39 | del self.env['input']['eventBuffer'][:] | |
38 | return | |
39 | del self.env['input']['eventBuffer'][:] | |
40 | 40 | print('Input Debug Driver: clearEventBuffer') |
41 | 41 | def updateInputDevices(self, newDevices = None, init = False): |
42 | 42 | if not self._initialized: |
43 | return | |
43 | return | |
44 | 44 | print('Input Debug Driver: updateInputDevices') |
45 | 45 | def getLedState(self, led = 0): |
46 | 46 | if not self._initialized: |
47 | return False | |
48 | return False | |
47 | return False | |
48 | return False | |
49 | 49 | def toggleLedState(self, led = 0): |
50 | 50 | if not self._initialized: |
51 | return | |
51 | return | |
52 | 52 | print('Input Debug Driver: toggleLedState') |
53 | 53 | def grabAllDevices(self): |
54 | 54 | if not self._initialized: |
55 | return | |
55 | return | |
56 | 56 | print('Input Debug Driver: grabAllDevices') |
57 | 57 | def ungrabAllDevices(self): |
58 | 58 | if not self._initialized: |
59 | return | |
59 | return | |
60 | 60 | print('Input Debug Driver: ungrabAllDevices') |
61 | 61 | |
62 | 62 | def removeAllDevices(self): |
66 | 66 | def __del__(self): |
67 | 67 | if self._initialized: |
68 | 68 | self.removeAllDevices() |
69 | print('Input Debug Driver: __del__') | |
69 | print('Input Debug Driver: __del__') | |
70 | 70 | |
71 | 71 |
0 | #!/bin/python | |
1 | # -*- coding: utf-8 -*- | |
2 | ||
3 | 0 | # Fenrir TTY screen reader |
4 | 1 | # By Chrys, Storm Dragon, and contributers. |
5 | 2 | |
9 | 6 | _udevAvailableError = '' |
10 | 7 | try: |
11 | 8 | import evdev |
12 | from evdev import InputDevice, UInput | |
9 | from evdev import InputDevice, UInput, ecodes as e | |
13 | 10 | _evdevAvailable = True |
14 | 11 | |
15 | 12 | except Exception as e: |
42 | 39 | self.gDevices = {} |
43 | 40 | self.iDeviceNo = 0 |
44 | 41 | self.watchDog = Value(c_bool, True) |
42 | self.UInputinject = UInput() | |
45 | 43 | def initialize(self, environment): |
46 | 44 | self.env = environment |
47 | 45 | self.env['runtime']['inputManager'].setShortcutType('KEY') |
48 | 46 | global _evdevAvailable |
49 | 47 | global _udevAvailable |
50 | self._initialized = _evdevAvailable and _udevAvailable | |
51 | if not self._initialized: | |
52 | global _evdevAvailableError | |
53 | global _udevAvailableError | |
54 | currError = ' ' | |
55 | if not _evdevAvailable: | |
56 | currError += _evdevAvailableError | |
57 | if not _udevAvailable: | |
58 | currError += ' ' + _udevAvailableError | |
59 | self.env['runtime']['debug'].writeDebugOut('InputDriver:' + currError, debug.debugLevel.ERROR) | |
60 | return | |
61 | ||
62 | self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) | |
48 | global _evdevAvailableError | |
49 | global _udevAvailableError | |
50 | if not _udevAvailable: | |
51 | self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR) | |
52 | if not _evdevAvailable: | |
53 | self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR) | |
54 | return | |
55 | ||
56 | if _udevAvailable: | |
57 | self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) | |
63 | 58 | self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog) |
59 | self._initialized = True | |
60 | ||
64 | 61 | def plugInputDeviceWatchdogUdev(self,active , eventQueue): |
65 | 62 | context = pyudev.Context() |
66 | 63 | monitor = pyudev.Monitor.from_netlink(context) |
67 | 64 | monitor.filter_by(subsystem='input') |
68 | 65 | monitor.start() |
66 | ignorePlug = False | |
69 | 67 | while active.value: |
70 | 68 | validDevices = [] |
71 | 69 | device = monitor.poll(1) |
72 | 70 | while device: |
73 | 71 | self.env['runtime']['debug'].writeDebugOut('plugInputDeviceWatchdogUdev:' + str(device), debug.debugLevel.INFO) |
74 | 72 | try: |
75 | if not '/sys/devices/virtual/input/' in device.sys_path: | |
73 | try: | |
74 | if device.name.upper() in ['','SPEAKUP','FENRIR-UINPUT']: | |
75 | ignorePlug = True | |
76 | if device.phys.upper() in ['','SPEAKUP','FENRIR-UINPUT']: | |
77 | ignorePlug = True | |
78 | if 'BRLTTY' in device.name.upper(): | |
79 | ignorePlug = True | |
80 | except Exception as e: | |
81 | self.env['runtime']['debug'].writeDebugOut("plugInputDeviceWatchdogUdev CHECK NAME CRASH: " + str(e),debug.debugLevel.ERROR) | |
82 | if not ignorePlug: | |
83 | virtual = '/sys/devices/virtual/input/' in device.sys_path | |
76 | 84 | if device.device_node: |
77 | validDevices.append(str(device.device_node)) | |
78 | except: | |
79 | pass | |
85 | validDevices.append({'device': device.device_node, 'virtual': virtual}) | |
86 | except Exception as e: | |
87 | self.env['runtime']['debug'].writeDebugOut("plugInputDeviceWatchdogUdev APPEND CRASH: " + str(e),debug.debugLevel.ERROR) | |
80 | 88 | try: |
81 | device = monitor.poll(0.1) | |
82 | except: | |
89 | pollTimeout = 1 | |
90 | device = monitor.poll(pollTimeout) | |
91 | except: | |
83 | 92 | device = None |
93 | ignorePlug = False | |
84 | 94 | if validDevices: |
85 | 95 | eventQueue.put({"Type":fenrirEventType.PlugInputDevice,"Data":validDevices}) |
86 | return time.time() | |
87 | ||
96 | return time.time() | |
97 | ||
88 | 98 | def inputWatchdog(self,active , eventQueue): |
89 | 99 | try: |
90 | 100 | while active.value: |
91 | 101 | r, w, x = select(self.iDevices, [], [], 0.8) |
92 | event = None | |
102 | event = None | |
93 | 103 | foundKeyInSequence = False |
94 | 104 | foreward = False |
95 | 105 | eventFired = False |
136 | 146 | if self.gDevices[iDevice.fd]: |
137 | 147 | self.writeUInput(uDevice, event) |
138 | 148 | except Exception as e: |
139 | pass | |
149 | pass | |
140 | 150 | |
141 | 151 | def writeUInput(self, uDevice, event): |
142 | 152 | if not self._initialized: |
143 | return | |
153 | return | |
144 | 154 | uDevice.write_event(event) |
155 | time.sleep(0.0000002) | |
145 | 156 | uDevice.syn() |
146 | 157 | |
147 | 158 | def updateInputDevices(self, newDevices = None, init = False): |
151 | 162 | deviceFileList = None |
152 | 163 | |
153 | 164 | if newDevices and not init: |
165 | if not isinstance(newDevices, list): | |
166 | newDevices = [newDevices] | |
154 | 167 | deviceFileList = newDevices |
155 | 168 | else: |
156 | 169 | deviceFileList = evdev.list_devices() |
187 | 200 | except: |
188 | 201 | continue |
189 | 202 | try: |
190 | if currDevice.name.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']: | |
191 | continue | |
192 | if currDevice.phys.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']: | |
193 | continue | |
203 | if currDevice.name.upper() in ['','SPEAKUP','FENRIR-UINPUT']: | |
204 | continue | |
205 | if currDevice.phys.upper() in ['','SPEAKUP','FENRIR-UINPUT']: | |
206 | continue | |
194 | 207 | if 'BRLTTY' in currDevice.name.upper(): |
195 | 208 | continue |
196 | 209 | except: |
199 | 212 | if mode in ['ALL','NOMICE']: |
200 | 213 | if eventType.EV_KEY in cap: |
201 | 214 | if 116 in cap[eventType.EV_KEY] and len(cap[eventType.EV_KEY]) < 10: |
202 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (has 116):' + currDevice.name,debug.debugLevel.INFO) | |
215 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (has 116):' + currDevice.name,debug.debugLevel.INFO) | |
203 | 216 | continue |
204 | 217 | if len(cap[eventType.EV_KEY]) < 60: |
205 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (< 60 keys):' + currDevice.name,debug.debugLevel.INFO) | |
206 | continue | |
218 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (< 60 keys):' + currDevice.name,debug.debugLevel.INFO) | |
219 | continue | |
207 | 220 | if mode == 'ALL': |
208 | 221 | self.addDevice(currDevice) |
209 | self.env['runtime']['debug'].writeDebugOut('Device added (ALL):' + self.iDevices[currDevice.fd].name, debug.debugLevel.INFO) | |
222 | self.env['runtime']['debug'].writeDebugOut('Device added (ALL):' + self.iDevices[currDevice.fd].name, debug.debugLevel.INFO) | |
210 | 223 | elif mode == 'NOMICE': |
211 | 224 | if not ((eventType.EV_REL in cap) or (eventType.EV_ABS in cap)): |
212 | 225 | self.addDevice(currDevice) |
213 | self.env['runtime']['debug'].writeDebugOut('Device added (NOMICE):' + self.iDevices[currDevice.fd].name,debug.debugLevel.INFO) | |
226 | self.env['runtime']['debug'].writeDebugOut('Device added (NOMICE):' + self.iDevices[currDevice.fd].name,debug.debugLevel.INFO) | |
214 | 227 | else: |
215 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (NOMICE):' + currDevice.name,debug.debugLevel.INFO) | |
228 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (NOMICE):' + currDevice.name,debug.debugLevel.INFO) | |
216 | 229 | else: |
217 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (no EV_KEY):' + currDevice.name,debug.debugLevel.INFO) | |
230 | self.env['runtime']['debug'].writeDebugOut('Device Skipped (no EV_KEY):' + currDevice.name,debug.debugLevel.INFO) | |
218 | 231 | elif currDevice.name.upper() in mode.split(','): |
219 | 232 | self.addDevice(currDevice) |
220 | self.env['runtime']['debug'].writeDebugOut('Device added (Name):' + self.iDevices[currDevice.fd].name,debug.debugLevel.INFO) | |
233 | self.env['runtime']['debug'].writeDebugOut('Device added (Name):' + self.iDevices[currDevice.fd].name,debug.debugLevel.INFO) | |
221 | 234 | except Exception as e: |
222 | 235 | self.env['runtime']['debug'].writeDebugOut("Device Skipped (Exception): " + deviceFile +' ' + currDevice.name +' '+ str(e),debug.debugLevel.INFO) |
223 | 236 | self.iDeviceNo = len(evdev.list_devices()) |
230 | 243 | self.iDevicesFD.append(fd) |
231 | 244 | for fd in self.iDevicesFD: |
232 | 245 | if not fd in self.iDevices: |
233 | self.iDevicesFD.remove(fd) | |
246 | self.iDevicesFD.remove(fd) | |
234 | 247 | except: |
235 | 248 | pass |
236 | 249 | def mapEvent(self, event): |
237 | 250 | if not self._initialized: |
238 | return None | |
251 | return None | |
239 | 252 | if not event: |
240 | 253 | return None |
241 | 254 | mEvent = inputData.inputEvent |
250 | 263 | mEvent['EventName'] = mEvent['EventName'][0] |
251 | 264 | mEvent['EventValue'] = event.code |
252 | 265 | mEvent['EventSec'] = event.sec |
253 | mEvent['EventUsec'] = event.usec | |
266 | mEvent['EventUsec'] = event.usec | |
254 | 267 | mEvent['EventState'] = event.value |
255 | 268 | mEvent['EventType'] = event.type |
256 | 269 | return mEvent |
257 | 270 | except Exception as e: |
258 | 271 | return None |
259 | ||
272 | ||
260 | 273 | def getLedState(self, led = 0): |
261 | 274 | if not self.hasIDevices(): |
262 | return False | |
275 | return False | |
263 | 276 | # 0 = Numlock |
264 | 277 | # 1 = Capslock |
265 | 278 | # 2 = Rollen |
266 | 279 | for fd, dev in self.iDevices.items(): |
267 | 280 | if led in dev.leds(): |
268 | 281 | return True |
269 | return False | |
282 | return False | |
270 | 283 | def toggleLedState(self, led = 0): |
271 | 284 | if not self.hasIDevices(): |
272 | return False | |
285 | return False | |
273 | 286 | ledState = self.getLedState(led) |
274 | 287 | for i in self.iDevices: |
275 | 288 | if self.gDevices[i]: |
276 | 289 | # 17 LEDs |
277 | if 17 in self.iDevices[i].capabilities(): | |
290 | if 17 in self.iDevices[i].capabilities(): | |
278 | 291 | if ledState == 1: |
279 | 292 | self.iDevices[i].set_led(led , 0) |
280 | 293 | else: |
281 | 294 | self.iDevices[i].set_led(led , 1) |
282 | 295 | def grabAllDevices(self): |
283 | 296 | if not self._initialized: |
284 | return | |
297 | return True | |
298 | ok = True | |
285 | 299 | for fd in self.iDevices: |
286 | self.grabDevice(fd) | |
287 | ||
300 | if not self.gDevices[fd]: | |
301 | ok = ok and self.grabDevice(fd) | |
302 | return ok | |
288 | 303 | def ungrabAllDevices(self): |
289 | 304 | if not self._initialized: |
290 | return | |
305 | return True | |
306 | ok = True | |
291 | 307 | for fd in self.iDevices: |
292 | self.ungrabDevice(fd) | |
293 | ||
308 | if self.gDevices[fd]: | |
309 | ok = ok and self.ungrabDevice(fd) | |
310 | return ok | |
294 | 311 | def createUInputDev(self, fd): |
295 | 312 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'): |
296 | 313 | self.uDevices[fd] = None |
302 | 319 | self.uDevices[fd] = None |
303 | 320 | if self.uDevices[fd] != None: |
304 | 321 | return |
305 | try: | |
306 | self.uDevices[fd] = UInput.from_device(self.iDevices[fd]) | |
322 | try: | |
323 | self.uDevices[fd] = UInput.from_device(self.iDevices[fd], name='fenrir-uinput', phys='fenrir-uinput') | |
307 | 324 | except Exception as e: |
308 | 325 | try: |
309 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: compat fallback: ' + str(e),debug.debugLevel.WARNING) | |
326 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: compat fallback: ' + str(e),debug.debugLevel.WARNING) | |
310 | 327 | dev = self.iDevices[fd] |
311 | 328 | cap = dev.capabilities() |
312 | 329 | del cap[0] |
313 | 330 | self.uDevices[fd] = UInput( |
314 | 331 | cap, |
315 | dev.name, | |
332 | name = 'fenrir-uinput', | |
333 | phys = 'fenrir-uinput' | |
316 | 334 | ) |
317 | 335 | except Exception as e: |
318 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: init Uinput not possible: ' + str(e),debug.debugLevel.ERROR) | |
319 | return | |
336 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: init Uinput not possible: ' + str(e),debug.debugLevel.ERROR) | |
337 | return | |
320 | 338 | def addDevice(self, newDevice): |
321 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: device added: ' + str(newDevice.fd) + ' ' +str(newDevice),debug.debugLevel.INFO) | |
322 | self.iDevices[newDevice.fd] = newDevice | |
323 | self.gDevices[newDevice.fd] = False | |
324 | self.createUInputDev(newDevice.fd) | |
339 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: device added: ' + str(newDevice.fd) + ' ' +str(newDevice),debug.debugLevel.INFO) | |
340 | try: | |
341 | self.iDevices[newDevice.fd] = newDevice | |
342 | self.createUInputDev(newDevice.fd) | |
343 | self.gDevices[newDevice.fd] = False | |
344 | except: | |
345 | # if it doesnt work clean up | |
346 | try: | |
347 | del(self.iDevices[newDevice.fd]) | |
348 | except: | |
349 | pass | |
350 | try: | |
351 | del(self.uDevices[newDevice.fd]) | |
352 | except: | |
353 | pass | |
354 | try: | |
355 | del(self.gDevices[newDevice.fd]) | |
356 | except: | |
357 | pass | |
325 | 358 | def grabDevice(self, fd): |
326 | 359 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'): |
327 | return | |
360 | return True | |
328 | 361 | try: |
329 | 362 | self.iDevices[fd].grab() |
330 | 363 | self.gDevices[fd] = True |
331 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO) | |
332 | except IOError: | |
333 | self.gDevices[fd] = True | |
364 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO) | |
365 | except IOError: | |
366 | if not self.gDevices[fd]: | |
367 | return False | |
368 | # self.gDevices[fd] = True | |
369 | # #self.removeDevice(fd) | |
334 | 370 | except Exception as e: |
335 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grabing not possible: ' + str(e),debug.debugLevel.ERROR) | |
371 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grabing not possible: ' + str(e),debug.debugLevel.ERROR) | |
372 | return False | |
373 | return True | |
336 | 374 | def ungrabDevice(self,fd): |
337 | 375 | if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'): |
338 | return | |
339 | try: | |
340 | self.gDevices[fd] = False | |
376 | return True | |
377 | try: | |
341 | 378 | self.iDevices[fd].ungrab() |
379 | self.gDevices[fd] = False | |
342 | 380 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: ungrab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO) |
343 | except: | |
344 | pass | |
381 | except IOError: | |
382 | if self.gDevices[fd]: | |
383 | return False | |
384 | # self.gDevices[fd] = False | |
385 | # #self.removeDevice(fd) | |
386 | except Exception as e: | |
387 | return False | |
388 | return True | |
345 | 389 | def removeDevice(self,fd): |
346 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: device removed: ' + str(fd) + ' ' +str(self.iDevices[fd]),debug.debugLevel.INFO) | |
390 | self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: device removed: ' + str(fd) + ' ' +str(self.iDevices[fd]),debug.debugLevel.INFO) | |
347 | 391 | self.clearEventBuffer() |
348 | 392 | try: |
349 | 393 | self.ungrabDevice(fd) |
364 | 408 | try: |
365 | 409 | del(self.uDevices[fd]) |
366 | 410 | except: |
367 | pass | |
411 | pass | |
368 | 412 | try: |
369 | 413 | del(self.gDevices[fd]) |
370 | 414 | except: |
371 | pass | |
415 | pass | |
372 | 416 | self.updateMPiDevicesFD() |
373 | ||
417 | ||
374 | 418 | def hasIDevices(self): |
375 | 419 | if not self._initialized: |
376 | 420 | return False |
378 | 422 | return False |
379 | 423 | if len(self.iDevices) == 0: |
380 | 424 | return False |
381 | return True | |
425 | return True | |
426 | ||
427 | def sendKey(self, key, state): | |
428 | if not self._initialized: | |
429 | return | |
430 | try: | |
431 | self.UInputinject.write(e.EV_KEY, e.ecodes[key], state) | |
432 | self.UInputinject.syn() | |
433 | except: | |
434 | pass | |
382 | 435 | |
383 | 436 | def removeAllDevices(self): |
384 | 437 | if not self.hasIDevices(): |
388 | 441 | self.removeDevice(fd) |
389 | 442 | self.iDevices.clear() |
390 | 443 | self.uDevices.clear() |
391 | self.gDevices.clear() | |
444 | self.gDevices.clear() | |
392 | 445 | self.iDeviceNo = 0 |
9 | 9 | |
10 | 10 | class driver(inputDriver): |
11 | 11 | def __init__(self): |
12 | self._isInitialized = False | |
12 | self._isInitialized = False | |
13 | 13 | inputDriver.__init__(self) |
14 | 14 | def initialize(self, environment): |
15 | 15 | self.env = environment |
16 | 16 | self.env['runtime']['inputManager'].setShortcutType('BYTE') |
17 | self._isInitialized = True | |
17 | self._isInitialized = True |
17 | 17 | self.env['runtime']['processManager'].addCustomEventThread(self.watchDog, multiprocess=True) |
18 | 18 | def watchDog(self, active, eventQueue): |
19 | 19 | # echo "command say this is a test" | nc localhost 22447 |
20 | self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
21 | self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
20 | self.fenrirSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
21 | self.fenrirSock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
22 | 22 | self.host = '127.0.0.1' |
23 | 23 | self.port = self.env['runtime']['settingsManager'].getSettingAsInt('remote', 'port') |
24 | self.sock.bind((self.host, self.port)) | |
25 | self.sock.listen(1) | |
26 | while active.value == 1: | |
27 | client_sock, client_addr = self.sock.accept() | |
28 | if client_sock: | |
29 | # Check if the client is still connected and if data is available: | |
30 | try: | |
31 | r, w, e = select.select([client_sock,], [], []) | |
32 | except select.error: | |
33 | return | |
34 | if len(r) > 0: | |
35 | rawdata = client_sock.recv(8129) | |
36 | try: | |
37 | data = rawdata.decode("utf-8").rstrip().lstrip() | |
38 | eventQueue.put({"Type":fenrirEventType.RemoteIncomming, | |
39 | "Data": data | |
40 | }) | |
41 | except: | |
42 | pass | |
24 | self.fenrirSock.bind((self.host, self.port)) | |
25 | self.fenrirSock.listen(1) | |
26 | while active.value: | |
27 | try: | |
28 | r, _, _ = select.select([self.fenrirSock], [], [], 0.8) | |
29 | except select.error: | |
30 | break | |
31 | if r == []: | |
32 | continue | |
33 | if self.fenrirSock in r: | |
34 | client_sock, client_addr = self.fenrirSock.accept() | |
35 | try: | |
36 | rawdata = client_sock.recv(8129) | |
37 | except: | |
38 | pass | |
39 | try: | |
40 | data = rawdata.decode("utf-8").rstrip().lstrip() | |
41 | eventQueue.put({"Type":fenrirEventType.RemoteIncomming, | |
42 | "Data": data | |
43 | }) | |
44 | except: | |
45 | pass | |
46 | try: | |
43 | 47 | client_sock.close() |
44 | if self.sock: | |
45 | self.sock.close() | |
46 | self.sock = None | |
48 | except: | |
49 | pass | |
50 | if self.fenrirSock: | |
51 | self.fenrirSock.close() | |
52 | self.fenrirSock = None |
18 | 18 | self.env['runtime']['processManager'].addCustomEventThread(self.watchDog, multiprocess=True) |
19 | 19 | def watchDog(self, active, eventQueue): |
20 | 20 | # echo "command say this is a test" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock |
21 | ||
22 | if self.env['runtime']['settingsManager'].getSetting('screen', 'driver') =='vcsaDriver': | |
23 | socketpath = self.env['runtime']['settingsManager'].getSettingAsInt('remote', 'socketpath') + 'fenrirscreenreader-deamon.sock' | |
24 | else: | |
25 | socketpath = self.env['runtime']['settingsManager'].getSettingAsInt('remote', 'socketpath') + 'fenrirscreenreader-' + str(os.getpid()) + '.sock' | |
26 | if os.path.exists(socketpath): | |
27 | os.remove(socketpath) | |
28 | self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | |
29 | self.sock.bind(socketpath) | |
30 | self.sock.listen(1) | |
31 | if self.env['runtime']['settingsManager'].getSetting('screen', 'driver') =='vcsaDriver': | |
32 | os.chmod(socketpath, 0o222) | |
33 | while active.value == 1: | |
34 | client_sock, client_addr = self.sock.accept() | |
35 | if client_sock: | |
36 | # Check if the client is still connected and if data is available: | |
37 | try: | |
38 | r, w, e = select.select([client_sock,], [], []) | |
39 | except select.error: | |
40 | return | |
41 | if len(r) > 0: | |
42 | rawdata = client_sock.recv(8129) | |
43 | try: | |
44 | data = rawdata.decode("utf-8").rstrip().lstrip() | |
45 | eventQueue.put({"Type":fenrirEventType.RemoteIncomming, | |
46 | "Data": data | |
47 | }) | |
48 | except: | |
49 | pass | |
21 | socketFile = '' | |
22 | try: | |
23 | socketFile = self.env['runtime']['settingsManager'].getSetting('remote', 'socketFile') | |
24 | except: | |
25 | pass | |
26 | if socketFile == '': | |
27 | if self.env['runtime']['settingsManager'].getSetting('screen', 'driver') =='vcsaDriver': | |
28 | socketFile = '/tmp/fenrirscreenreader-deamon.sock' | |
29 | else: | |
30 | socketFile = '/tmp/fenrirscreenreader-' + str(os.getppid()) + '.sock' | |
31 | if os.path.exists(socketFile): | |
32 | os.unlink(socketFile) | |
33 | self.fenrirSock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | |
34 | self.fenrirSock.bind(socketFile) | |
35 | os.chmod(socketFile, 0o222) | |
36 | self.fenrirSock.listen(1) | |
37 | while active.value: | |
38 | # Check if the client is still connected and if data is available: | |
39 | try: | |
40 | r, _, _ = select.select([self.fenrirSock], [], [], 0.8) | |
41 | except select.error: | |
42 | break | |
43 | if r == []: | |
44 | continue | |
45 | if self.fenrirSock in r: | |
46 | client_sock, client_addr = self.fenrirSock.accept() | |
47 | try: | |
48 | rawdata = client_sock.recv(8129) | |
49 | except: | |
50 | pass | |
51 | try: | |
52 | data = rawdata.decode("utf-8").rstrip().lstrip() | |
53 | eventQueue.put({"Type":fenrirEventType.RemoteIncomming, | |
54 | "Data": data | |
55 | }) | |
56 | except: | |
57 | pass | |
58 | try: | |
50 | 59 | client_sock.close() |
51 | ||
52 | if os.path.exists(socketpath): | |
53 | os.remove(socketpath) | |
54 | if self.sock: | |
55 | self.sock.close() | |
56 | self.sock = None | |
60 | except: | |
61 | pass | |
62 | if self.fenrirSock: | |
63 | self.fenrirSock.close() | |
64 | self.fenrirSock = None | |
65 | if os.path.exists(socketFile): | |
66 | os.unlink(socketFile) |
3 | 3 | # Fenrir TTY screen reader |
4 | 4 | # By Chrys, Storm Dragon, and contributers. |
5 | 5 | |
6 | import os, struct, sys, pty, tty, termios, shlex, signal, select, pyte, time, fcntl ,getpass | |
6 | import os, struct, sys, pty, tty, termios, shlex, signal, pyte, time, fcntl ,getpass | |
7 | from select import select | |
7 | 8 | from fenrirscreenreader.core import debug |
8 | 9 | from fenrirscreenreader.core.eventData import fenrirEventType |
9 | 10 | from fenrirscreenreader.core.screenDriver import screenDriver |
10 | 11 | from fenrirscreenreader.utils import screen_utils |
11 | 12 | |
13 | ||
14 | class fenrirScreen(pyte.Screen): | |
15 | def set_margins(self, *args, **kwargs): | |
16 | kwargs.pop("private", None) | |
17 | super(fenrirScreen, self).set_margins(*args, **kwargs) | |
18 | ||
12 | 19 | class Terminal: |
13 | 20 | def __init__(self, columns, lines, p_in): |
14 | 21 | self.text = '' |
15 | 22 | self.attributes = None |
16 | self.screen = pyte.HistoryScreen(columns, lines) | |
17 | self.screen.set_mode(pyte.modes.LNM) | |
23 | self.screen = fenrirScreen(columns, lines) | |
18 | 24 | self.screen.write_process_input = \ |
19 | 25 | lambda data: p_in.write(data.encode()) |
20 | 26 | self.stream = pyte.ByteStream() |
21 | 27 | self.stream.attach(self.screen) |
22 | 28 | def feed(self, data): |
23 | 29 | self.stream.feed(data) |
24 | ||
30 | ||
25 | 31 | def updateAttributes(self, initialize = False): |
26 | buffer = self.screen.buffer | |
32 | buffer = self.screen.buffer | |
27 | 33 | lines = None |
28 | 34 | if not initialize: |
29 | 35 | lines = self.screen.dirty |
30 | 36 | else: |
31 | 37 | lines = range(self.screen.lines) |
32 | self.attributes = [[list(attribute[1:]) + [False, 'default', 'default'] for attribute in line.values()] for line in buffer.values()] | |
33 | ||
38 | self.attributes = [[list(attribute[1:]) + [False, 'default', 'default'] for attribute in line.values()] for line in buffer.values()] | |
34 | 39 | for y in lines: |
35 | 40 | try: |
36 | 41 | t = self.attributes[y] |
54 | 59 | if yPos == -1: |
55 | 60 | yPos = self.screen.cursor.y |
56 | 61 | self.screen.cursor.x = min(self.screen.cursor.x, self.screen.columns - 1) |
57 | self.screen.cursor.y = min(self.screen.cursor.y, self.screen.lines - 1) | |
62 | self.screen.cursor.y = min(self.screen.cursor.y, self.screen.lines - 1) | |
58 | 63 | def GetScreenContent(self): |
59 | 64 | cursor = self.screen.cursor |
60 | 65 | self.text = '\n'.join(self.screen.display) |
61 | 66 | self.updateAttributes(self.attributes == None) |
62 | self.screen.dirty.clear() | |
67 | self.screen.dirty.clear() | |
63 | 68 | return {"cursor": (cursor.x, cursor.y), |
64 | 69 | 'lines': self.screen.lines, |
65 | 70 | 'columns': self.screen.columns, |
66 | 71 | "text": self.text, |
67 | 72 | 'attributes': self.attributes.copy(), |
68 | 'screen': 'pty', | |
69 | 'screenUpdateTime': time.time(), | |
73 | 'screen': 'pty', | |
74 | 'screenUpdateTime': time.time(), | |
70 | 75 | }.copy() |
71 | 76 | |
72 | 77 | class driver(screenDriver): |
73 | 78 | def __init__(self): |
74 | screenDriver.__init__(self) | |
79 | screenDriver.__init__(self) | |
75 | 80 | self.signalPipe = os.pipe() |
76 | 81 | self.p_out = None |
82 | self.terminal = None | |
83 | self.p_pid = -1 | |
77 | 84 | signal.signal(signal.SIGWINCH, self.handleSigwinch) |
78 | 85 | def initialize(self, environment): |
79 | 86 | self.env = environment |
95 | 102 | self.env['screen']['autoIgnoreScreens'] = [] |
96 | 103 | self.env['general']['prevUser'] = getpass.getuser() |
97 | 104 | self.env['general']['currUser'] = getpass.getuser() |
98 | def readAll(self, fd, timeout = 9999999, interruptFd = None, len = 2048): | |
99 | bytes = b'' | |
105 | def readAll(self, fd, timeout = 0.3, interruptFd = None, len = 65536): | |
106 | msgBytes = b'' | |
100 | 107 | fdList = [] |
101 | fdList += [fd] | |
108 | fdList += [fd] | |
102 | 109 | if interruptFd: |
103 | 110 | fdList += [interruptFd] |
104 | 111 | starttime = time.time() |
105 | 112 | while True: |
106 | # respect timeout but wait a little bit of time to see if something more is here | |
107 | if (time.time() - starttime) >= timeout: | |
108 | break | |
109 | r = screen_utils.hasMoreWhat(fdList,0) | |
110 | hasmore = fd in r | |
111 | if not hasmore: | |
112 | break | |
113 | # exit on interrupt available | |
114 | if interruptFd in r: | |
113 | r = screen_utils.hasMoreWhat(fdList, 0.0001) | |
114 | # nothing more to read | |
115 | if not fd in r: | |
115 | 116 | break |
116 | 117 | data = os.read(fd, len) |
117 | 118 | if data == b'': |
118 | 119 | raise EOFError |
119 | bytes += data | |
120 | return bytes | |
120 | msgBytes += data | |
121 | # exit on interrupt available | |
122 | if interruptFd in r: | |
123 | break | |
124 | # respect timeout but wait a little bit of time to see if something more is here | |
125 | if (time.time() - starttime) >= timeout: | |
126 | break | |
127 | return msgBytes | |
121 | 128 | def openTerminal(self, columns, lines, command): |
122 | 129 | p_pid, master_fd = pty.fork() |
123 | 130 | if p_pid == 0: # Child. |
124 | 131 | argv = shlex.split(command) |
125 | 132 | env = os.environ.copy() |
126 | 133 | #values are VT100,xterm-256color,linux |
127 | env["TERM"] = 'linux' | |
134 | try: | |
135 | if env["TERM"] == '': | |
136 | env["TERM"] = 'linux' | |
137 | except: | |
138 | env["TERM"] = 'linux' | |
128 | 139 | os.execvpe(argv[0], argv, env) |
129 | 140 | # File-like object for I/O with the child process aka command. |
130 | 141 | p_out = os.fdopen(master_fd, "w+b", 0) |
140 | 151 | lines, columns, _, _ = struct.unpack('HHHH', fcntl.ioctl(fd, termios.TIOCGWINSZ, s)) |
141 | 152 | return lines, columns |
142 | 153 | def handleSigwinch(self, *args): |
143 | os.write(self.signalPipe[1], b'w') | |
154 | os.write(self.signalPipe[1], b'w') | |
144 | 155 | def terminalEmulation(self,active , eventQueue): |
145 | 156 | try: |
146 | old_attr = termios.tcgetattr(sys.stdin) | |
157 | old_attr = termios.tcgetattr(sys.stdin) | |
147 | 158 | tty.setraw(0) |
148 | 159 | lines, columns = self.getTerminalSize(0) |
149 | 160 | if self.command == '': |
150 | 161 | self.command = screen_utils.getShell() |
151 | terminal, p_pid, self.p_out = self.openTerminal(columns, lines, self.command) | |
162 | self.terminal, self.p_pid, self.p_out = self.openTerminal(columns, lines, self.command) | |
152 | 163 | lines, columns = self.resizeTerminal(self.p_out) |
153 | terminal.resize(lines, columns) | |
164 | self.terminal.resize(lines, columns) | |
154 | 165 | fdList = [sys.stdin, self.p_out, self.signalPipe[0]] |
155 | 166 | while active.value: |
156 | r, _, _ = select.select(fdList, [], [], 1) | |
167 | r, _, _ = select(fdList, [], [], 1) | |
157 | 168 | # none |
158 | 169 | if r == []: |
159 | 170 | continue |
161 | 172 | if self.signalPipe[0] in r: |
162 | 173 | os.read(self.signalPipe[0], 1) |
163 | 174 | lines, columns = self.resizeTerminal(self.p_out) |
164 | terminal.resize(lines, columns) | |
175 | self.terminal.resize(lines, columns) | |
165 | 176 | # input |
166 | 177 | if sys.stdin in r: |
167 | 178 | try: |
168 | msgBytes = self.readAll(sys.stdin.fileno()) | |
179 | msgBytes = self.readAll(sys.stdin.fileno(), len=4096) | |
169 | 180 | except (EOFError, OSError): |
170 | active.value = False | |
171 | break | |
181 | eventQueue.put({"Type":fenrirEventType.StopMainLoop,"Data":None}) | |
182 | break | |
172 | 183 | if self.shortcutType == 'KEY': |
173 | 184 | try: |
174 | 185 | self.injectTextToScreen(msgBytes) |
175 | 186 | except: |
176 | active.value = False | |
187 | eventQueue.put({"Type":fenrirEventType.StopMainLoop,"Data":None}) | |
177 | 188 | break |
178 | else: | |
189 | else: | |
179 | 190 | eventQueue.put({"Type":fenrirEventType.ByteInput, |
180 | "Data":msgBytes }) | |
191 | "Data":msgBytes }) | |
181 | 192 | # output |
182 | 193 | if self.p_out in r: |
183 | 194 | try: |
184 | msgBytes = self.readAll(self.p_out.fileno(), timeout=0.001, interruptFd=sys.stdin) | |
195 | msgBytes = self.readAll(self.p_out.fileno(), interruptFd=sys.stdin.fileno()) | |
185 | 196 | except (EOFError, OSError): |
186 | active.value = False | |
187 | break | |
188 | terminal.feed(msgBytes) | |
189 | os.write(sys.stdout.fileno(), msgBytes) | |
197 | eventQueue.put({"Type":fenrirEventType.StopMainLoop,"Data":None}) | |
198 | break | |
199 | # feed and send event bevore write, the pyte already has the right state | |
200 | # so fenrir already can progress bevore os.write what should give some better reaction time | |
201 | self.terminal.feed(msgBytes) | |
190 | 202 | eventQueue.put({"Type":fenrirEventType.ScreenUpdate, |
191 | "Data":screen_utils.createScreenEventData(terminal.GetScreenContent()) | |
203 | "Data":screen_utils.createScreenEventData(self.terminal.GetScreenContent()) | |
192 | 204 | }) |
205 | self.injectTextToScreen(msgBytes, screen=sys.stdout.fileno()) | |
193 | 206 | except Exception as e: # Process died? |
194 | 207 | print(e) |
195 | active.value = False | |
208 | eventQueue.put({"Type":fenrirEventType.StopMainLoop,"Data":None}) | |
196 | 209 | finally: |
197 | os.kill(p_pid, signal.SIGTERM) | |
198 | self.p_out.close() | |
210 | os.kill(self.p_pid, signal.SIGTERM) | |
211 | self.p_out.close() | |
199 | 212 | termios.tcsetattr(sys.stdin, termios.TCSADRAIN, old_attr) |
200 | 213 | eventQueue.put({"Type":fenrirEventType.StopMainLoop,"Data":None}) |
201 | 214 | sys.exit(0) |
22 | 22 | from fenrirscreenreader.core import debug |
23 | 23 | from fenrirscreenreader.core.eventData import fenrirEventType |
24 | 24 | from fenrirscreenreader.core.screenDriver import screenDriver |
25 | from fenrirscreenreader.utils import screen_utils | |
25 | 26 | |
26 | 27 | class driver(screenDriver): |
27 | 28 | def __init__(self): |
31 | 32 | self.charmap = {} |
32 | 33 | self.bgColorValues = {0: 'black', 1: 'blue', 2: 'green', 3: 'cyan', 4: 'red', 5: 'magenta', 6: 'brown/yellow', 7: 'white'} |
33 | 34 | self.fgColorValues = {0: 'black', 1: 'blue', 2: 'green', 3: 'cyan', 4: 'red', 5: 'magenta', 6: 'brown/yellow', 7: 'light gray', 8: 'dark gray', 9: 'light blue', 10: 'light green', 11: 'light cyan', 12: 'light red', 13: 'light magenta', 14: 'light yellow', 15: 'white'} |
34 | self.hichar = None | |
35 | self.hichar = None | |
35 | 36 | def initialize(self, environment): |
36 | 37 | self.env = environment |
37 | 38 | self.env['runtime']['attributeManager'].appendDefaultAttributes([ |
45 | 46 | False, # blink |
46 | 47 | 'default', # fontsize |
47 | 48 | 'default' # fontfamily |
48 | ]) #end attribute ) | |
49 | self.env['runtime']['processManager'].addCustomEventThread(self.updateWatchdog, multiprocess=True) | |
49 | ]) #end attribute ) | |
50 | self.env['runtime']['processManager'].addCustomEventThread(self.updateWatchdog, multiprocess=True) | |
50 | 51 | def getCurrScreen(self): |
51 | 52 | self.env['screen']['oldTTY'] = self.env['screen']['newTTY'] |
52 | try: | |
53 | try: | |
53 | 54 | currScreenFile = open('/sys/devices/virtual/tty/tty0/active','r') |
54 | 55 | self.env['screen']['newTTY'] = str(currScreenFile.read()[3:-1]) |
55 | 56 | currScreenFile.close() |
56 | 57 | except Exception as e: |
57 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
58 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
58 | 59 | def injectTextToScreen(self, text, screen = None): |
59 | 60 | useScreen = "/dev/tty" + self.env['screen']['newTTY'] |
60 | 61 | if screen != None: |
62 | 63 | with open(useScreen, 'w') as fd: |
63 | 64 | for c in text: |
64 | 65 | fcntl.ioctl(fd, termios.TIOCSTI, c) |
65 | ||
66 | ||
66 | 67 | def getSessionInformation(self): |
67 | self.env['screen']['autoIgnoreScreens'] = [] | |
68 | self.env['screen']['autoIgnoreScreens'] = [] | |
68 | 69 | try: |
69 | 70 | if not self.sysBus: |
70 | self.sysBus = dbus.SystemBus() | |
71 | self.sysBus = dbus.SystemBus() | |
71 | 72 | obj = self.sysBus.get_object('org.freedesktop.login1', '/org/freedesktop/login1') |
72 | 73 | inf = dbus.Interface(obj, 'org.freedesktop.login1.Manager') |
73 | 74 | self.ListSessions = inf.get_dbus_method('ListSessions') |
82 | 83 | screen = str(inf.Get('org.freedesktop.login1.Session', 'TTY')) |
83 | 84 | screen = screen[screen.upper().find('TTY') + 3:] |
84 | 85 | if screen == '': |
85 | self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR) | |
86 | self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR) | |
86 | 87 | return |
87 | 88 | if sessionType.upper() != 'TTY': |
88 | 89 | self.env['screen']['autoIgnoreScreens'] += [screen] |
89 | 90 | if screen == self.env['screen']['newTTY'] : |
90 | 91 | if self.env['general']['currUser'] != session[2]: |
91 | 92 | self.env['general']['prevUser'] = self.env['general']['currUser'] |
92 | self.env['general']['currUser'] = session[2] | |
93 | except Exception as e: | |
94 | self.env['runtime']['debug'].writeDebugOut('getSessionInformation: Maybe no LoginD:' + str(e),debug.debugLevel.ERROR) | |
93 | self.env['general']['currUser'] = session[2] | |
94 | except Exception as e: | |
95 | self.env['runtime']['debug'].writeDebugOut('getSessionInformation: Maybe no LoginD:' + str(e),debug.debugLevel.ERROR) | |
95 | 96 | #self.env['runtime']['debug'].writeDebugOut('getSessionInformation:' + str(self.env['screen']['autoIgnoreScreens']) + ' ' + str(self.env['general']) ,debug.debugLevel.INFO) |
96 | 97 | |
97 | 98 | def updateWatchdog(self,active , eventQueue): |
98 | 99 | try: |
100 | useVCSU = os.access('/dev/vcsu', os.R_OK) | |
99 | 101 | vcsa = {} |
100 | 102 | vcsaDevices = glob.glob('/dev/vcsa*') |
101 | for vcsaDev in vcsaDevices: | |
102 | index = vcsaDev[9:] | |
103 | vcsa[str(index)] = open(vcsaDev,'rb') | |
104 | ||
103 | vcsu = {} | |
104 | vcsuDevices = None | |
105 | lastScreenContent = b'' | |
105 | 106 | tty = open('/sys/devices/virtual/tty/tty0/active','r') |
106 | 107 | currScreen = str(tty.read()[3:-1]) |
107 | 108 | oldScreen = currScreen |
109 | for vcsaDev in vcsaDevices: | |
110 | index = str(vcsaDev[9:]) | |
111 | vcsa[index] = open(vcsaDev,'rb') | |
112 | if index == currScreen: | |
113 | lastScreenContent = vcsa[index].read() | |
114 | if useVCSU: | |
115 | vcsuDevices = glob.glob('/dev/vcsu*') | |
116 | for vcsuDev in vcsuDevices: | |
117 | index = str(vcsuDev[9:]) | |
118 | vcsu[index] = open(vcsuDev,'rb') | |
108 | 119 | self.updateCharMap(currScreen) |
109 | 120 | watchdog = select.epoll() |
110 | 121 | watchdog.register(vcsa[currScreen], select.POLLPRI | select.POLLERR) |
111 | 122 | watchdog.register(tty, select.POLLPRI | select.POLLERR) |
112 | while active.value == 1: | |
123 | while active.value: | |
113 | 124 | changes = watchdog.poll(1) |
114 | 125 | for change in changes: |
115 | 126 | fileno = change[0] |
116 | 127 | event = change[1] |
117 | 128 | if fileno == tty.fileno(): |
118 | self.env['runtime']['debug'].writeDebugOut('ScreenChange',debug.debugLevel.INFO) | |
129 | self.env['runtime']['debug'].writeDebugOut('ScreenChange',debug.debugLevel.INFO) | |
119 | 130 | tty.seek(0) |
120 | currScreen = str(tty.read()[3:-1]) | |
131 | currScreen = str(tty.read()[3:-1]) | |
121 | 132 | if currScreen != oldScreen: |
122 | 133 | try: |
123 | watchdog.unregister(vcsa[ oldScreen ]) | |
134 | watchdog.unregister(vcsa[oldScreen]) | |
124 | 135 | except: |
125 | 136 | pass |
126 | 137 | try: |
127 | watchdog.register(vcsa[ currScreen ], select.POLLPRI | select.POLLERR) | |
138 | watchdog.register(vcsa[currScreen], select.POLLPRI | select.POLLERR) | |
128 | 139 | except: |
129 | 140 | pass |
130 | self.updateCharMap(currScreen) | |
141 | self.updateCharMap(currScreen) | |
131 | 142 | oldScreen = currScreen |
132 | 143 | try: |
133 | vcsa[currScreen].seek(0) | |
134 | lastScreenContent = vcsa[currScreen].read() | |
144 | vcsa[currScreen].seek(0) | |
145 | lastScreenContent = vcsa[currScreen].read() | |
135 | 146 | except: |
136 | pass | |
147 | pass | |
148 | vcsuContent = None | |
149 | if useVCSU: | |
150 | vcsu[currScreen].seek(0) | |
151 | vcsuContent = vcsu[currScreen].read() | |
137 | 152 | eventQueue.put({"Type":fenrirEventType.ScreenChanged, |
138 | "Data":self.createScreenEventData(currScreen,lastScreenContent) | |
153 | "Data":self.createScreenEventData(currScreen, lastScreenContent, vcsuContent) | |
139 | 154 | }) |
140 | 155 | else: |
141 | self.env['runtime']['debug'].writeDebugOut('ScreenUpdate',debug.debugLevel.INFO) | |
142 | vcsa[currScreen].seek(0) | |
156 | self.env['runtime']['debug'].writeDebugOut('ScreenUpdate',debug.debugLevel.INFO) | |
157 | vcsa[currScreen].seek(0) | |
158 | time.sleep(0.01) | |
143 | 159 | dirtyContent = vcsa[currScreen].read() |
144 | screenContent = b'' | |
160 | screenContent = dirtyContent | |
161 | vcsuContent = None | |
145 | 162 | timeout = time.time() |
146 | while screenContent != dirtyContent: | |
147 | screenContent = dirtyContent | |
148 | if time.time() - timeout >= 0.4: | |
149 | break | |
150 | time.sleep(0.02) | |
151 | vcsa[currScreen].seek(0) | |
152 | dirtyContent = vcsa[currScreen].read() | |
163 | # error case | |
164 | if screenContent == b'': | |
165 | continue | |
166 | if lastScreenContent == b'': | |
167 | lastScreenContent = screenContent | |
168 | if (abs( int(screenContent[2]) - int(lastScreenContent[2])) in [1,2]) and \ | |
169 | (int(screenContent[3]) == int(lastScreenContent[3])): | |
170 | # Skip X Movement | |
171 | pass | |
172 | elif (abs( int(screenContent[3]) - int(lastScreenContent[3])) in [1]) and \ | |
173 | (int(screenContent[2]) == int(lastScreenContent[2])): | |
174 | # Skip Y Movement | |
175 | pass | |
176 | else: | |
177 | # anything else? wait for completion | |
178 | while True: | |
179 | screenContent = dirtyContent | |
180 | time.sleep(0.02) | |
181 | #r,_,_ = select.select([vcsa[currScreen]], [], [], 0.07) | |
182 | #if not vcsa[currScreen] in r: | |
183 | # break | |
184 | vcsa[currScreen].seek(0) | |
185 | dirtyContent = vcsa[currScreen].read() | |
186 | if screenContent == dirtyContent: | |
187 | break | |
188 | if time.time() - timeout >= 0.1: | |
189 | screenContent = dirtyContent | |
190 | break | |
191 | if useVCSU: | |
192 | vcsu[currScreen].seek(0) | |
193 | vcsuContent = vcsu[currScreen].read() | |
194 | lastScreenContent = screenContent | |
153 | 195 | eventQueue.put({"Type":fenrirEventType.ScreenUpdate, |
154 | "Data":self.createScreenEventData(currScreen,screenContent) | |
196 | "Data":self.createScreenEventData(currScreen, screenContent, vcsuContent) | |
155 | 197 | }) |
156 | 198 | except Exception as e: |
157 | 199 | self.env['runtime']['debug'].writeDebugOut('VCSA:updateWatchdog:' + str(e),debug.debugLevel.ERROR) |
158 | 200 | time.sleep(0.2) |
159 | ||
160 | ||
161 | def createScreenEventData(self, screen, content): | |
201 | ||
202 | def createScreenEventData(self, screen, vcsaContent, vcsuContent = None): | |
162 | 203 | eventData = { |
163 | 'bytes': content, | |
164 | 'lines': int( content[0]), | |
165 | 'columns': int( content[1]), | |
204 | 'bytes': vcsaContent, | |
205 | 'lines': int( vcsaContent[0]), | |
206 | 'columns': int( vcsaContent[1]), | |
166 | 207 | 'textCursor': |
167 | 208 | { |
168 | 'x': int( content[2]), | |
169 | 'y': int( content[3]) | |
209 | 'x': int( vcsaContent[2]), | |
210 | 'y': int( vcsaContent[3]) | |
170 | 211 | }, |
171 | 'screen': screen, | |
172 | 'screenUpdateTime': time.time(), | |
212 | 'screen': screen, | |
213 | 'screenUpdateTime': time.time(), | |
214 | 'text': '', | |
215 | 'attributes': [], | |
173 | 216 | } |
174 | eventData['text'], eventData['attributes'] =\ | |
175 | self.autoDecodeVCSA(content[4:], eventData['lines'], eventData['columns']) | |
176 | return eventData.copy() | |
217 | try: | |
218 | eventData['text'], eventData['attributes'] =\ | |
219 | self.autoDecodeVCSA(vcsaContent[4:], eventData['lines'], eventData['columns']) | |
220 | except: | |
221 | pass | |
222 | # VCSU seems to give b' ' instead of b'\x00\x00\x00' (tsp), deactivated until its fixed | |
223 | if vcsuContent != None: | |
224 | try: | |
225 | vcsuContentAsText = vcsuContent.decode('UTF-32') | |
226 | eventData['text'] = screen_utils.insertNewlines(vcsuContentAsText, eventData['columns']) | |
227 | except: | |
228 | pass | |
229 | return eventData.copy() | |
177 | 230 | def updateCharMap(self, screen): |
178 | 231 | self.charmap = {} |
179 | 232 | try: |
180 | 233 | tty = open('/dev/tty' + screen, 'rb') |
181 | 234 | except Exception as e: |
182 | 235 | self.env['runtime']['debug'].writeDebugOut('VCSA:updateCharMap:' + str(e),debug.debugLevel.ERROR) |
183 | return | |
236 | return | |
184 | 237 | GIO_UNIMAP = 0x4B66 |
185 | 238 | VT_GETHIFONTMASK = 0x560D |
186 | 239 | himask = array("H", (0,)) |
211 | 264 | for y in range(rows): |
212 | 265 | lineText = '' |
213 | 266 | lineAttrib = [] |
267 | blink = 0 | |
268 | bold = 0 | |
269 | ink = 7 | |
270 | paper = 0 | |
214 | 271 | for x in range(cols): |
215 | 272 | data = allData[i: i + 2] |
216 | i += 2 | |
273 | i += 2 | |
217 | 274 | if data == b' \x07': |
218 | 275 | #attr = 7 |
219 | 276 | #ink = 7 |
233 | 290 | lineAttrib.append(charAttrib) |
234 | 291 | lineText += ' ' |
235 | 292 | continue |
236 | (sh,) = unpack("=H", data) | |
237 | attr = (sh >> 8) & 0xFF | |
238 | ch = sh & 0xFF | |
239 | if self.hichar == 0x100: | |
240 | attr >>= 1 | |
241 | ink = attr & 0x0F | |
242 | paper = (attr>>4) & 0x0F | |
243 | blink = 0 | |
244 | if attr & 1: | |
245 | blink = 1 | |
246 | # blink seems to be set always, ignore for now | |
247 | blink = 0 | |
248 | bold = 0 | |
249 | if attr & 16: | |
250 | bold = 1 | |
251 | #if (ink != 7) or (paper != 0): | |
252 | # print(ink,paper) | |
253 | if sh & self.hichar: | |
254 | ch |= 0x100 | |
293 | ch = None | |
255 | 294 | try: |
256 | lineText += self.charmap[ch] | |
295 | (sh,) = unpack("=H", data) | |
296 | attr = (sh >> 8) & 0xFF | |
297 | ch = sh & 0xFF | |
298 | try: | |
299 | if sh & self.hichar: | |
300 | ch |= 0x100 | |
301 | except: | |
302 | ch = None | |
303 | if self.hichar == 0x100: | |
304 | attr >>= 1 | |
305 | ink = attr & 0x0F | |
306 | paper = (attr>>4) & 0x0F | |
307 | if attr & 1: | |
308 | blink = 1 | |
309 | # blink seems to be set always, ignore for now | |
310 | blink = 0 | |
311 | bold = 0 | |
312 | if attr & 16: | |
313 | bold = 1 | |
314 | #if (ink != 7) or (paper != 0): | |
315 | # print(ink,paper) | |
316 | except: | |
317 | pass | |
318 | try: | |
319 | lineText += self.charmap[ch] | |
257 | 320 | except KeyError: |
258 | 321 | lineText += '?' |
322 | ||
259 | 323 | charAttrib = [ |
260 | 324 | self.fgColorValues[ink], |
261 | 325 | self.bgColorValues[paper], |
280 | 344 | currScreen = self.env['screen']['newTTY'] |
281 | 345 | apps = subprocess.Popen('ps -t tty' + currScreen + ' -o comm,tty,stat', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n') |
282 | 346 | except Exception as e: |
283 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
347 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
284 | 348 | return |
285 | 349 | try: |
286 | 350 | for i in apps: |
295 | 359 | not "PS" == i[0]: |
296 | 360 | if "TTY"+currScreen in i[1]: |
297 | 361 | if self.env['screen']['newApplication'] != i[0]: |
298 | self.env['screen']['newApplication'] = i[0] | |
362 | self.env['screen']['newApplication'] = i[0] | |
299 | 363 | return |
300 | 364 | except Exception as e: |
301 | 365 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) |
302 |
27 | 27 | |
28 | 28 | def playFrequence(self, frequence = 1000, duration = 0.3, adjustVolume = 0): |
29 | 29 | if not self._initialized: |
30 | return | |
30 | return | |
31 | 31 | if interrupt: |
32 | 32 | self.cancel() |
33 | 33 | popenFrequenceCommand = shlex.split(self.frequenceCommand) |
35 | 35 | word = word.replace('fenrirVolume', str(self.volume + adjustVolume )) |
36 | 36 | word = word.replace('fenrirFreqDuration', str(duration)) |
37 | 37 | word = word.replace('fenrirFrequence', str(frequence)) |
38 | popenFrequenceCommand[idx] = word | |
38 | popenFrequenceCommand[idx] = word | |
39 | 39 | self.proc = subprocess.Popen(popenFrequenceCommand, stdin=None, stdout=None, stderr=None, shell=False) |
40 | 40 | self.soundType = 'frequence' |
41 | 41 | def playSoundFile(self, filePath, interrupt = True): |
42 | 42 | if not self._initialized: |
43 | return | |
43 | return | |
44 | 44 | if interrupt: |
45 | 45 | self.cancel() |
46 | 46 | popenSoundFileCommand = shlex.split(self.soundFileCommand) |
47 | 47 | for idx, word in enumerate(popenSoundFileCommand): |
48 | 48 | word = word.replace('fenrirVolume', str(self.volume )) |
49 | 49 | word = word.replace('fenrirSoundFile', str(filePath)) |
50 | popenSoundFileCommand[idx] = word | |
50 | popenSoundFileCommand[idx] = word | |
51 | 51 | self.proc = subprocess.Popen(popenSoundFileCommand, shell=False) |
52 | 52 | self.soundType = 'file' |
53 | 53 | def cancel(self): |
54 | 54 | if not self._initialized: |
55 | return | |
55 | return | |
56 | 56 | if self.soundType == '': |
57 | 57 | return |
58 | 58 | if self.soundType == 'file': |
59 | 59 | self.proc.kill() |
60 | 60 | if self.soundType == 'frequence': |
61 | self.proc.kill() | |
62 | self.soundType = '' | |
61 | self.proc.kill() | |
62 | self.soundType = '' |
9 | 9 | |
10 | 10 | _gstreamerAvailable = False |
11 | 11 | try: |
12 | import gi | |
13 | from gi.repository import GLib | |
12 | import gi | |
13 | from gi.repository import GLib | |
14 | 14 | gi.require_version('Gst', '1.0') |
15 | 15 | from gi.repository import Gst |
16 | _gstreamerAvailable, args = Gst.init_check(None) | |
16 | _gstreamerAvailable, args = Gst.init_check(None) | |
17 | 17 | except Exception as e: |
18 | 18 | _gstreamerAvailable = False |
19 | 19 | _availableError = str(e) |
27 | 27 | def initialize(self, environment): |
28 | 28 | self.env = environment |
29 | 29 | global _gstreamerAvailable |
30 | self._initialized = _gstreamerAvailable | |
30 | self._initialized = _gstreamerAvailable | |
31 | 31 | if not self._initialized: |
32 | 32 | global _availableError |
33 | self.environment['runtime']['debug'].writeDebugOut('Gstreamer not available ' + _availableError,debug.debugLevel.ERROR) | |
33 | self.environment['runtime']['debug'].writeDebugOut('Gstreamer not available ' + _availableError,debug.debugLevel.ERROR) | |
34 | 34 | return |
35 | 35 | self._player = Gst.ElementFactory.make('playbin', 'player') |
36 | 36 | bus = self._player.get_bus() |
47 | 47 | self._pipeline.add(self._source) |
48 | 48 | self._pipeline.add(self._sink) |
49 | 49 | self._source.link(self._sink) |
50 | self.mainloop = GLib.MainLoop() | |
50 | self.mainloop = GLib.MainLoop() | |
51 | 51 | self.thread = threading.Thread(target=self.mainloop.run) |
52 | 52 | self.thread.start() |
53 | 53 | |
65 | 65 | elif message.type == Gst.MessageType.ERROR: |
66 | 66 | self._player.set_state(Gst.State.NULL) |
67 | 67 | error, info = message.parse_error() |
68 | self.env['runtime']['debug'].writeDebugOut('GSTREAMER: _onPlayerMessage'+ str(error) + str(info),debug.debugLevel.WARNING) | |
68 | self.env['runtime']['debug'].writeDebugOut('GSTREAMER: _onPlayerMessage'+ str(error) + str(info),debug.debugLevel.WARNING) | |
69 | 69 | |
70 | 70 | def _onPipelineMessage(self, bus, message): |
71 | 71 | if not self._initialized: |
79 | 79 | |
80 | 80 | def _onTimeout(self, element): |
81 | 81 | if not self._initialized: |
82 | return | |
82 | return | |
83 | 83 | element.set_state(Gst.State.NULL) |
84 | 84 | |
85 | 85 | def playSoundFile(self, fileName, interrupt=True): |
86 | 86 | if not self._initialized: |
87 | return | |
87 | return | |
88 | 88 | if interrupt: |
89 | 89 | self.cancel() |
90 | self._player.set_property('volume', self.volume) | |
90 | 91 | self._player.set_property('uri', 'file://%s' % fileName) |
91 | 92 | self._player.set_state(Gst.State.PLAYING) |
92 | 93 | |
93 | 94 | def playFrequence(self, frequence, duration, adjustVolume, interrupt=True): |
94 | 95 | if not self._initialized: |
95 | return | |
96 | return | |
96 | 97 | if interrupt: |
97 | 98 | self.cancel() |
98 | self._source.set_property('volume', tone.volume) | |
99 | self._source.set_property('freq', tone.frequency) | |
100 | self._source.set_property('wave', tone.wave) | |
99 | self._source.set_property('volume', self.volume) | |
100 | self._source.set_property('freq', frequence) | |
101 | 101 | self._pipeline.set_state(Gst.State.PLAYING) |
102 | duration = int(1000 * tone.duration) | |
103 | 102 | GLib.timeout_add(duration, self._onTimeout, self._pipeline) |
104 | 103 | |
105 | 104 | def cancel(self, element=None): |
18 | 18 | def shutdown(self): |
19 | 19 | if self._isInitialized: |
20 | 20 | self.cancel() |
21 | self._isInitialized = False | |
21 | self._isInitialized = False | |
22 | 22 | print('Speech Debug Driver: Shutdown') |
23 | 23 | |
24 | 24 | def speak(self,text, queueable=True): |
32 | 32 | def cancel(self): |
33 | 33 | if not self._isInitialized: |
34 | 34 | return |
35 | print('Speech Debug Driver: Cancel') | |
35 | print('Speech Debug Driver: Cancel') | |
36 | 36 | |
37 | 37 | def setCallback(self, callback): |
38 | print('Speech Debug Driver: setCallback') | |
38 | print('Speech Debug Driver: setCallback') | |
39 | 39 | |
40 | 40 | def clear_buffer(self): |
41 | 41 | if not self._isInitialized: |
42 | 42 | return |
43 | print('Speech Debug Driver: clear_buffer') | |
43 | print('Speech Debug Driver: clear_buffer') | |
44 | 44 | |
45 | 45 | def setVoice(self, voice): |
46 | 46 | if not self._isInitialized: |
47 | 47 | return |
48 | print('Speech Debug Driver: setVoice:' + str(voice)) | |
48 | print('Speech Debug Driver: setVoice:' + str(voice)) | |
49 | 49 | |
50 | 50 | def setPitch(self, pitch): |
51 | 51 | if not self._isInitialized: |
52 | 52 | return |
53 | print('Speech Debug Driver: setPitch:' + str(pitch)) | |
53 | print('Speech Debug Driver: setPitch:' + str(pitch)) | |
54 | 54 | |
55 | 55 | def setRate(self, rate): |
56 | 56 | if not self._isInitialized: |
57 | 57 | return |
58 | print('Speech Debug Driver: setRate:' + str(rate)) | |
58 | print('Speech Debug Driver: setRate:' + str(rate)) | |
59 | 59 | |
60 | 60 | def setModule(self, module): |
61 | 61 | if not self._isInitialized: |
62 | return | |
63 | print('Speech Debug Driver: setModule:' + str(module)) | |
62 | return | |
63 | print('Speech Debug Driver: setModule:' + str(module)) | |
64 | 64 | |
65 | 65 | def setLanguage(self, language): |
66 | 66 | if not self._isInitialized: |
67 | 67 | return |
68 | print('Speech Debug Driver: setLanguage:' + str(language)) | |
68 | print('Speech Debug Driver: setLanguage:' + str(language)) | |
69 | 69 | |
70 | 70 | def setVolume(self, volume): |
71 | 71 | if not self._isInitialized: |
72 | return | |
72 | return | |
73 | 73 | print('Speech Debug Driver: setVolume:' + str(volume)) |
14 | 14 | def __init__(self): |
15 | 15 | speechDriver.__init__(self) |
16 | 16 | def initialize(self, environment): |
17 | self.env = environment | |
17 | self.env = environment | |
18 | 18 | try: |
19 | 19 | self.server = pexpect.spawn('tclsh ' + self.env['runtime']['settingsManager'].getSetting('speech', 'serverPath')) |
20 | self._isInitialized = True | |
20 | self._isInitialized = True | |
21 | 21 | except Exception as e: |
22 | self.env['runtime']['debug'].writeDebugOut('speechDriver:initialize:' + str(e),debug.debugLevel.ERROR) | |
22 | self.env['runtime']['debug'].writeDebugOut('speechDriver:initialize:' + str(e),debug.debugLevel.ERROR) | |
23 | 23 | |
24 | 24 | def shutdown(self): |
25 | 25 | if self.server: |
26 | 26 | try: |
27 | 27 | self.server.terminate() |
28 | 28 | except Exception as e: |
29 | self.env['runtime']['debug'].writeDebugOut('speechDriver:shutdown:self.server.terminate():' + str(e),debug.debugLevel.ERROR) | |
29 | self.env['runtime']['debug'].writeDebugOut('speechDriver:shutdown:self.server.terminate():' + str(e),debug.debugLevel.ERROR) | |
30 | 30 | |
31 | 31 | def speak(self,text, queueable=True): |
32 | 32 | if not self._isInitialized: |
44 | 44 | cleanText = 'tts_say \"' + cleanText +'\"' |
45 | 45 | self.server.sendline(cleanText) |
46 | 46 | except Exception as e: |
47 | self.env['runtime']['debug'].writeDebugOut('speechDriver:speak:self.server.sendline():' + str(e),debug.debugLevel.ERROR) | |
47 | self.env['runtime']['debug'].writeDebugOut('speechDriver:speak:self.server.sendline():' + str(e),debug.debugLevel.ERROR) | |
48 | 48 | |
49 | 49 | def cancel(self): |
50 | 50 | if not self._isInitialized: |
53 | 53 | self.server.sendline('stop') |
54 | 54 | except Exception as e: |
55 | 55 | print(e) |
56 | self.env['runtime']['debug'].writeDebugOut('speechDriver:cancel:self.server.sendline():' + str(e),debug.debugLevel.ERROR) | |
56 | self.env['runtime']['debug'].writeDebugOut('speechDriver:cancel:self.server.sendline():' + str(e),debug.debugLevel.ERROR) | |
57 | 57 | |
58 | 58 | def setRate(self, rate): |
59 | 59 | if not self._isInitialized: |
61 | 61 | try: |
62 | 62 | self.server.sendline('tts_set_speech_rate ' + str(int(rate * 400))) |
63 | 63 | except Exception as e: |
64 | self.env['runtime']['debug'].writeDebugOut('speechDriver:setRate:self.server.sendline():' + str(e),debug.debugLevel.ERROR) | |
64 | self.env['runtime']['debug'].writeDebugOut('speechDriver:setRate:self.server.sendline():' + str(e),debug.debugLevel.ERROR) | |
65 | 65 | |
66 | 66 | def setLanguage(self, language): |
67 | 67 | if not self._isInitialized: |
13 | 13 | self._es = None |
14 | 14 | |
15 | 15 | def initialize(self, environment): |
16 | self.env = environment | |
16 | self.env = environment | |
17 | 17 | try: |
18 | 18 | from espeak import espeak |
19 | 19 | self._es = espeak |
20 | 20 | self._isInitialized = True |
21 | 21 | except Exception as e: |
22 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
22 | self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) | |
23 | 23 | self._initialized = False |
24 | 24 | |
25 | 25 | def speak(self,text, interrupt=True): |
29 | 29 | self.cancel() |
30 | 30 | if self.language != None: |
31 | 31 | if self.language != '': |
32 | self._es.set_voice(self.language) | |
32 | self._es.set_voice(self.language) | |
33 | 33 | elif self.voice != None: |
34 | if self.voice != '': | |
35 | self._es.set_voice(self.voice) | |
34 | if self.voice != '': | |
35 | self._es.set_voice(self.voice) | |
36 | 36 | self._es.synth(text) |
37 | 37 | |
38 | 38 | def cancel(self): |
26 | 26 | self.speechThread = Thread(target=self.worker) |
27 | 27 | self.lock = Lock() |
28 | 28 | self.textQueue = speakQueue() |
29 | def initialize(self, environment): | |
29 | def initialize(self, environment): | |
30 | 30 | self.env = environment |
31 | 31 | self.minVolume = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMinVolume') |
32 | self.maxVolume = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMaxVolume') | |
33 | self.minPitch = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMinPitch') | |
32 | self.maxVolume = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMaxVolume') | |
33 | self.minPitch = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMinPitch') | |
34 | 34 | self.maxPitch = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMaxPitch') |
35 | 35 | self.minRate = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMinRate') |
36 | 36 | self.maxRate = self.env['runtime']['settingsManager'].getSettingAsInt('speech', 'fenrirMaxRate') |
39 | 39 | if self.speechCommand == '': |
40 | 40 | self.speechCommand = 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText"' |
41 | 41 | if False: #for debugging overwrite here |
42 | #self.speechCommand = 'spd-say --wait -r 100 -i 100 "fenrirText"' | |
43 | self.speechCommand = 'flite -t "fenrirText"' | |
42 | #self.speechCommand = 'spd-say --wait -r 100 -i 100 "fenrirText"' | |
43 | self.speechCommand = 'flite -t "fenrirText"' | |
44 | 44 | |
45 | self._isInitialized = True | |
45 | self._isInitialized = True | |
46 | 46 | if self._isInitialized: |
47 | self.speechThread.start() | |
47 | self.speechThread.start() | |
48 | 48 | def shutdown(self): |
49 | 49 | if not self._isInitialized: |
50 | 50 | return |
51 | self.cancel() | |
51 | self.cancel() | |
52 | 52 | self.textQueue.put(-1) |
53 | 53 | |
54 | 54 | def speak(self,text, queueable=True): |
55 | 55 | if not self._isInitialized: |
56 | 56 | return |
57 | if not queueable: | |
58 | self.cancel() | |
57 | if not queueable: | |
58 | self.cancel() | |
59 | 59 | utterance = { |
60 | 60 | 'text': text, |
61 | 61 | 'volume': self.volume, |
64 | 64 | 'module': self.module, |
65 | 65 | 'language': self.language, |
66 | 66 | 'voice': self.voice, |
67 | } | |
67 | } | |
68 | 68 | self.textQueue.put(utterance.copy()) |
69 | 69 | |
70 | 70 | def cancel(self): |
76 | 76 | try: |
77 | 77 | self.proc.terminate() |
78 | 78 | except Exception as e: |
79 | self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.terminate():' + str(e),debug.debugLevel.WARNING) | |
79 | self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.terminate():' + str(e),debug.debugLevel.WARNING) | |
80 | 80 | try: |
81 | 81 | self.proc.kill() |
82 | 82 | except Exception as e: |
83 | self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.kill():' + str(e),debug.debugLevel.WARNING) | |
84 | self.proc = None | |
83 | self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.kill():' + str(e),debug.debugLevel.WARNING) | |
84 | self.proc = None | |
85 | 85 | self.lock.release() |
86 | 86 | def setCallback(self, callback): |
87 | print('SpeechDummyDriver: setCallback') | |
87 | print('SpeechDummyDriver: setCallback') | |
88 | 88 | |
89 | 89 | def clear_buffer(self): |
90 | 90 | if not self._isInitialized: |
91 | 91 | return |
92 | self.textQueue.clear() | |
92 | self.textQueue.clear() | |
93 | 93 | |
94 | 94 | def setVoice(self, voice): |
95 | 95 | if not self._isInitialized: |
136 | 136 | if not 'text' in utterance: |
137 | 137 | continue |
138 | 138 | if not isinstance(utterance['text'],str): |
139 | continue | |
139 | continue | |
140 | 140 | if utterance['text'] == '': |
141 | 141 | continue |
142 | 142 | # check for valid data fields |
177 | 177 | popenSpeechCommand[idx] = word |
178 | 178 | |
179 | 179 | try: |
180 | self.env['runtime']['debug'].writeDebugOut('speechDriver:worker:' + ' '.join(popenSpeechCommand),debug.debugLevel.INFO) | |
180 | self.env['runtime']['debug'].writeDebugOut('speechDriver:worker:' + ' '.join(popenSpeechCommand),debug.debugLevel.INFO) | |
181 | 181 | self.lock.acquire(True) |
182 | 182 | self.proc = Popen(popenSpeechCommand, stdin=None, stdout=None, stderr=None, shell=False) |
183 | 183 | self.lock.release() |
184 | 184 | self.proc.wait() |
185 | 185 | except Exception as e: |
186 | self.env['runtime']['debug'].writeDebugOut('speechDriver:worker:' + str(e),debug.debugLevel.ERROR) | |
186 | self.env['runtime']['debug'].writeDebugOut('speechDriver:worker:' + str(e),debug.debugLevel.ERROR) | |
187 | 187 | |
188 | 188 | self.lock.acquire(True) |
189 | 189 | self.proc = None |
13 | 13 | speechDriver.__init__(self) |
14 | 14 | self._engine = None |
15 | 15 | def initialize(self, environment): |
16 | self.env = environment | |
16 | self.env = environment | |
17 | 17 | def shutdown(self): |
18 | 18 | if self._isInitialized: |
19 | self.cancel() | |
19 | self.cancel() | |
20 | 20 | self._engine.endLoop() |
21 | self._initialized = False | |
21 | self._initialized = False | |
22 | 22 | def eventLoop(self): |
23 | 23 | self._engine.startLoop() |
24 | 24 | def startEngine(self): |
27 | 27 | if self.module != '': |
28 | 28 | self._engine = pyttsx3.init(self.module) |
29 | 29 | else: |
30 | self._engine = pyttsx3.init() | |
30 | self._engine = pyttsx3.init() | |
31 | 31 | self.eventLoopThread = Thread(target=self.eventLoop) |
32 | 32 | self._isInitialized = True |
33 | 33 | self.eventLoopThread.start() |
34 | 34 | except Exception as e: |
35 | self.env['runtime']['debug'].writeDebugOut('SpeechDriver:initialize:' + str(e),debug.debugLevel.ERROR) | |
35 | self.env['runtime']['debug'].writeDebugOut('SpeechDriver:initialize:' + str(e),debug.debugLevel.ERROR) | |
36 | 36 | |
37 | 37 | def speak(self,text, interrupt=True): |
38 | 38 | if not self._isInitialized: |
39 | 39 | self.startEngine() |
40 | if not self._isInitialized: | |
40 | if not self._isInitialized: | |
41 | 41 | return |
42 | 42 | if not interrupt: |
43 | 43 | self.cancel() |
50 | 50 | except Exception as e: |
51 | 51 | self.env['runtime']['debug'].writeDebugOut('SpeechDriver:speak:rate:' + str(e),debug.debugLevel.ERROR) |
52 | 52 | try: |
53 | self._engine.setProperty('pitch', self.pitch) | |
53 | self._engine.setProperty('pitch', self.pitch) | |
54 | 54 | except Exception as e: |
55 | self.env['runtime']['debug'].writeDebugOut('SpeechDriver:speak:pitch:' + str(e),debug.debugLevel.ERROR) | |
55 | self.env['runtime']['debug'].writeDebugOut('SpeechDriver:speak:pitch:' + str(e),debug.debugLevel.ERROR) | |
56 | 56 | if self.language != None: |
57 | 57 | if self.language != '': |
58 | 58 | try: |
59 | self._engine.setProperty('voice', self.language) | |
59 | self._engine.setProperty('voice', self.language) | |
60 | 60 | except Exception as e: |
61 | self.env['runtime']['debug'].writeDebugOut('SpeechDriver:speak:language:' + str(e),debug.debugLevel.ERROR) | |
61 | self.env['runtime']['debug'].writeDebugOut('SpeechDriver:speak:language:' + str(e),debug.debugLevel.ERROR) | |
62 | 62 | |
63 | 63 | elif self.voice != None: |
64 | 64 | if self.voice != '': |
10 | 10 | class driver(speechDriver): |
11 | 11 | def __init__(self): |
12 | 12 | speechDriver.__init__(self) |
13 | self._sd = None | |
14 | 13 | |
15 | 14 | def initialize(self, environment): |
15 | self._sd = None | |
16 | 16 | self.env = environment |
17 | self._isInitialized = False | |
18 | self.language = '' | |
19 | self.voice = '' | |
20 | self.module = '' | |
17 | 21 | try: |
18 | 22 | import speechd |
19 | 23 | self._sd = speechd.SSIPClient('fenrir') |
20 | 24 | self._punct = speechd.PunctuationMode() |
21 | 25 | self._isInitialized = True |
22 | 26 | except Exception as e: |
23 | self.env['runtime']['debug'].writeDebugOut('speechDriver initialize:' + str(e),debug.debugLevel.ERROR) | |
24 | ||
27 | self.env['runtime']['debug'].writeDebugOut('speechDriver initialize:' + str(e),debug.debugLevel.ERROR) | |
28 | ||
25 | 29 | def shutdown(self): |
26 | 30 | if not self._isInitialized: |
27 | 31 | return |
28 | 32 | self.cancel() |
29 | 33 | try: |
30 | 34 | self._sd.close() |
31 | except: | |
35 | except Exception as e: | |
32 | 36 | pass |
33 | self._isInitialized = False | |
34 | ||
37 | self._isInitialized = False | |
38 | ||
35 | 39 | def speak(self,text, queueable=True): |
36 | 40 | if not queueable: |
37 | self.cancel() | |
41 | self.cancel() | |
42 | if not self._isInitialized: | |
43 | self.initialize(self.env) | |
44 | if not queueable: | |
45 | self.cancel() | |
46 | if not self._isInitialized: | |
47 | return | |
48 | ||
49 | try: | |
50 | if self.module != '': | |
51 | self._sd.set_output_module(self.module) | |
52 | except Exception as e: | |
53 | self.env['runtime']['debug'].writeDebugOut('speechDriver setModule:' + str(e),debug.debugLevel.ERROR) | |
54 | ||
55 | try: | |
56 | if self.language != '': | |
57 | self._sd.set_language(self.language) | |
58 | except Exception as e: | |
59 | self.env['runtime']['debug'].writeDebugOut('speechDriver set_language:' + str(e),debug.debugLevel.ERROR) | |
60 | ||
61 | try: | |
62 | if self.voice != '': | |
63 | self._sd.set_synthesis_voice(self.voice) | |
64 | except Exception as e: | |
65 | self.env['runtime']['debug'].writeDebugOut('speechDriver setVoice:' + str(e),debug.debugLevel.ERROR) | |
66 | ||
67 | try: | |
68 | self._sd.set_punctuation(self._punct.NONE) | |
69 | except Exception as e: | |
70 | self.env['runtime']['debug'].writeDebugOut('speechDriver set_punctuation:' + str(e),debug.debugLevel.ERROR) | |
71 | ||
72 | try: | |
73 | self._sd.speak(text) | |
74 | except Exception as e: | |
75 | self.env['runtime']['debug'].writeDebugOut('speechDriver speak:' + str(e),debug.debugLevel.ERROR) | |
76 | self._isInitialized = False | |
77 | ||
78 | def cancel(self): | |
38 | 79 | if not self._isInitialized: |
39 | 80 | self.initialize(self.env) |
40 | 81 | if not self._isInitialized: |
41 | 82 | return |
42 | 83 | try: |
43 | self._sd.set_output_module(self.module) | |
84 | self._sd.cancel() | |
44 | 85 | except Exception as e: |
45 | self.env['runtime']['debug'].writeDebugOut('speechDriver setModule:' + str(e),debug.debugLevel.ERROR) | |
46 | ||
47 | try: | |
48 | if self.voice: | |
49 | if self.voice != '': | |
50 | self._sd.set_voice(self.voice) | |
51 | except Exception as e: | |
52 | self.env['runtime']['debug'].writeDebugOut('speechDriver setVoice:' + str(e),debug.debugLevel.ERROR) | |
53 | try: | |
54 | if self.language != '': | |
55 | self._sd.set_synthesis_voice(self.language) | |
56 | self._sd.set_punctuation(self._punct.NONE) | |
57 | self._sd.speak(text) | |
58 | except Exception as e: | |
59 | self.env['runtime']['debug'].writeDebugOut('speechDriver speak:' + str(e),debug.debugLevel.ERROR) | |
86 | self.env['runtime']['debug'].writeDebugOut('speechDriver cancel:' + str(e),debug.debugLevel.ERROR) | |
60 | 87 | self._isInitialized = False |
61 | 88 | |
62 | def cancel(self): | |
63 | if not self._isInitialized: | |
64 | return | |
65 | try: | |
66 | self._sd.cancel() | |
67 | except Exception as e: | |
68 | self.env['runtime']['debug'].writeDebugOut('speechDriver cancel:' + str(e),debug.debugLevel.ERROR) | |
69 | self._isInitialized = False | |
70 | ||
71 | 89 | def setPitch(self, pitch): |
72 | 90 | if not self._isInitialized: |
73 | 91 | return |
74 | 92 | try: |
75 | 93 | self._sd.set_pitch(int(-100 + pitch * 200)) |
76 | 94 | except Exception as e: |
77 | self.env['runtime']['debug'].writeDebugOut('speechDriver setPitch:' + str(e),debug.debugLevel.ERROR) | |
95 | self.env['runtime']['debug'].writeDebugOut('speechDriver setPitch:' + str(e),debug.debugLevel.ERROR) | |
78 | 96 | |
79 | 97 | def setRate(self, rate): |
80 | 98 | if not self._isInitialized: |
82 | 100 | try: |
83 | 101 | self._sd.set_rate(int(-100 + rate * 200)) |
84 | 102 | except Exception as e: |
85 | self.env['runtime']['debug'].writeDebugOut('speechDriver setRate:' + str(e),debug.debugLevel.ERROR) | |
86 | ||
103 | self.env['runtime']['debug'].writeDebugOut('speechDriver setRate:' + str(e),debug.debugLevel.ERROR) | |
104 | ||
87 | 105 | def setVolume(self, volume): |
88 | 106 | if not self._isInitialized: |
89 | 107 | return |
90 | try: | |
108 | try: | |
91 | 109 | self._sd.set_volume(int(-100 + volume * 200)) |
92 | 110 | except Exception as e: |
93 | self.env['runtime']['debug'].writeDebugOut('speechDriver setVolume:' + str(e),debug.debugLevel.ERROR) | |
111 | self.env['runtime']['debug'].writeDebugOut('speechDriver setVolume:' + str(e),debug.debugLevel.ERROR) |
10 | 10 | endOfScreen = False |
11 | 11 | if currText == '': |
12 | 12 | return -1, -1, '', endOfScreen |
13 | wrappedLines = currText.split('\n') | |
13 | wrappedLines = currText.split('\n') | |
14 | 14 | x = currX |
15 | 15 | y = currY |
16 | 16 | if y - 1 >= 0: |
17 | 17 | y -= 1 |
18 | 18 | else: |
19 | endOfScreen = True | |
19 | endOfScreen = True | |
20 | 20 | x = 0 |
21 | 21 | currLine = '' |
22 | 22 | if not endOfScreen: |
23 | currLine = wrappedLines[y] | |
23 | currLine = wrappedLines[y] | |
24 | 24 | return x, y, currLine, endOfScreen |
25 | 25 | |
26 | 26 | def getCurrentLine(currX,currY, currText): |
27 | 27 | if currText == '': |
28 | 28 | return -1, -1, '' |
29 | wrappedLines = currText.split('\n') | |
29 | wrappedLines = currText.split('\n') | |
30 | 30 | x = currX |
31 | 31 | y = currY |
32 | 32 | x = 0 |
37 | 37 | endOfScreen = False |
38 | 38 | if currText == '': |
39 | 39 | return -1, -1, '', endOfScreen |
40 | wrappedLines = currText.split('\n') | |
40 | wrappedLines = currText.split('\n') | |
41 | 41 | x = currX |
42 | 42 | y = currY |
43 | 43 | if y + 1 < len(wrappedLines): |
4 | 4 | # By Chrys, Storm Dragon, and contributers. |
5 | 5 | |
6 | 6 | from fenrirscreenreader.core import debug |
7 | import getpass, time, string, select, os | |
7 | import getpass, time, string, os | |
8 | from select import select | |
8 | 9 | |
9 | 10 | def removeNonprintable(text): |
10 | 11 | # Get the difference of all ASCII characters from the set of printable characters |
30 | 31 | 'screen': content['screen'], |
31 | 32 | 'text': content['text'], |
32 | 33 | 'attributes': content['attributes'], |
33 | 'screenUpdateTime': time.time(), | |
34 | 'screenUpdateTime': time.time(), | |
34 | 35 | } |
35 | 36 | return eventData.copy() |
36 | 37 | |
37 | def hasMore(fd, timetout=0.1): | |
38 | r, _, _ = select.select([fd], [], [], timetout) | |
39 | return (fd in r) | |
40 | def hasMoreWhat(fdList, timetout=0.1): | |
38 | def hasMore(fd, timetout=0.05): | |
39 | r, _, _ = select([fd], [], [], timetout) | |
40 | return (fd in r) | |
41 | ||
42 | def hasMoreWhat(fdList, timetout=0.05): | |
41 | 43 | if not isinstance(fdList, list): |
42 | 44 | return [] |
43 | 45 | elif fdList == []: |
44 | 46 | return [] |
45 | r, _, _ = select.select(fdList, [], [], timetout) | |
47 | r, _, _ = select(fdList, [], [], timetout) | |
46 | 48 | return r |
49 | ||
47 | 50 | def isValidShell(shell = ''): |
48 | 51 | if not isinstance(shell, str): |
49 | 52 | return False |
57 | 60 | except: |
58 | 61 | return False |
59 | 62 | return True |
63 | ||
60 | 64 | def getShell(): |
61 | 65 | try: |
62 | 66 | shell = os.environ["FENRIRSHELL"] |
63 | if isValidShell(shell): | |
67 | if isValidShell(shell): | |
64 | 68 | return shell |
65 | 69 | except: |
66 | 70 | pass |
78 | 82 | (username, encrypwd, uid, gid, gecos, homedir, shell) = user.split(':') |
79 | 83 | shell = shell.replace('\n','') |
80 | 84 | if username == getpass.getuser(): |
81 | if isValidShell(shell): | |
85 | if isValidShell(shell): | |
82 | 86 | return shell |
83 | 87 | except: |
84 | 88 | pass |
4 | 4 | msgid "" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: PACKAGE VERSION\n" |
7 | "POT-Creation-Date: 2017-02-26 22:19+UTC\n" | |
7 | "POT-Creation-Date: 2020-04-19 08:56+0700\n" | |
8 | 8 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
9 | 9 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
10 | 10 | "Language-Team: LANGUAGE <LL@li.org>\n" |
11 | 11 | "MIME-Version: 1.0\n" |
12 | "Content-Type: text/plain; charset=UTF-8\n" | |
12 | "Content-Type: text/plain; charset=cp1251\n" | |
13 | 13 | "Content-Transfer-Encoding: 8bit\n" |
14 | 14 | "Generated-By: pygettext.py 1.5\n" |
15 | 15 | |
16 | 16 | |
17 | #: ../src/fenrir/commands/commands/add_word_to_spell_check.py:27 | |
17 | #: ../src/fenrirscreenreader\commands\commands\add_word_to_spell_check.py:27 | |
18 | 18 | msgid "adds the current word to the exceptions dictionary" |
19 | 19 | msgstr "" |
20 | 20 | |
21 | #: ../src/fenrir/commands/commands/add_word_to_spell_check.py:34 | |
22 | #: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:34 | |
23 | #: ../src/fenrir/commands/commands/spell_check.py:29 | |
24 | #: ../src/fenrir/commands/commands/spell_check.py:36 | |
21 | #: ../src/fenrirscreenreader\commands\commands\add_word_to_spell_check.py:34 | |
22 | #: ../src/fenrirscreenreader\commands\commands\remove_word_from_spell_check.py:34 | |
23 | #: ../src/fenrirscreenreader\commands\commands\spell_check.py:35 | |
25 | 24 | msgid "pyenchant is not installed" |
26 | 25 | msgstr "" |
27 | 26 | |
28 | #: ../src/fenrir/commands/commands/add_word_to_spell_check.py:49 | |
29 | msgid "{0} is already in dict" | |
30 | msgstr "" | |
31 | ||
32 | #: ../src/fenrir/commands/commands/add_word_to_spell_check.py:52 | |
33 | msgid "{0} added" | |
34 | msgstr "" | |
35 | ||
36 | #: ../src/fenrir/commands/commands/bookmark_1.py:19 | |
37 | #: ../src/fenrir/commands/commands/bookmark_10.py:19 | |
38 | #: ../src/fenrir/commands/commands/bookmark_2.py:19 | |
39 | #: ../src/fenrir/commands/commands/bookmark_3.py:19 | |
40 | #: ../src/fenrir/commands/commands/bookmark_4.py:19 | |
41 | #: ../src/fenrir/commands/commands/bookmark_5.py:19 | |
42 | #: ../src/fenrir/commands/commands/bookmark_6.py:19 | |
43 | #: ../src/fenrir/commands/commands/bookmark_7.py:19 | |
44 | #: ../src/fenrir/commands/commands/bookmark_8.py:19 | |
45 | #: ../src/fenrir/commands/commands/bookmark_9.py:19 | |
27 | #: ../src/fenrirscreenreader\commands\commands\add_word_to_spell_check.py:49 | |
28 | msgid "{0} is already in dictionary" | |
29 | msgstr "" | |
30 | ||
31 | #: ../src/fenrirscreenreader\commands\commands\add_word_to_spell_check.py:52 | |
32 | msgid "{0} added to dictionary" | |
33 | msgstr "" | |
34 | ||
35 | #: ../src/fenrirscreenreader\commands\commands\attribute_cursor.py:18 | |
36 | #: ../src/fenrirscreenreader\commands\onCursorChange\85000-has_attribute.py:18 | |
37 | msgid "Reads attributes of current cursor position" | |
38 | msgstr "" | |
39 | ||
40 | #: ../src/fenrirscreenreader\commands\commands\bookmark_1.py:19 | |
41 | #: ../src/fenrirscreenreader\commands\commands\bookmark_10.py:19 | |
42 | #: ../src/fenrirscreenreader\commands\commands\bookmark_2.py:19 | |
43 | #: ../src/fenrirscreenreader\commands\commands\bookmark_3.py:19 | |
44 | #: ../src/fenrirscreenreader\commands\commands\bookmark_4.py:19 | |
45 | #: ../src/fenrirscreenreader\commands\commands\bookmark_5.py:19 | |
46 | #: ../src/fenrirscreenreader\commands\commands\bookmark_6.py:19 | |
47 | #: ../src/fenrirscreenreader\commands\commands\bookmark_7.py:19 | |
48 | #: ../src/fenrirscreenreader\commands\commands\bookmark_8.py:19 | |
49 | #: ../src/fenrirscreenreader\commands\commands\bookmark_9.py:19 | |
46 | 50 | msgid "read Bookmark {0}" |
47 | 51 | msgstr "" |
48 | 52 | |
49 | #: ../src/fenrir/commands/commands/bookmark_1.py:24 | |
50 | #: ../src/fenrir/commands/commands/bookmark_10.py:24 | |
51 | #: ../src/fenrir/commands/commands/bookmark_2.py:24 | |
52 | #: ../src/fenrir/commands/commands/bookmark_3.py:24 | |
53 | #: ../src/fenrir/commands/commands/bookmark_4.py:24 | |
54 | #: ../src/fenrir/commands/commands/bookmark_5.py:24 | |
55 | #: ../src/fenrir/commands/commands/bookmark_6.py:24 | |
56 | #: ../src/fenrir/commands/commands/bookmark_7.py:24 | |
57 | #: ../src/fenrir/commands/commands/bookmark_8.py:24 | |
58 | #: ../src/fenrir/commands/commands/bookmark_9.py:24 | |
53 | #: ../src/fenrirscreenreader\commands\commands\bookmark_1.py:24 | |
54 | #: ../src/fenrirscreenreader\commands\commands\bookmark_10.py:24 | |
55 | #: ../src/fenrirscreenreader\commands\commands\bookmark_2.py:24 | |
56 | #: ../src/fenrirscreenreader\commands\commands\bookmark_3.py:24 | |
57 | #: ../src/fenrirscreenreader\commands\commands\bookmark_4.py:24 | |
58 | #: ../src/fenrirscreenreader\commands\commands\bookmark_5.py:24 | |
59 | #: ../src/fenrirscreenreader\commands\commands\bookmark_6.py:24 | |
60 | #: ../src/fenrirscreenreader\commands\commands\bookmark_7.py:24 | |
61 | #: ../src/fenrirscreenreader\commands\commands\bookmark_8.py:24 | |
62 | #: ../src/fenrirscreenreader\commands\commands\bookmark_9.py:24 | |
59 | 63 | msgid "Bookmark {0} not set" |
60 | 64 | msgstr "" |
61 | 65 | |
62 | #: ../src/fenrir/commands/commands/bookmark_1.py:27 | |
63 | #: ../src/fenrir/commands/commands/bookmark_1.py:30 | |
64 | #: ../src/fenrir/commands/commands/bookmark_10.py:27 | |
65 | #: ../src/fenrir/commands/commands/bookmark_10.py:30 | |
66 | #: ../src/fenrir/commands/commands/bookmark_2.py:27 | |
67 | #: ../src/fenrir/commands/commands/bookmark_2.py:30 | |
68 | #: ../src/fenrir/commands/commands/bookmark_3.py:27 | |
69 | #: ../src/fenrir/commands/commands/bookmark_3.py:30 | |
70 | #: ../src/fenrir/commands/commands/bookmark_4.py:27 | |
71 | #: ../src/fenrir/commands/commands/bookmark_4.py:30 | |
72 | #: ../src/fenrir/commands/commands/bookmark_5.py:27 | |
73 | #: ../src/fenrir/commands/commands/bookmark_5.py:30 | |
74 | #: ../src/fenrir/commands/commands/bookmark_6.py:27 | |
75 | #: ../src/fenrir/commands/commands/bookmark_6.py:30 | |
76 | #: ../src/fenrir/commands/commands/bookmark_7.py:27 | |
77 | #: ../src/fenrir/commands/commands/bookmark_7.py:30 | |
78 | #: ../src/fenrir/commands/commands/bookmark_8.py:27 | |
79 | #: ../src/fenrir/commands/commands/bookmark_8.py:30 | |
80 | #: ../src/fenrir/commands/commands/bookmark_9.py:27 | |
81 | #: ../src/fenrir/commands/commands/bookmark_9.py:30 | |
66 | #: ../src/fenrirscreenreader\commands\commands\bookmark_1.py:27 | |
67 | #: ../src/fenrirscreenreader\commands\commands\bookmark_1.py:30 | |
68 | #: ../src/fenrirscreenreader\commands\commands\bookmark_10.py:27 | |
69 | #: ../src/fenrirscreenreader\commands\commands\bookmark_10.py:30 | |
70 | #: ../src/fenrirscreenreader\commands\commands\bookmark_2.py:27 | |
71 | #: ../src/fenrirscreenreader\commands\commands\bookmark_2.py:30 | |
72 | #: ../src/fenrirscreenreader\commands\commands\bookmark_3.py:27 | |
73 | #: ../src/fenrirscreenreader\commands\commands\bookmark_3.py:30 | |
74 | #: ../src/fenrirscreenreader\commands\commands\bookmark_4.py:27 | |
75 | #: ../src/fenrirscreenreader\commands\commands\bookmark_4.py:30 | |
76 | #: ../src/fenrirscreenreader\commands\commands\bookmark_5.py:27 | |
77 | #: ../src/fenrirscreenreader\commands\commands\bookmark_5.py:30 | |
78 | #: ../src/fenrirscreenreader\commands\commands\bookmark_6.py:27 | |
79 | #: ../src/fenrirscreenreader\commands\commands\bookmark_6.py:30 | |
80 | #: ../src/fenrirscreenreader\commands\commands\bookmark_7.py:27 | |
81 | #: ../src/fenrirscreenreader\commands\commands\bookmark_7.py:30 | |
82 | #: ../src/fenrirscreenreader\commands\commands\bookmark_8.py:27 | |
83 | #: ../src/fenrirscreenreader\commands\commands\bookmark_8.py:30 | |
84 | #: ../src/fenrirscreenreader\commands\commands\bookmark_9.py:27 | |
85 | #: ../src/fenrirscreenreader\commands\commands\bookmark_9.py:30 | |
82 | 86 | msgid "Bookmark for application {0} not set" |
83 | 87 | msgstr "" |
84 | 88 | |
85 | #: ../src/fenrir/commands/commands/bookmark_1.py:43 | |
86 | #: ../src/fenrir/commands/commands/bookmark_10.py:43 | |
87 | #: ../src/fenrir/commands/commands/bookmark_2.py:43 | |
88 | #: ../src/fenrir/commands/commands/bookmark_3.py:43 | |
89 | #: ../src/fenrir/commands/commands/bookmark_4.py:43 | |
90 | #: ../src/fenrir/commands/commands/bookmark_5.py:43 | |
91 | #: ../src/fenrir/commands/commands/bookmark_6.py:43 | |
92 | #: ../src/fenrir/commands/commands/bookmark_7.py:43 | |
93 | #: ../src/fenrir/commands/commands/bookmark_8.py:43 | |
94 | #: ../src/fenrir/commands/commands/bookmark_9.py:43 | |
95 | #: ../src/fenrir/commands/commands/curr_screen_after_cursor.py:27 | |
96 | #: ../src/fenrir/commands/commands/curr_screen_before_cursor.py:30 | |
97 | #: ../src/fenrir/commands/commands/cursor_read_to_end_of_line.py:27 | |
98 | #: ../src/fenrir/commands/commands/indent_curr_line.py:31 | |
99 | #: ../src/fenrir/commands/commands/marked_text.py:33 | |
100 | #: ../src/fenrir/commands/commands/present_first_line.py:25 | |
101 | #: ../src/fenrir/commands/commands/present_last_line.py:25 | |
102 | #: ../src/fenrir/commands/commands/review_curr_char_phonetic.py:27 | |
103 | #: ../src/fenrir/commands/commands/review_curr_line.py:27 | |
104 | #: ../src/fenrir/commands/commands/review_curr_word.py:27 | |
105 | #: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:27 | |
106 | #: ../src/fenrir/commands/commands/review_line_begin.py:27 | |
107 | #: ../src/fenrir/commands/commands/review_next_line.py:29 | |
108 | #: ../src/fenrir/commands/commands/review_next_word.py:29 | |
109 | #: ../src/fenrir/commands/commands/review_next_word_phonetic.py:27 | |
110 | #: ../src/fenrir/commands/commands/review_prev_line.py:27 | |
111 | #: ../src/fenrir/commands/commands/review_prev_word.py:27 | |
112 | #: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:27 | |
113 | #: ../src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py:38 | |
114 | #: ../src/fenrir/commands/onInput/72000-history.py:50 | |
89 | #: ../src/fenrirscreenreader\commands\commands\bookmark_1.py:43 | |
90 | #: ../src/fenrirscreenreader\commands\commands\bookmark_10.py:43 | |
91 | #: ../src/fenrirscreenreader\commands\commands\bookmark_2.py:43 | |
92 | #: ../src/fenrirscreenreader\commands\commands\bookmark_3.py:43 | |
93 | #: ../src/fenrirscreenreader\commands\commands\bookmark_4.py:43 | |
94 | #: ../src/fenrirscreenreader\commands\commands\bookmark_5.py:43 | |
95 | #: ../src/fenrirscreenreader\commands\commands\bookmark_6.py:43 | |
96 | #: ../src/fenrirscreenreader\commands\commands\bookmark_7.py:43 | |
97 | #: ../src/fenrirscreenreader\commands\commands\bookmark_8.py:43 | |
98 | #: ../src/fenrirscreenreader\commands\commands\bookmark_9.py:43 | |
99 | #: ../src/fenrirscreenreader\commands\commands\curr_screen_after_cursor.py:27 | |
100 | #: ../src/fenrirscreenreader\commands\commands\curr_screen_before_cursor.py:30 | |
101 | #: ../src/fenrirscreenreader\commands\commands\cursor_read_to_end_of_line.py:27 | |
102 | #: ../src/fenrirscreenreader\commands\commands\indent_curr_line.py:31 | |
103 | #: ../src/fenrirscreenreader\commands\commands\marked_text.py:33 | |
104 | #: ../src/fenrirscreenreader\commands\commands\present_first_line.py:25 | |
105 | #: ../src/fenrirscreenreader\commands\commands\present_last_line.py:25 | |
106 | #: ../src/fenrirscreenreader\commands\commands\review_curr_char_phonetic.py:27 | |
107 | #: ../src/fenrirscreenreader\commands\commands\review_curr_line.py:27 | |
108 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word.py:27 | |
109 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word_phonetic.py:27 | |
110 | #: ../src/fenrirscreenreader\commands\commands\review_line_begin.py:27 | |
111 | #: ../src/fenrirscreenreader\commands\commands\review_next_line.py:29 | |
112 | #: ../src/fenrirscreenreader\commands\commands\review_next_word.py:29 | |
113 | #: ../src/fenrirscreenreader\commands\commands\review_next_word_phonetic.py:27 | |
114 | #: ../src/fenrirscreenreader\commands\commands\review_prev_line.py:27 | |
115 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word.py:27 | |
116 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word_phonetic.py:27 | |
117 | #: ../src/fenrirscreenreader\commands\onCursorChange\65000-present_line_if_cursor_change_vertical.py:37 | |
118 | #: ../src/fenrirscreenreader\commands\onScreenUpdate\60000-history.py:59 | |
115 | 119 | msgid "blank" |
116 | 120 | msgstr "" |
117 | 121 | |
118 | #: ../src/fenrir/commands/commands/braille_flush.py:17 | |
119 | msgid "flush the braille device if a message is written on" | |
120 | msgstr "" | |
121 | ||
122 | #: ../src/fenrir/commands/commands/braille_pan_left.py:17 | |
122 | #: ../src/fenrirscreenreader\commands\commands\braille_flush.py:17 | |
123 | msgid "Clear the Braille device if it is displaying a message" | |
124 | msgstr "" | |
125 | ||
126 | #: ../src/fenrirscreenreader\commands\commands\braille_pan_left.py:17 | |
123 | 127 | msgid "Move braille view to the left." |
124 | 128 | msgstr "" |
125 | 129 | |
126 | #: ../src/fenrir/commands/commands/braille_pan_right.py:17 | |
130 | #: ../src/fenrirscreenreader\commands\commands\braille_pan_right.py:17 | |
127 | 131 | msgid "Move braille view to the right." |
128 | 132 | msgstr "" |
129 | 133 | |
130 | #: ../src/fenrir/commands/commands/braille_return_to_cursor.py:17 | |
134 | #: ../src/fenrirscreenreader\commands\commands\braille_return_to_cursor.py:17 | |
131 | 135 | msgid "Set the braille view back to cursor." |
132 | 136 | msgstr "" |
133 | 137 | |
134 | #: ../src/fenrir/commands/commands/clear_bookmark_1.py:17 | |
135 | #: ../src/fenrir/commands/commands/clear_bookmark_10.py:17 | |
136 | #: ../src/fenrir/commands/commands/clear_bookmark_2.py:17 | |
137 | #: ../src/fenrir/commands/commands/clear_bookmark_3.py:17 | |
138 | #: ../src/fenrir/commands/commands/clear_bookmark_4.py:17 | |
139 | #: ../src/fenrir/commands/commands/clear_bookmark_5.py:17 | |
140 | #: ../src/fenrir/commands/commands/clear_bookmark_6.py:17 | |
141 | #: ../src/fenrir/commands/commands/clear_bookmark_7.py:17 | |
142 | #: ../src/fenrir/commands/commands/clear_bookmark_8.py:17 | |
143 | #: ../src/fenrir/commands/commands/clear_bookmark_9.py:17 | |
138 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_1.py:17 | |
139 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_10.py:17 | |
140 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_2.py:17 | |
141 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_3.py:17 | |
142 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_4.py:17 | |
143 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_5.py:17 | |
144 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_6.py:17 | |
145 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_7.py:17 | |
146 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_8.py:17 | |
147 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_9.py:17 | |
144 | 148 | msgid "remove Bookmark {0}" |
145 | 149 | msgstr "" |
146 | 150 | |
147 | #: ../src/fenrir/commands/commands/clear_bookmark_1.py:24 | |
148 | #: ../src/fenrir/commands/commands/clear_bookmark_10.py:24 | |
149 | #: ../src/fenrir/commands/commands/clear_bookmark_2.py:24 | |
150 | #: ../src/fenrir/commands/commands/clear_bookmark_3.py:24 | |
151 | #: ../src/fenrir/commands/commands/clear_bookmark_4.py:24 | |
152 | #: ../src/fenrir/commands/commands/clear_bookmark_5.py:24 | |
153 | #: ../src/fenrir/commands/commands/clear_bookmark_6.py:24 | |
154 | #: ../src/fenrir/commands/commands/clear_bookmark_7.py:24 | |
155 | #: ../src/fenrir/commands/commands/clear_bookmark_8.py:24 | |
156 | #: ../src/fenrir/commands/commands/clear_bookmark_9.py:24 | |
151 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_1.py:24 | |
152 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_10.py:24 | |
153 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_2.py:24 | |
154 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_3.py:24 | |
155 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_4.py:24 | |
156 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_5.py:24 | |
157 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_6.py:24 | |
158 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_7.py:24 | |
159 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_8.py:24 | |
160 | #: ../src/fenrirscreenreader\commands\commands\clear_bookmark_9.py:24 | |
157 | 161 | msgid "Bookmark {0} removed for application {1}" |
158 | 162 | msgstr "" |
159 | 163 | |
160 | #: ../src/fenrir/commands/commands/clear_clipboard.py:17 | |
164 | #: ../src/fenrirscreenreader\commands\commands\clear_clipboard.py:17 | |
161 | 165 | msgid "clears the currently selected clipboard" |
162 | 166 | msgstr "" |
163 | 167 | |
164 | #: ../src/fenrir/commands/commands/clear_clipboard.py:22 | |
168 | #: ../src/fenrirscreenreader\commands\commands\clear_clipboard.py:21 | |
165 | 169 | msgid "clipboard cleared" |
166 | 170 | msgstr "" |
167 | 171 | |
168 | #: ../src/fenrir/commands/commands/clear_window_application.py:17 | |
172 | #: ../src/fenrirscreenreader\commands\commands\clear_window_application.py:17 | |
169 | 173 | msgid "Turn off window mode for application" |
170 | 174 | msgstr "" |
171 | 175 | |
172 | #: ../src/fenrir/commands/commands/clear_window_application.py:22 | |
176 | #: ../src/fenrirscreenreader\commands\commands\clear_window_application.py:22 | |
173 | 177 | msgid "Window Mode off for application {0}" |
174 | 178 | msgstr "" |
175 | 179 | |
176 | #: ../src/fenrir/commands/commands/clear_window_application.py:24 | |
180 | #: ../src/fenrirscreenreader\commands\commands\clear_window_application.py:24 | |
177 | 181 | msgid "Not in window Mode" |
178 | 182 | msgstr "" |
179 | 183 | |
180 | #: ../src/fenrir/commands/commands/copy_marked_to_clipboard.py:18 | |
184 | #: | |
185 | #: ../src/fenrirscreenreader\commands\commands\copy_last_echo_to_clipboard.py:18 | |
186 | msgid "copies last presented text to the clipboard" | |
187 | msgstr "" | |
188 | ||
189 | #: ../src/fenrirscreenreader\commands\commands\copy_marked_to_clipboard.py:18 | |
181 | 190 | msgid "copies marked text to the currently selected clipboard" |
182 | 191 | msgstr "" |
183 | 192 | |
184 | #: ../src/fenrir/commands/commands/copy_marked_to_clipboard.py:22 | |
185 | msgid "one or two marks needed" | |
186 | msgstr "" | |
187 | ||
188 | #: ../src/fenrir/commands/commands/curr_clipboard.py:17 | |
193 | #: ../src/fenrirscreenreader\commands\commands\copy_marked_to_clipboard.py:22 | |
194 | msgid "One or two marks are needed" | |
195 | msgstr "" | |
196 | ||
197 | #: ../src/fenrirscreenreader\commands\commands\curr_clipboard.py:17 | |
189 | 198 | msgid "speaks the contents of the currently selected clipboard" |
190 | 199 | msgstr "" |
191 | 200 | |
192 | #: ../src/fenrir/commands/commands/curr_clipboard.py:21 | |
193 | #: ../src/fenrir/commands/commands/export_clipboard_to_x.py:29 | |
194 | #: ../src/fenrir/commands/commands/export_clipboard_to_x.py:32 | |
195 | #: ../src/fenrir/commands/commands/export_clipboard_to_x.py:35 | |
196 | #: ../src/fenrir/commands/commands/export_clipboard_to_x.py:38 | |
197 | #: ../src/fenrir/commands/commands/first_clipboard.py:21 | |
198 | #: ../src/fenrir/commands/commands/last_clipboard.py:21 | |
199 | #: ../src/fenrir/commands/commands/next_clipboard.py:21 | |
200 | #: ../src/fenrir/commands/commands/paste_clipboard.py:23 | |
201 | #: ../src/fenrir/commands/commands/paste_clipboard.py:26 | |
202 | #: ../src/fenrir/commands/commands/paste_clipboard.py:29 | |
203 | #: ../src/fenrir/commands/commands/paste_clipboard.py:32 | |
204 | #: ../src/fenrir/commands/commands/prev_clipboard.py:21 | |
201 | #: ../src/fenrirscreenreader\commands\commands\curr_clipboard.py:21 | |
202 | #: ../src/fenrirscreenreader\commands\commands\export_clipboard_to_file.py:28 | |
203 | #: ../src/fenrirscreenreader\commands\commands\export_clipboard_to_x.py:27 | |
204 | #: ../src/fenrirscreenreader\commands\commands\first_clipboard.py:21 | |
205 | #: ../src/fenrirscreenreader\commands\commands\last_clipboard.py:21 | |
206 | #: ../src/fenrirscreenreader\commands\commands\next_clipboard.py:21 | |
207 | #: ../src/fenrirscreenreader\commands\commands\paste_clipboard.py:23 | |
208 | #: ../src/fenrirscreenreader\commands\commands\prev_clipboard.py:21 | |
205 | 209 | msgid "clipboard empty" |
206 | 210 | msgstr "" |
207 | 211 | |
208 | #: ../src/fenrir/commands/commands/curr_screen.py:17 | |
212 | #: ../src/fenrirscreenreader\commands\commands\curr_screen.py:17 | |
209 | 213 | msgid "reads the contents of the current screen" |
210 | 214 | msgstr "" |
211 | 215 | |
212 | #: ../src/fenrir/commands/commands/curr_screen.py:21 | |
216 | #: ../src/fenrirscreenreader\commands\commands\curr_screen.py:21 | |
213 | 217 | msgid "screen is empty" |
214 | 218 | msgstr "" |
215 | 219 | |
216 | #: ../src/fenrir/commands/commands/curr_screen_after_cursor.py:18 | |
220 | #: ../src/fenrirscreenreader\commands\commands\curr_screen_after_cursor.py:18 | |
217 | 221 | msgid "reads from the cursor to the bottom of the screen" |
218 | 222 | msgstr "" |
219 | 223 | |
220 | #: ../src/fenrir/commands/commands/curr_screen_before_cursor.py:18 | |
224 | #: ../src/fenrirscreenreader\commands\commands\curr_screen_before_cursor.py:18 | |
221 | 225 | msgid "Reads from the top of the screen to the cursor position" |
222 | 226 | msgstr "" |
223 | 227 | |
224 | #: ../src/fenrir/commands/commands/cursor_column.py:17 | |
225 | msgid "presents the current column number for review cursor in review mode or the text cursor if not. Starts with 1" | |
226 | msgstr "" | |
227 | ||
228 | #: ../src/fenrir/commands/commands/cursor_lineno.py:17 | |
229 | msgid "presents the current line number for review cursor in review mode or the text cursor if not. Starts with 1" | |
230 | msgstr "" | |
231 | ||
232 | #: ../src/fenrir/commands/commands/cursor_position.py:17 | |
228 | #: ../src/fenrirscreenreader\commands\commands\current_quick_menu_entry.py:17 | |
229 | #: ../src/fenrirscreenreader\commands\quickMenu\current_quick_menu_entry.py:17 | |
230 | msgid "get current quick menu entry" | |
231 | msgstr "" | |
232 | ||
233 | #: ../src/fenrirscreenreader\commands\commands\current_quick_menu_value.py:17 | |
234 | #: ../src/fenrirscreenreader\commands\quickMenu\current_quick_menu_value.py:17 | |
235 | msgid "get current quick menu value" | |
236 | msgstr "" | |
237 | ||
238 | #: ../src/fenrirscreenreader\commands\commands\cursor_column.py:17 | |
239 | msgid "Column number for cursor" | |
240 | msgstr "" | |
241 | ||
242 | #: ../src/fenrirscreenreader\commands\commands\cursor_lineno.py:17 | |
243 | msgid "Line number for cursor" | |
244 | msgstr "" | |
245 | ||
246 | #: ../src/fenrirscreenreader\commands\commands\cursor_position.py:17 | |
233 | 247 | msgid "displays the position of the review cursor" |
234 | 248 | msgstr "" |
235 | 249 | |
236 | #: ../src/fenrir/commands/commands/cursor_position.py:23 | |
237 | msgid "line {0}, column {1}" | |
238 | msgstr "" | |
239 | ||
240 | #: ../src/fenrir/commands/commands/cursor_read_to_end_of_line.py:18 | |
250 | #: ../src/fenrirscreenreader\commands\commands\cursor_position.py:23 | |
251 | msgid "line {0}, column {1}, Terminal {2}" | |
252 | msgstr "" | |
253 | ||
254 | #: | |
255 | #: ../src/fenrirscreenreader\commands\commands\cursor_read_to_end_of_line.py:18 | |
241 | 256 | msgid "read to end of line, use review cursor if you are in review mode, otherwhise use text cursor" |
242 | 257 | msgstr "" |
243 | 258 | |
244 | #: ../src/fenrir/commands/commands/date.py:18 | |
259 | #: ../src/fenrirscreenreader\commands\commands\date.py:18 | |
245 | 260 | msgid "presents the date" |
246 | 261 | msgstr "" |
247 | 262 | |
248 | #: ../src/fenrir/commands/commands/dec_sound_volume.py:18 | |
263 | #: ../src/fenrirscreenreader\commands\commands\dec_alsa_volume.py:24 | |
264 | msgid "Decrease system volume" | |
265 | msgstr "" | |
266 | ||
267 | #: ../src/fenrirscreenreader\commands\commands\dec_alsa_volume.py:28 | |
268 | #: ../src/fenrirscreenreader\commands\commands\inc_alsa_volume.py:28 | |
269 | msgid "alsaaudio is not installed" | |
270 | msgstr "" | |
271 | ||
272 | #: ../src/fenrirscreenreader\commands\commands\dec_alsa_volume.py:36 | |
273 | #: ../src/fenrirscreenreader\commands\commands\inc_alsa_volume.py:36 | |
274 | msgid "{0} percent system volume" | |
275 | msgstr "" | |
276 | ||
277 | #: ../src/fenrirscreenreader\commands\commands\dec_sound_volume.py:18 | |
249 | 278 | msgid "decrease sound volume" |
250 | 279 | msgstr "" |
251 | 280 | |
252 | #: ../src/fenrir/commands/commands/dec_sound_volume.py:29 | |
253 | #: ../src/fenrir/commands/commands/inc_sound_volume.py:29 | |
281 | #: ../src/fenrirscreenreader\commands\commands\dec_sound_volume.py:29 | |
282 | #: ../src/fenrirscreenreader\commands\commands\inc_sound_volume.py:29 | |
254 | 283 | msgid "{0} percent sound volume" |
255 | 284 | msgstr "" |
256 | 285 | |
257 | #: ../src/fenrir/commands/commands/dec_speech_pitch.py:18 | |
258 | msgid "decreases the pitch of the speech" | |
259 | msgstr "" | |
260 | ||
261 | #: ../src/fenrir/commands/commands/dec_speech_pitch.py:27 | |
262 | #: ../src/fenrir/commands/commands/inc_speech_pitch.py:27 | |
286 | #: ../src/fenrirscreenreader\commands\commands\dec_speech_pitch.py:18 | |
287 | msgid "Decreases the pitch of the speech" | |
288 | msgstr "" | |
289 | ||
290 | #: ../src/fenrirscreenreader\commands\commands\dec_speech_pitch.py:26 | |
291 | #: ../src/fenrirscreenreader\commands\commands\inc_speech_pitch.py:27 | |
263 | 292 | msgid "{0} percent speech pitch" |
264 | 293 | msgstr "" |
265 | 294 | |
266 | #: ../src/fenrir/commands/commands/dec_speech_rate.py:18 | |
267 | msgid "decreases the rate of the speech" | |
268 | msgstr "" | |
269 | ||
270 | #: ../src/fenrir/commands/commands/dec_speech_rate.py:27 | |
271 | #: ../src/fenrir/commands/commands/inc_speech_rate.py:27 | |
295 | #: ../src/fenrirscreenreader\commands\commands\dec_speech_rate.py:18 | |
296 | msgid "Decreases the rate of the speech" | |
297 | msgstr "" | |
298 | ||
299 | #: ../src/fenrirscreenreader\commands\commands\dec_speech_rate.py:27 | |
300 | #: ../src/fenrirscreenreader\commands\commands\inc_speech_rate.py:27 | |
272 | 301 | msgid "{0} percent speech rate" |
273 | 302 | msgstr "" |
274 | 303 | |
275 | #: ../src/fenrir/commands/commands/dec_speech_volume.py:18 | |
276 | msgid "decreases the volume of the speech" | |
277 | msgstr "" | |
278 | ||
279 | #: ../src/fenrir/commands/commands/dec_speech_volume.py:27 | |
280 | #: ../src/fenrir/commands/commands/inc_speech_volume.py:27 | |
304 | #: ../src/fenrirscreenreader\commands\commands\dec_speech_volume.py:18 | |
305 | msgid "Decreases the volume of the speech" | |
306 | msgstr "" | |
307 | ||
308 | #: ../src/fenrirscreenreader\commands\commands\dec_speech_volume.py:27 | |
309 | #: ../src/fenrirscreenreader\commands\commands\inc_speech_volume.py:27 | |
281 | 310 | msgid "{0} percent speech volume" |
282 | 311 | msgstr "" |
283 | 312 | |
284 | #: ../src/fenrir/commands/commands/exit_review.py:17 | |
313 | #: ../src/fenrirscreenreader\commands\commands\exit_review.py:17 | |
314 | #: ../src/fenrirscreenreader\commands\onCursorChange\95000-exit_review_mode.py:17 | |
285 | 315 | msgid "exits review mode" |
286 | 316 | msgstr "" |
287 | 317 | |
288 | #: ../src/fenrir/commands/commands/exit_review.py:21 | |
289 | msgid "Not in review mode" | |
290 | msgstr "" | |
291 | ||
292 | #: ../src/fenrir/commands/commands/exit_review.py:25 | |
293 | msgid "leave review mode" | |
294 | msgstr "" | |
295 | ||
296 | #: ../src/fenrir/commands/commands/export_clipboard_to_x.py:21 | |
297 | msgid "export the current fenrir clipboard to X clipboard" | |
298 | msgstr "" | |
299 | ||
300 | #: ../src/fenrir/commands/commands/first_clipboard.py:17 | |
318 | #: ../src/fenrirscreenreader\commands\commands\exit_review.py:21 | |
319 | msgid "Not in Review Mode" | |
320 | msgstr "" | |
321 | ||
322 | #: ../src/fenrirscreenreader\commands\commands\exit_review.py:25 | |
323 | msgid "Exiting Review Mode" | |
324 | msgstr "" | |
325 | ||
326 | #: ../src/fenrirscreenreader\commands\commands\export_clipboard_to_file.py:19 | |
327 | msgid "export the current fenrir clipboard to a file" | |
328 | msgstr "" | |
329 | ||
330 | #: ../src/fenrirscreenreader\commands\commands\export_clipboard_to_file.py:34 | |
331 | msgid "clipboard exported to file" | |
332 | msgstr "" | |
333 | ||
334 | #: ../src/fenrirscreenreader\commands\commands\export_clipboard_to_x.py:20 | |
335 | msgid "Export current fenrir clipboard to X or GUI clipboard" | |
336 | msgstr "" | |
337 | ||
338 | #: ../src/fenrirscreenreader\commands\commands\first_clipboard.py:17 | |
301 | 339 | msgid "selects the first clipboard" |
302 | 340 | msgstr "" |
303 | 341 | |
304 | #: ../src/fenrir/commands/commands/forward_keypress.py:17 | |
305 | msgid "sends the following keypress to the terminal" | |
306 | msgstr "" | |
307 | ||
308 | #: ../src/fenrir/commands/commands/forward_keypress.py:21 | |
342 | #: ../src/fenrirscreenreader\commands\commands\forward_keypress.py:17 | |
343 | msgid "sends the following keypress to the terminal or application" | |
344 | msgstr "" | |
345 | ||
346 | #: ../src/fenrirscreenreader\commands\commands\forward_keypress.py:21 | |
309 | 347 | msgid "Forward next keypress" |
310 | 348 | msgstr "" |
311 | 349 | |
312 | #: ../src/fenrir/commands/commands/inc_sound_volume.py:18 | |
350 | #: | |
351 | #: ../src/fenrirscreenreader\commands\commands\import_clipboard_from_file.py:19 | |
352 | msgid "imports text from clipboard file to the clipboard" | |
353 | msgstr "" | |
354 | ||
355 | #: | |
356 | #: ../src/fenrirscreenreader\commands\commands\import_clipboard_from_file.py:27 | |
357 | msgid "File does not exist" | |
358 | msgstr "" | |
359 | ||
360 | #: ../src/fenrirscreenreader\commands\commands\import_clipboard_from_x.py:21 | |
361 | msgid "imports the graphical clipboard to Fenrir's clipboard" | |
362 | msgstr "" | |
363 | ||
364 | #: ../src/fenrirscreenreader\commands\commands\inc_alsa_volume.py:24 | |
365 | msgid "Increase system volume" | |
366 | msgstr "" | |
367 | ||
368 | #: ../src/fenrirscreenreader\commands\commands\inc_sound_volume.py:18 | |
313 | 369 | msgid "adjusts the volume for in coming sounds" |
314 | 370 | msgstr "" |
315 | 371 | |
316 | #: ../src/fenrir/commands/commands/inc_speech_pitch.py:18 | |
317 | msgid "increases the pitch of the speech" | |
318 | msgstr "" | |
319 | ||
320 | #: ../src/fenrir/commands/commands/inc_speech_rate.py:18 | |
321 | msgid "increase the speech rate" | |
322 | msgstr "" | |
323 | ||
324 | #: ../src/fenrir/commands/commands/inc_speech_volume.py:18 | |
325 | msgid "increase the speech volume" | |
326 | msgstr "" | |
327 | ||
328 | #: ../src/fenrir/commands/commands/indent_curr_line.py:18 | |
329 | msgid "shows the indention level for the current line" | |
330 | msgstr "" | |
331 | ||
332 | #: ../src/fenrir/commands/commands/indent_curr_line.py:33 | |
372 | #: ../src/fenrirscreenreader\commands\commands\inc_speech_pitch.py:18 | |
373 | msgid "Increases the pitch of the speech" | |
374 | msgstr "" | |
375 | ||
376 | #: ../src/fenrirscreenreader\commands\commands\inc_speech_rate.py:18 | |
377 | msgid "Increase the speech rate" | |
378 | msgstr "" | |
379 | ||
380 | #: ../src/fenrirscreenreader\commands\commands\inc_speech_volume.py:18 | |
381 | msgid "Increase the speech volume" | |
382 | msgstr "" | |
383 | ||
384 | #: ../src/fenrirscreenreader\commands\commands\indent_curr_line.py:18 | |
385 | msgid "Presents the indentation level for the current line" | |
386 | msgstr "" | |
387 | ||
388 | #: ../src/fenrirscreenreader\commands\commands\indent_curr_line.py:33 | |
333 | 389 | msgid "indent {0}" |
334 | 390 | msgstr "" |
335 | 391 | |
336 | #: ../src/fenrir/commands/commands/last_clipboard.py:17 | |
392 | #: ../src/fenrirscreenreader\commands\commands\last_clipboard.py:17 | |
337 | 393 | msgid "selects the last clipboard" |
338 | 394 | msgstr "" |
339 | 395 | |
340 | #: ../src/fenrir/commands/commands/last_incoming.py:17 | |
341 | msgid "displays the last received text" | |
342 | msgstr "" | |
343 | ||
344 | #: ../src/fenrir/commands/commands/marked_text.py:18 | |
345 | msgid "speaks the currently selected text that will be copied to the clipboard" | |
346 | msgstr "" | |
347 | ||
348 | #: ../src/fenrir/commands/commands/marked_text.py:23 | |
396 | #: ../src/fenrirscreenreader\commands\commands\last_incoming.py:17 | |
397 | msgid "Presents the text which was last received" | |
398 | msgstr "" | |
399 | ||
400 | #: ../src/fenrirscreenreader\commands\commands\marked_text.py:18 | |
401 | msgid "Presents the currently selected text that will be copied to the clipboard" | |
402 | msgstr "" | |
403 | ||
404 | #: ../src/fenrirscreenreader\commands\commands\marked_text.py:23 | |
349 | 405 | msgid "please set begin and endmark" |
350 | 406 | msgstr "" |
351 | 407 | |
352 | #: ../src/fenrir/commands/commands/next_clipboard.py:17 | |
408 | #: ../src/fenrirscreenreader\commands\commands\next_clipboard.py:17 | |
353 | 409 | msgid "selects the next clipboard" |
354 | 410 | msgstr "" |
355 | 411 | |
356 | #: ../src/fenrir/commands/commands/next_clipboard.py:26 | |
412 | #: ../src/fenrirscreenreader\commands\commands\next_clipboard.py:28 | |
413 | #: ../src/fenrirscreenreader\commands\commands\prev_clipboard.py:28 | |
357 | 414 | msgid "First clipboard " |
358 | 415 | msgstr "" |
359 | 416 | |
360 | #: ../src/fenrir/commands/commands/paste_clipboard.py:18 | |
417 | #: ../src/fenrirscreenreader\commands\commands\next_clipboard.py:30 | |
418 | #: ../src/fenrirscreenreader\commands\commands\prev_clipboard.py:30 | |
419 | msgid "Last clipboard " | |
420 | msgstr "" | |
421 | ||
422 | #: ../src/fenrirscreenreader\commands\commands\next_quick_menu_entry.py:17 | |
423 | #: ../src/fenrirscreenreader\commands\quickMenu\next_quick_menu_entry.py:17 | |
424 | msgid "get next quick menu entry" | |
425 | msgstr "" | |
426 | ||
427 | #: ../src/fenrirscreenreader\commands\commands\next_quick_menu_entry.py:27 | |
428 | #: ../src/fenrirscreenreader\commands\commands\prev_quick_menu_entry.py:27 | |
429 | #: ../src/fenrirscreenreader\commands\quickMenu\next_quick_menu_entry.py:27 | |
430 | #: ../src/fenrirscreenreader\commands\quickMenu\prev_quick_menu_entry.py:27 | |
431 | msgid "Quick menu not available" | |
432 | msgstr "" | |
433 | ||
434 | #: ../src/fenrirscreenreader\commands\commands\next_quick_menu_value.py:17 | |
435 | #: ../src/fenrirscreenreader\commands\quickMenu\next_quick_menu_value.py:17 | |
436 | msgid "get next quick menu value" | |
437 | msgstr "" | |
438 | ||
439 | #: ../src/fenrirscreenreader\commands\commands\paste_clipboard.py:19 | |
361 | 440 | msgid "pastes the text from the currently selected clipboard" |
362 | 441 | msgstr "" |
363 | 442 | |
364 | #: ../src/fenrir/commands/commands/present_first_line.py:18 | |
443 | #: ../src/fenrirscreenreader\commands\commands\present_first_line.py:18 | |
365 | 444 | msgid "present first line" |
366 | 445 | msgstr "" |
367 | 446 | |
368 | #: ../src/fenrir/commands/commands/present_last_line.py:18 | |
369 | #: ../src/fenrir/commands/commands/review_curr_line.py:18 | |
447 | #: ../src/fenrirscreenreader\commands\commands\present_last_line.py:18 | |
448 | #: ../src/fenrirscreenreader\commands\commands\review_curr_line.py:18 | |
370 | 449 | msgid "current line" |
371 | 450 | msgstr "" |
372 | 451 | |
373 | #: ../src/fenrir/commands/commands/prev_clipboard.py:17 | |
452 | #: ../src/fenrirscreenreader\commands\commands\prev_clipboard.py:17 | |
374 | 453 | msgid "selects the previous clipboard" |
375 | 454 | msgstr "" |
376 | 455 | |
377 | #: ../src/fenrir/commands/commands/prev_clipboard.py:26 | |
378 | msgid "Last clipboard " | |
379 | msgstr "" | |
380 | ||
381 | #: ../src/fenrir/commands/commands/quit_fenrir.py:17 | |
456 | #: ../src/fenrirscreenreader\commands\commands\prev_quick_menu_entry.py:17 | |
457 | #: ../src/fenrirscreenreader\commands\quickMenu\prev_quick_menu_entry.py:17 | |
458 | msgid "get previous quick menu entry" | |
459 | msgstr "" | |
460 | ||
461 | #: ../src/fenrirscreenreader\commands\commands\prev_quick_menu_value.py:17 | |
462 | #: ../src/fenrirscreenreader\commands\quickMenu\prev_quick_menu_value.py:17 | |
463 | msgid "get previous quick menu value" | |
464 | msgstr "" | |
465 | ||
466 | #: ../src/fenrirscreenreader\commands\commands\quit_fenrir.py:17 | |
382 | 467 | msgid "exits Fenrir" |
383 | 468 | msgstr "" |
384 | 469 | |
385 | #: ../src/fenrir/commands/commands/remove_marks.py:17 | |
386 | msgid "removes marks from selected text" | |
387 | msgstr "" | |
388 | ||
389 | #: ../src/fenrir/commands/commands/remove_marks.py:21 | |
470 | #: ../src/fenrirscreenreader\commands\commands\remove_marks.py:17 | |
471 | msgid "Removes marks from selected text" | |
472 | msgstr "" | |
473 | ||
474 | #: ../src/fenrirscreenreader\commands\commands\remove_marks.py:21 | |
390 | 475 | msgid "Remove marks" |
391 | 476 | msgstr "" |
392 | 477 | |
393 | #: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:27 | |
478 | #: | |
479 | #: ../src/fenrirscreenreader\commands\commands\remove_word_from_spell_check.py:27 | |
394 | 480 | msgid "removes the current word from the exceptions dictionary" |
395 | 481 | msgstr "" |
396 | 482 | |
397 | #: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:50 | |
398 | msgid "{0} is already removed from dict" | |
399 | msgstr "" | |
400 | ||
401 | #: ../src/fenrir/commands/commands/remove_word_from_spell_check.py:53 | |
483 | #: | |
484 | #: ../src/fenrirscreenreader\commands\commands\remove_word_from_spell_check.py:50 | |
485 | msgid "{0} is not in the dictionary" | |
486 | msgstr "" | |
487 | ||
488 | #: | |
489 | #: ../src/fenrirscreenreader\commands\commands\remove_word_from_spell_check.py:53 | |
402 | 490 | msgid "{0} removed" |
403 | 491 | msgstr "" |
404 | 492 | |
405 | #: ../src/fenrir/commands/commands/review_bottom.py:17 | |
406 | msgid "move review to bottom of screen" | |
407 | msgstr "" | |
408 | ||
409 | #: ../src/fenrir/commands/commands/review_bottom.py:21 | |
493 | #: ../src/fenrirscreenreader\commands\commands\review_bottom.py:17 | |
494 | msgid "Move review to the bottom of the screen" | |
495 | msgstr "" | |
496 | ||
497 | #: ../src/fenrirscreenreader\commands\commands\review_bottom.py:21 | |
410 | 498 | msgid "Bottom" |
411 | 499 | msgstr "" |
412 | 500 | |
413 | #: ../src/fenrir/commands/commands/review_curr_char.py:18 | |
501 | #: ../src/fenrirscreenreader\commands\commands\review_curr_char.py:18 | |
414 | 502 | msgid "presents the current character." |
415 | 503 | msgstr "" |
416 | 504 | |
417 | #: ../src/fenrir/commands/commands/review_curr_char_phonetic.py:18 | |
505 | #: ../src/fenrirscreenreader\commands\commands\review_curr_char_phonetic.py:18 | |
418 | 506 | msgid "set review and phonetically presents the current character" |
419 | 507 | msgstr "" |
420 | 508 | |
421 | #: ../src/fenrir/commands/commands/review_curr_word.py:18 | |
509 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word.py:18 | |
422 | 510 | msgid "current word." |
423 | 511 | msgstr "" |
424 | 512 | |
425 | #: ../src/fenrir/commands/commands/review_curr_word.py:32 | |
426 | #: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:36 | |
427 | #: ../src/fenrir/commands/commands/review_down.py:27 | |
428 | #: ../src/fenrir/commands/commands/review_next_char.py:28 | |
429 | #: ../src/fenrir/commands/commands/review_next_char_phonetic.py:30 | |
430 | #: ../src/fenrir/commands/commands/review_next_line.py:34 | |
431 | #: ../src/fenrir/commands/commands/review_next_word.py:34 | |
432 | #: ../src/fenrir/commands/commands/review_next_word_phonetic.py:36 | |
433 | #: ../src/fenrir/commands/commands/review_prev_char.py:31 | |
434 | #: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:30 | |
435 | #: ../src/fenrir/commands/commands/review_prev_line.py:32 | |
436 | #: ../src/fenrir/commands/commands/review_prev_word.py:32 | |
437 | #: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:36 | |
438 | #: ../src/fenrir/commands/commands/review_up.py:27 | |
513 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word.py:32 | |
514 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word_phonetic.py:36 | |
515 | #: ../src/fenrirscreenreader\commands\commands\review_down.py:27 | |
516 | #: ../src/fenrirscreenreader\commands\commands\review_next_char.py:28 | |
517 | #: ../src/fenrirscreenreader\commands\commands\review_next_char_phonetic.py:30 | |
518 | #: ../src/fenrirscreenreader\commands\commands\review_next_line.py:34 | |
519 | #: ../src/fenrirscreenreader\commands\commands\review_next_word.py:34 | |
520 | #: ../src/fenrirscreenreader\commands\commands\review_next_word_phonetic.py:36 | |
521 | #: ../src/fenrirscreenreader\commands\commands\review_prev_char.py:31 | |
522 | #: ../src/fenrirscreenreader\commands\commands\review_prev_char_phonetic.py:30 | |
523 | #: ../src/fenrirscreenreader\commands\commands\review_prev_line.py:32 | |
524 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word.py:32 | |
525 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word_phonetic.py:36 | |
526 | #: ../src/fenrirscreenreader\commands\commands\review_up.py:27 | |
439 | 527 | msgid "end of screen" |
440 | 528 | msgstr "" |
441 | 529 | |
442 | #: ../src/fenrir/commands/commands/review_curr_word.py:35 | |
443 | #: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:39 | |
444 | #: ../src/fenrir/commands/commands/review_next_char.py:31 | |
445 | #: ../src/fenrir/commands/commands/review_next_char_phonetic.py:33 | |
446 | #: ../src/fenrir/commands/commands/review_next_word.py:37 | |
447 | #: ../src/fenrir/commands/commands/review_next_word_phonetic.py:39 | |
448 | #: ../src/fenrir/commands/commands/review_prev_char.py:34 | |
449 | #: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:33 | |
450 | #: ../src/fenrir/commands/commands/review_prev_word.py:35 | |
451 | #: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:39 | |
452 | #: ../src/fenrir/commands/commands/review_up.py:30 | |
530 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word.py:35 | |
531 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word_phonetic.py:39 | |
532 | #: ../src/fenrirscreenreader\commands\commands\review_next_char.py:31 | |
533 | #: ../src/fenrirscreenreader\commands\commands\review_next_char_phonetic.py:33 | |
534 | #: ../src/fenrirscreenreader\commands\commands\review_next_word.py:37 | |
535 | #: ../src/fenrirscreenreader\commands\commands\review_next_word_phonetic.py:39 | |
536 | #: ../src/fenrirscreenreader\commands\commands\review_prev_char.py:34 | |
537 | #: ../src/fenrirscreenreader\commands\commands\review_prev_char_phonetic.py:33 | |
538 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word.py:35 | |
539 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word_phonetic.py:39 | |
540 | #: ../src/fenrirscreenreader\commands\commands\review_up.py:30 | |
453 | 541 | msgid "line break" |
454 | 542 | msgstr "" |
455 | 543 | |
456 | #: ../src/fenrir/commands/commands/review_curr_word_phonetic.py:19 | |
457 | #: ../src/fenrir/commands/commands/review_next_word_phonetic.py:19 | |
458 | #: ../src/fenrir/commands/commands/review_prev_word_phonetic.py:19 | |
459 | msgid "phonetically spells the current word and set review to it" | |
460 | msgstr "" | |
461 | ||
462 | #: ../src/fenrir/commands/commands/review_down.py:18 | |
463 | msgid "set review cursor to char below the current char and present it." | |
464 | msgstr "" | |
465 | ||
466 | #: ../src/fenrir/commands/commands/review_line_begin.py:18 | |
544 | #: ../src/fenrirscreenreader\commands\commands\review_curr_word_phonetic.py:19 | |
545 | msgid "Phonetically spells the current word" | |
546 | msgstr "" | |
547 | ||
548 | #: ../src/fenrirscreenreader\commands\commands\review_down.py:18 | |
549 | msgid "Move review to the character below the current position" | |
550 | msgstr "" | |
551 | ||
552 | #: ../src/fenrirscreenreader\commands\commands\review_line_begin.py:18 | |
467 | 553 | msgid "set review cursor to begin of current line and display the content" |
468 | 554 | msgstr "" |
469 | 555 | |
470 | #: ../src/fenrir/commands/commands/review_line_begin.py:30 | |
556 | #: ../src/fenrirscreenreader\commands\commands\review_line_begin.py:30 | |
471 | 557 | msgid "beginning of line" |
472 | 558 | msgstr "" |
473 | 559 | |
474 | #: ../src/fenrir/commands/commands/review_line_end.py:18 | |
475 | #: ../src/fenrir/commands/commands/review_line_first_char.py:19 | |
476 | #: ../src/fenrir/commands/commands/review_line_last_char.py:18 | |
477 | msgid "set review cursor to end of current line and display the content" | |
478 | msgstr "" | |
479 | ||
480 | #: ../src/fenrir/commands/commands/review_line_end.py:27 | |
560 | #: ../src/fenrirscreenreader\commands\commands\review_line_end.py:18 | |
561 | msgid "Move Review to the end of current line and display the content" | |
562 | msgstr "" | |
563 | ||
564 | #: ../src/fenrirscreenreader\commands\commands\review_line_end.py:27 | |
481 | 565 | msgid "end of line" |
482 | 566 | msgstr "" |
483 | 567 | |
484 | #: ../src/fenrir/commands/commands/review_line_first_char.py:26 | |
568 | #: ../src/fenrirscreenreader\commands\commands\review_line_first_char.py:19 | |
569 | msgid "Move Review to the first character on the line" | |
570 | msgstr "" | |
571 | ||
572 | #: ../src/fenrirscreenreader\commands\commands\review_line_first_char.py:26 | |
485 | 573 | msgid "line is empty" |
486 | 574 | msgstr "" |
487 | 575 | |
488 | #: ../src/fenrir/commands/commands/review_line_first_char.py:33 | |
489 | msgid "first char in line indent {0}" | |
490 | msgstr "" | |
491 | ||
492 | #: ../src/fenrir/commands/commands/review_line_last_char.py:27 | |
493 | msgid "last char in line" | |
494 | msgstr "" | |
495 | ||
496 | #: ../src/fenrir/commands/commands/review_next_char.py:18 | |
497 | msgid "moves review to the next character and presents it" | |
498 | msgstr "" | |
499 | ||
500 | #: ../src/fenrir/commands/commands/review_next_char_phonetic.py:18 | |
576 | #: ../src/fenrirscreenreader\commands\commands\review_line_first_char.py:33 | |
577 | msgid "first character in line indent {0}" | |
578 | msgstr "" | |
579 | ||
580 | #: ../src/fenrirscreenreader\commands\commands\review_line_last_char.py:18 | |
581 | msgid "Move Review to the last character on the line" | |
582 | msgstr "" | |
583 | ||
584 | #: ../src/fenrirscreenreader\commands\commands\review_line_last_char.py:27 | |
585 | msgid "last character in line" | |
586 | msgstr "" | |
587 | ||
588 | #: ../src/fenrirscreenreader\commands\commands\review_next_char.py:18 | |
589 | msgid "Moves review to the next character " | |
590 | msgstr "" | |
591 | ||
592 | #: ../src/fenrirscreenreader\commands\commands\review_next_char_phonetic.py:18 | |
501 | 593 | msgid "phonetically presents the next character and set review to it" |
502 | 594 | msgstr "" |
503 | 595 | |
504 | #: ../src/fenrir/commands/commands/review_next_line.py:18 | |
505 | msgid "moves review to the next line and presents it" | |
506 | msgstr "" | |
507 | ||
508 | #: ../src/fenrir/commands/commands/review_next_word.py:18 | |
509 | msgid "moves review to the next word and presents it" | |
510 | msgstr "" | |
511 | ||
512 | #: ../src/fenrir/commands/commands/review_prev_char.py:18 | |
513 | msgid "moves review to the previous character and presents it" | |
514 | msgstr "" | |
515 | ||
516 | #: ../src/fenrir/commands/commands/review_prev_char_phonetic.py:18 | |
596 | #: ../src/fenrirscreenreader\commands\commands\review_next_line.py:18 | |
597 | msgid "moves review to the next line " | |
598 | msgstr "" | |
599 | ||
600 | #: ../src/fenrirscreenreader\commands\commands\review_next_word.py:18 | |
601 | msgid "moves review to the next word " | |
602 | msgstr "" | |
603 | ||
604 | #: ../src/fenrirscreenreader\commands\commands\review_next_word_phonetic.py:19 | |
605 | msgid "Phonetically spells the next word and moves review to it" | |
606 | msgstr "" | |
607 | ||
608 | #: ../src/fenrirscreenreader\commands\commands\review_prev_char.py:18 | |
609 | msgid "moves review to the previous character " | |
610 | msgstr "" | |
611 | ||
612 | #: ../src/fenrirscreenreader\commands\commands\review_prev_char_phonetic.py:18 | |
517 | 613 | msgid "phonetically presents the previous character and set review to it" |
518 | 614 | msgstr "" |
519 | 615 | |
520 | #: ../src/fenrir/commands/commands/review_prev_line.py:18 | |
521 | msgid "moves review to the previous line and presents it" | |
522 | msgstr "" | |
523 | ||
524 | #: ../src/fenrir/commands/commands/review_prev_word.py:18 | |
525 | msgid "moves review focus to the previous word and presents it" | |
526 | msgstr "" | |
527 | ||
528 | #: ../src/fenrir/commands/commands/review_top.py:18 | |
616 | #: ../src/fenrirscreenreader\commands\commands\review_prev_line.py:18 | |
617 | msgid "moves review to the previous line " | |
618 | msgstr "" | |
619 | ||
620 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word.py:18 | |
621 | msgid "moves review focus to the previous word " | |
622 | msgstr "" | |
623 | ||
624 | #: ../src/fenrirscreenreader\commands\commands\review_prev_word_phonetic.py:19 | |
625 | msgid "Phonetically spells the previous word and moves review to it" | |
626 | msgstr "" | |
627 | ||
628 | #: ../src/fenrirscreenreader\commands\commands\review_top.py:18 | |
529 | 629 | msgid "move review to top of screen" |
530 | 630 | msgstr "" |
531 | 631 | |
532 | #: ../src/fenrir/commands/commands/review_top.py:22 | |
632 | #: ../src/fenrirscreenreader\commands\commands\review_top.py:22 | |
533 | 633 | msgid "Top" |
534 | 634 | msgstr "" |
535 | 635 | |
536 | #: ../src/fenrir/commands/commands/review_up.py:18 | |
537 | msgid "set review cursor to the char in the line below and present it" | |
538 | msgstr "" | |
539 | ||
540 | #: ../src/fenrir/commands/commands/set_bookmark_1.py:18 | |
541 | #: ../src/fenrir/commands/commands/set_bookmark_10.py:18 | |
542 | #: ../src/fenrir/commands/commands/set_bookmark_2.py:18 | |
543 | #: ../src/fenrir/commands/commands/set_bookmark_3.py:18 | |
544 | #: ../src/fenrir/commands/commands/set_bookmark_4.py:18 | |
545 | #: ../src/fenrir/commands/commands/set_bookmark_5.py:18 | |
546 | #: ../src/fenrir/commands/commands/set_bookmark_6.py:18 | |
547 | #: ../src/fenrir/commands/commands/set_bookmark_7.py:18 | |
548 | #: ../src/fenrir/commands/commands/set_bookmark_8.py:18 | |
549 | #: ../src/fenrir/commands/commands/set_bookmark_9.py:18 | |
636 | #: ../src/fenrirscreenreader\commands\commands\review_up.py:18 | |
637 | msgid "Move review to the character in the line above the current position" | |
638 | msgstr "" | |
639 | ||
640 | #: ../src/fenrirscreenreader\commands\commands\save_settings.py:18 | |
641 | msgid "Saves your current Fenrir settings so they are the default." | |
642 | msgstr "" | |
643 | ||
644 | #: ../src/fenrirscreenreader\commands\commands\save_settings.py:22 | |
645 | msgid "Settings saved." | |
646 | msgstr "" | |
647 | ||
648 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_1.py:18 | |
649 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_10.py:18 | |
650 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_2.py:18 | |
651 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_3.py:18 | |
652 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_4.py:18 | |
653 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_5.py:18 | |
654 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_6.py:18 | |
655 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_7.py:18 | |
656 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_8.py:18 | |
657 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_9.py:18 | |
550 | 658 | msgid "set Bookmark {0}" |
551 | 659 | msgstr "" |
552 | 660 | |
553 | #: ../src/fenrir/commands/commands/set_bookmark_1.py:22 | |
554 | #: ../src/fenrir/commands/commands/set_bookmark_10.py:22 | |
555 | #: ../src/fenrir/commands/commands/set_bookmark_2.py:22 | |
556 | #: ../src/fenrir/commands/commands/set_bookmark_3.py:22 | |
557 | #: ../src/fenrir/commands/commands/set_bookmark_4.py:22 | |
558 | #: ../src/fenrir/commands/commands/set_bookmark_5.py:22 | |
559 | #: ../src/fenrir/commands/commands/set_bookmark_6.py:22 | |
560 | #: ../src/fenrir/commands/commands/set_bookmark_7.py:22 | |
561 | #: ../src/fenrir/commands/commands/set_bookmark_8.py:22 | |
562 | #: ../src/fenrir/commands/commands/set_bookmark_9.py:22 | |
563 | msgid "No Mark found" | |
564 | msgstr "" | |
565 | ||
566 | #: ../src/fenrir/commands/commands/set_bookmark_1.py:32 | |
567 | #: ../src/fenrir/commands/commands/set_bookmark_10.py:32 | |
568 | #: ../src/fenrir/commands/commands/set_bookmark_2.py:32 | |
569 | #: ../src/fenrir/commands/commands/set_bookmark_3.py:32 | |
570 | #: ../src/fenrir/commands/commands/set_bookmark_4.py:32 | |
571 | #: ../src/fenrir/commands/commands/set_bookmark_5.py:32 | |
572 | #: ../src/fenrir/commands/commands/set_bookmark_6.py:32 | |
573 | #: ../src/fenrir/commands/commands/set_bookmark_7.py:32 | |
574 | #: ../src/fenrir/commands/commands/set_bookmark_8.py:32 | |
575 | #: ../src/fenrir/commands/commands/set_bookmark_9.py:32 | |
661 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_1.py:22 | |
662 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_10.py:22 | |
663 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_2.py:22 | |
664 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_3.py:22 | |
665 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_4.py:22 | |
666 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_5.py:22 | |
667 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_6.py:22 | |
668 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_7.py:22 | |
669 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_8.py:22 | |
670 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_9.py:22 | |
671 | msgid "No mark found" | |
672 | msgstr "" | |
673 | ||
674 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_1.py:32 | |
675 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_10.py:32 | |
676 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_2.py:32 | |
677 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_3.py:32 | |
678 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_4.py:32 | |
679 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_5.py:32 | |
680 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_6.py:32 | |
681 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_7.py:32 | |
682 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_8.py:32 | |
683 | #: ../src/fenrirscreenreader\commands\commands\set_bookmark_9.py:32 | |
576 | 684 | msgid "Bookmark {0} set for application {1}" |
577 | 685 | msgstr "" |
578 | 686 | |
579 | #: ../src/fenrir/commands/commands/set_mark.py:17 | |
687 | #: ../src/fenrirscreenreader\commands\commands\set_mark.py:17 | |
580 | 688 | msgid "places marks to select text to copy to the clipboard" |
581 | 689 | msgstr "" |
582 | 690 | |
583 | #: ../src/fenrir/commands/commands/set_mark.py:21 | |
691 | #: ../src/fenrirscreenreader\commands\commands\set_mark.py:21 | |
584 | 692 | msgid "no review cursor" |
585 | 693 | msgstr "" |
586 | 694 | |
587 | #: ../src/fenrir/commands/commands/set_mark.py:26 | |
588 | #: ../src/fenrir/commands/commands/set_mark.py:28 | |
695 | #: ../src/fenrirscreenreader\commands\commands\set_mark.py:26 | |
696 | #: ../src/fenrirscreenreader\commands\commands\set_mark.py:28 | |
589 | 697 | msgid "set mark" |
590 | 698 | msgstr "" |
591 | 699 | |
592 | #: ../src/fenrir/commands/commands/set_window_application.py:17 | |
700 | #: ../src/fenrirscreenreader\commands\commands\set_window_application.py:17 | |
593 | 701 | msgid "set Window Mode, needs 2 marks " |
594 | 702 | msgstr "" |
595 | 703 | |
596 | #: ../src/fenrir/commands/commands/set_window_application.py:22 | |
704 | #: ../src/fenrirscreenreader\commands\commands\set_window_application.py:22 | |
597 | 705 | msgid "Window Mode on for application {0}" |
598 | 706 | msgstr "" |
599 | 707 | |
600 | #: ../src/fenrir/commands/commands/set_window_application.py:25 | |
708 | #: ../src/fenrirscreenreader\commands\commands\set_window_application.py:25 | |
601 | 709 | msgid "Set window begin and end marks" |
602 | 710 | msgstr "" |
603 | 711 | |
604 | #: ../src/fenrir/commands/commands/shut_up.py:17 | |
605 | msgid "interrupts the current presentation" | |
606 | msgstr "" | |
607 | ||
608 | #: ../src/fenrir/commands/commands/spell_check.py:26 | |
712 | #: ../src/fenrirscreenreader\commands\commands\shut_up.py:17 | |
713 | msgid "Interrupts the current presentation" | |
714 | msgstr "" | |
715 | ||
716 | #: ../src/fenrirscreenreader\commands\commands\spell_check.py:26 | |
609 | 717 | msgid "checks the spelling of the current word" |
610 | 718 | msgstr "" |
611 | 719 | |
612 | #: ../src/fenrir/commands/commands/spell_check.py:52 | |
613 | #: ../src/fenrir/commands/onInput/62000-spell_check.py:132 | |
720 | #: ../src/fenrirscreenreader\commands\commands\spell_check.py:51 | |
721 | #: ../src/fenrirscreenreader\commands\onCursorChange\35000-spell_check.py:129 | |
614 | 722 | msgid "misspelled" |
615 | 723 | msgstr "" |
616 | 724 | |
617 | #: ../src/fenrir/commands/commands/spell_check.py:54 | |
725 | #: ../src/fenrirscreenreader\commands\commands\spell_check.py:53 | |
618 | 726 | msgid "correct" |
619 | 727 | msgstr "" |
620 | 728 | |
621 | #: ../src/fenrir/commands/commands/subprocess.py:21 | |
729 | #: ../src/fenrirscreenreader\commands\commands\subprocess.py:21 | |
622 | 730 | msgid "script: {0} fullpath: {1}" |
623 | 731 | msgstr "" |
624 | 732 | |
625 | #: ../src/fenrir/commands/commands/subprocess.py:24 | |
626 | msgid "scriptfile does not exist" | |
627 | msgstr "" | |
628 | ||
629 | #: ../src/fenrir/commands/commands/subprocess.py:27 | |
630 | msgid "scriptfile is not a file" | |
631 | msgstr "" | |
632 | ||
633 | #: ../src/fenrir/commands/commands/subprocess.py:30 | |
634 | msgid "scriptfile is not executable" | |
635 | msgstr "" | |
636 | ||
637 | #: ../src/fenrir/commands/commands/temp_disable_speech.py:17 | |
638 | #: ../src/fenrir/commands/onInput/15000-enable_temp_speech.py:17 | |
733 | #: ../src/fenrirscreenreader\commands\commands\subprocess.py:24 | |
734 | msgid "Script file not found" | |
735 | msgstr "" | |
736 | ||
737 | #: ../src/fenrirscreenreader\commands\commands\subprocess.py:27 | |
738 | msgid "Script source is not a valid file" | |
739 | msgstr "" | |
740 | ||
741 | #: ../src/fenrirscreenreader\commands\commands\subprocess.py:30 | |
742 | msgid "Script file is not executable" | |
743 | msgstr "" | |
744 | ||
745 | #: ../src/fenrirscreenreader\commands\commands\temp_disable_speech.py:17 | |
746 | #: ../src/fenrirscreenreader\commands\onByteInput\15000-enable_temp_speech.py:17 | |
747 | #: ../src/fenrirscreenreader\commands\onKeyInput\15000-enable_temp_speech.py:17 | |
639 | 748 | msgid "disables speech until next keypress" |
640 | 749 | msgstr "" |
641 | 750 | |
642 | #: ../src/fenrir/commands/commands/temp_disable_speech.py:21 | |
751 | #: ../src/fenrirscreenreader\commands\commands\time.py:18 | |
752 | msgid "presents the time" | |
753 | msgstr "" | |
754 | ||
755 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_indent.py:16 | |
756 | msgid "enables or disables automatic reading of indentation level changes" | |
757 | msgstr "" | |
758 | ||
759 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_indent.py:21 | |
760 | msgid "autoindent enabled" | |
761 | msgstr "" | |
762 | ||
763 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_indent.py:23 | |
764 | msgid "autoindent disabled" | |
765 | msgstr "" | |
766 | ||
767 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_read.py:16 | |
768 | msgid "enables or disables automatic reading of new text as it appears" | |
769 | msgstr "" | |
770 | ||
771 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_read.py:21 | |
772 | msgid "autoread enabled" | |
773 | msgstr "" | |
774 | ||
775 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_read.py:23 | |
776 | msgid "autoread disabled" | |
777 | msgstr "" | |
778 | ||
779 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_spell_check.py:17 | |
780 | msgid "enables or disables automatic spell checking" | |
781 | msgstr "" | |
782 | ||
783 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_spell_check.py:22 | |
784 | msgid "auto spellcheck enabled" | |
785 | msgstr "" | |
786 | ||
787 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_spell_check.py:24 | |
788 | msgid "auto spellcheck disabled" | |
789 | msgstr "" | |
790 | ||
791 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_time.py:16 | |
792 | msgid "Enables or disables automatic reading of time after specified intervals" | |
793 | msgstr "" | |
794 | ||
795 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_time.py:21 | |
796 | msgid "Automatic time announcement enabled" | |
797 | msgstr "" | |
798 | ||
799 | #: ../src/fenrirscreenreader\commands\commands\toggle_auto_time.py:23 | |
800 | msgid "Automatic time announcement disabled" | |
801 | msgstr "" | |
802 | ||
803 | #: ../src/fenrirscreenreader\commands\commands\toggle_barrier.py:16 | |
804 | msgid "enables or disables the barrier mode" | |
805 | msgstr "" | |
806 | ||
807 | #: ../src/fenrirscreenreader\commands\commands\toggle_barrier.py:21 | |
808 | msgid "barrier mode enabled" | |
809 | msgstr "" | |
810 | ||
811 | #: ../src/fenrirscreenreader\commands\commands\toggle_barrier.py:23 | |
812 | msgid "barrier mode disabled" | |
813 | msgstr "" | |
814 | ||
815 | #: ../src/fenrirscreenreader\commands\commands\toggle_braille.py:17 | |
816 | msgid "Enables and disables Braille output" | |
817 | msgstr "" | |
818 | ||
819 | #: ../src/fenrirscreenreader\commands\commands\toggle_braille.py:21 | |
820 | msgid "braille disabled" | |
821 | msgstr "" | |
822 | ||
823 | #: ../src/fenrirscreenreader\commands\commands\toggle_braille.py:24 | |
824 | msgid "braille enabled" | |
825 | msgstr "" | |
826 | ||
827 | #: ../src/fenrirscreenreader\commands\commands\toggle_emoticons.py:16 | |
828 | msgid "enables or disables announcement of emoticons instead of chars" | |
829 | msgstr "" | |
830 | ||
831 | #: ../src/fenrirscreenreader\commands\commands\toggle_emoticons.py:21 | |
832 | msgid "emoticons enabled" | |
833 | msgstr "" | |
834 | ||
835 | #: ../src/fenrirscreenreader\commands\commands\toggle_emoticons.py:23 | |
836 | msgid "emoticons disabled" | |
837 | msgstr "" | |
838 | ||
839 | #: ../src/fenrirscreenreader\commands\commands\toggle_has_attribute.py:16 | |
840 | msgid "enables or disables the announcement of attributes" | |
841 | msgstr "" | |
842 | ||
843 | #: ../src/fenrirscreenreader\commands\commands\toggle_has_attribute.py:21 | |
844 | msgid "announcement of attributes enabled" | |
845 | msgstr "" | |
846 | ||
847 | #: ../src/fenrirscreenreader\commands\commands\toggle_has_attribute.py:23 | |
848 | msgid "announcement of attributes disabled" | |
849 | msgstr "" | |
850 | ||
851 | #: ../src/fenrirscreenreader\commands\commands\toggle_highlight_tracking.py:16 | |
852 | msgid "enables or disables tracking of highlighted text" | |
853 | msgstr "" | |
854 | ||
855 | #: ../src/fenrirscreenreader\commands\commands\toggle_highlight_tracking.py:24 | |
856 | msgid "highlight tracking" | |
857 | msgstr "" | |
858 | ||
859 | #: ../src/fenrirscreenreader\commands\commands\toggle_highlight_tracking.py:26 | |
860 | msgid "cursor tracking" | |
861 | msgstr "" | |
862 | ||
863 | #: ../src/fenrirscreenreader\commands\commands\toggle_output.py:17 | |
864 | msgid "toggles all output settings" | |
865 | msgstr "" | |
866 | ||
867 | #: ../src/fenrirscreenreader\commands\commands\toggle_output.py:23 | |
868 | msgid "Fenrir muted" | |
869 | msgstr "" | |
870 | ||
871 | #: ../src/fenrirscreenreader\commands\commands\toggle_output.py:31 | |
872 | msgid "Fenrir unmuted" | |
873 | msgstr "" | |
874 | ||
875 | #: ../src/fenrirscreenreader\commands\commands\toggle_punctuation_level.py:23 | |
876 | msgid "No punctuation found." | |
877 | msgstr "" | |
878 | ||
879 | #: ../src/fenrirscreenreader\commands\commands\toggle_sound.py:17 | |
880 | msgid "enables or disables sound" | |
881 | msgstr "" | |
882 | ||
883 | #: ../src/fenrirscreenreader\commands\commands\toggle_sound.py:21 | |
884 | msgid "sound disabled" | |
885 | msgstr "" | |
886 | ||
887 | #: ../src/fenrirscreenreader\commands\commands\toggle_sound.py:24 | |
888 | msgid "sound enabled" | |
889 | msgstr "" | |
890 | ||
891 | #: ../src/fenrirscreenreader\commands\commands\toggle_speech.py:17 | |
892 | msgid "enables or disables speech" | |
893 | msgstr "" | |
894 | ||
895 | #: ../src/fenrirscreenreader\commands\commands\toggle_speech.py:22 | |
896 | msgid "speech disabled" | |
897 | msgstr "" | |
898 | ||
899 | #: ../src/fenrirscreenreader\commands\commands\toggle_speech.py:25 | |
900 | #: ../src/fenrirscreenreader\commands\onByteInput\15000-enable_temp_speech.py:24 | |
901 | #: ../src/fenrirscreenreader\commands\onKeyInput\15000-enable_temp_speech.py:28 | |
902 | msgid "speech enabled" | |
903 | msgstr "" | |
904 | ||
905 | #: ../src/fenrirscreenreader\commands\commands\toggle_tutorial_mode.py:18 | |
906 | msgid "Exiting tutorial mode. To enter tutorial mode again press Fenrir+f1" | |
907 | msgstr "" | |
908 | ||
909 | #: ../src/fenrirscreenreader\commands\commands\toggle_tutorial_mode.py:22 | |
910 | msgid "Entering tutorial mode. In this mode commands are described but not executed. You can move through the list of commands with the up and down arrow keys. To Exit tutorial mode press Fenrir+f1." | |
911 | msgstr "" | |
912 | ||
913 | #: ../src/fenrirscreenreader\commands\commands\toggle_vmenu_mode.py:18 | |
914 | msgid "Entering or Leaving v menu mode." | |
915 | msgstr "" | |
916 | ||
917 | #: ../src/fenrirscreenreader\commands\commands\toggle_vmenu_mode.py:22 | |
918 | msgid "Entering v menu." | |
919 | msgstr "" | |
920 | ||
921 | #: ../src/fenrirscreenreader\commands\commands\toggle_vmenu_mode.py:24 | |
922 | msgid "Leaving v menu." | |
923 | msgstr "" | |
924 | ||
925 | #: ../src/fenrirscreenreader\commands\help\curr_help.py:17 | |
926 | msgid "get current help message" | |
927 | msgstr "" | |
928 | ||
929 | #: ../src/fenrirscreenreader\commands\help\next_help.py:17 | |
930 | msgid "get next help message" | |
931 | msgstr "" | |
932 | ||
933 | #: ../src/fenrirscreenreader\commands\help\prev_help.py:17 | |
934 | msgid "get prev help message" | |
935 | msgstr "" | |
936 | ||
937 | #: | |
938 | #: ../src/fenrirscreenreader\commands\onCursorChange\65000-present_line_if_cursor_change_vertical.py:46 | |
939 | msgid "indented " | |
940 | msgstr "" | |
941 | ||
942 | #: ../src/fenrirscreenreader\commands\onHeartBeat\76000-time.py:66 | |
943 | msgid "Autotime: {0}" | |
944 | msgstr "" | |
945 | ||
946 | #: ../src/fenrirscreenreader\commands\onKeyInput\80000-capslock.py:22 | |
947 | msgid "Capslock on" | |
948 | msgstr "" | |
949 | ||
950 | #: ../src/fenrirscreenreader\commands\onKeyInput\80000-capslock.py:24 | |
951 | msgid "Capslock off" | |
952 | msgstr "" | |
953 | ||
954 | #: ../src/fenrirscreenreader\commands\onKeyInput\80300-scrolllock.py:22 | |
955 | msgid "Scrolllock on" | |
956 | msgstr "" | |
957 | ||
958 | #: ../src/fenrirscreenreader\commands\onKeyInput\80300-scrolllock.py:24 | |
959 | msgid "Scrolllock off" | |
960 | msgstr "" | |
961 | ||
962 | #: ../src/fenrirscreenreader\commands\onKeyInput\80500-numlock.py:22 | |
963 | msgid "Numlock on" | |
964 | msgstr "" | |
965 | ||
966 | #: ../src/fenrirscreenreader\commands\onKeyInput\80500-numlock.py:24 | |
967 | msgid "Numlock off" | |
968 | msgstr "" | |
969 | ||
970 | #: | |
971 | #: ../src/fenrirscreenreader\commands\onScreenChanged\80000-screen_change_announcement.py:20 | |
972 | msgid "screen {0}" | |
973 | msgstr "" | |
974 | ||
975 | #: | |
976 | #: ../src/fenrirscreenreader\commands\onScreenUpdate\56000-highlight_tracking.py:16 | |
977 | msgid "enables or disables tracking of highlighted" | |
978 | msgstr "" | |
979 | ||
980 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\curr_vmenu_entry.py:17 | |
981 | msgid "get current v menu entry" | |
982 | msgstr "" | |
983 | ||
984 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\dec_level_vmenu.py:17 | |
985 | msgid "leave v menu submenu" | |
986 | msgstr "" | |
987 | ||
988 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\exec_vmenu_entry.py:17 | |
989 | msgid "execute v menu entry" | |
990 | msgstr "" | |
991 | ||
992 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\inc_level_vmenu.py:17 | |
993 | msgid "enter v menu submenu" | |
994 | msgstr "" | |
995 | ||
996 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\next_vmenu_entry.py:17 | |
997 | msgid "get next v menu entry" | |
998 | msgstr "" | |
999 | ||
1000 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\prev_vmenu_entry.py:17 | |
1001 | msgid "get prev v menu entry" | |
1002 | msgstr "" | |
1003 | ||
1004 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_a.py:17 | |
1005 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_b.py:17 | |
1006 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_c.py:17 | |
1007 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_d.py:17 | |
1008 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_e.py:17 | |
1009 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_f.py:17 | |
1010 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_g.py:17 | |
1011 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_h.py:17 | |
1012 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_i.py:17 | |
1013 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_j.py:17 | |
1014 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_k.py:17 | |
1015 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_l.py:17 | |
1016 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_m.py:17 | |
1017 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_n.py:17 | |
1018 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_o.py:17 | |
1019 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_p.py:17 | |
1020 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_q.py:17 | |
1021 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_r.py:17 | |
1022 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_s.py:17 | |
1023 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_t.py:17 | |
1024 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_u.py:17 | |
1025 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_v.py:17 | |
1026 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_w.py:17 | |
1027 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_x.py:17 | |
1028 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_y.py:17 | |
1029 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_z.py:17 | |
1030 | msgid "search for an menu entry" | |
1031 | msgstr "" | |
1032 | ||
1033 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_a.py:23 | |
1034 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_b.py:23 | |
1035 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_c.py:23 | |
1036 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_d.py:23 | |
1037 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_e.py:23 | |
1038 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_f.py:23 | |
1039 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_g.py:23 | |
1040 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_h.py:23 | |
1041 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_i.py:23 | |
1042 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_j.py:23 | |
1043 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_k.py:23 | |
1044 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_l.py:23 | |
1045 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_m.py:23 | |
1046 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_n.py:23 | |
1047 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_o.py:23 | |
1048 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_p.py:23 | |
1049 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_q.py:23 | |
1050 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_r.py:23 | |
1051 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_s.py:23 | |
1052 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_t.py:23 | |
1053 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_u.py:23 | |
1054 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_v.py:23 | |
1055 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_w.py:23 | |
1056 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_x.py:23 | |
1057 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_y.py:23 | |
1058 | #: ../src/fenrirscreenreader\commands\vmenu-navigation\search_z.py:23 | |
1059 | msgid "not found" | |
1060 | msgstr "" | |
1061 | ||
1062 | #: ../src/fenrirscreenreader\core\attributeManager.py:168 | |
1063 | msgid "bold" | |
1064 | msgstr "" | |
1065 | ||
1066 | #: ../src/fenrirscreenreader\core\attributeManager.py:176 | |
1067 | msgid "italic" | |
1068 | msgstr "" | |
1069 | ||
1070 | #: ../src/fenrirscreenreader\core\attributeManager.py:184 | |
1071 | msgid "underline" | |
1072 | msgstr "" | |
1073 | ||
1074 | #: ../src/fenrirscreenreader\core\attributeManager.py:192 | |
1075 | msgid "strikethrough" | |
1076 | msgstr "" | |
1077 | ||
1078 | #: ../src/fenrirscreenreader\core\attributeManager.py:200 | |
1079 | msgid "reverse" | |
1080 | msgstr "" | |
1081 | ||
1082 | #: ../src/fenrirscreenreader\core\attributeManager.py:208 | |
1083 | msgid "blink" | |
1084 | msgstr "" | |
1085 | ||
1086 | #: ../src/fenrirscreenreader\core\attributeManager.py:225 | |
1087 | #: ../src/fenrirscreenreader\core\attributeManager.py:232 | |
1088 | msgid "default" | |
1089 | msgstr "" | |
1090 | ||
1091 | #: ../src/fenrirscreenreader\core\byteManager.py:103 | |
1092 | #: ../src/fenrirscreenreader\core\byteManager.py:105 | |
1093 | msgid "Sticky Mode On" | |
1094 | msgstr "" | |
1095 | ||
1096 | #: ../src/fenrirscreenreader\core\byteManager.py:109 | |
1097 | msgid "bypass" | |
1098 | msgstr "" | |
1099 | ||
1100 | #: ../src/fenrirscreenreader\core\fenrirManager.py:26 | |
1101 | msgid "Start Fenrir" | |
1102 | msgstr "" | |
1103 | ||
1104 | #: ../src/fenrirscreenreader\core\fenrirManager.py:234 | |
1105 | msgid "Quit Fenrir" | |
1106 | msgstr "" | |
1107 | ||
1108 | #: ../src/fenrirscreenreader\core\helpManager.py:77 | |
1109 | msgid "toggles the tutorial mode" | |
1110 | msgstr "" | |
1111 | ||
1112 | #: ../src/fenrirscreenreader\core\outputManager.py:297 | |
643 | 1113 | msgid "speech temporary disabled" |
644 | 1114 | msgstr "" |
645 | 1115 | |
646 | #: ../src/fenrir/commands/commands/time.py:18 | |
647 | msgid "presents the time" | |
648 | msgstr "" | |
649 | ||
650 | #: ../src/fenrir/commands/commands/toggle_auto_read.py:16 | |
651 | msgid "enables or disables automatic reading of new text as it appears" | |
652 | msgstr "" | |
653 | ||
654 | #: ../src/fenrir/commands/commands/toggle_auto_read.py:21 | |
655 | msgid "autoread enabled" | |
656 | msgstr "" | |
657 | ||
658 | #: ../src/fenrir/commands/commands/toggle_auto_read.py:23 | |
659 | msgid "autoread disabled" | |
660 | msgstr "" | |
661 | ||
662 | #: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:17 | |
663 | msgid "enables or disables automatic spell checking" | |
664 | msgstr "" | |
665 | ||
666 | #: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:22 | |
667 | msgid "auto spellcheck enabled" | |
668 | msgstr "" | |
669 | ||
670 | #: ../src/fenrir/commands/commands/toggle_auto_spell_check.py:24 | |
671 | msgid "auto spellcheck disabled" | |
672 | msgstr "" | |
673 | ||
674 | #: ../src/fenrir/commands/commands/toggle_auto_time.py:16 | |
675 | msgid "enables or disables automatic reading of time after an period" | |
676 | msgstr "" | |
677 | ||
678 | #: ../src/fenrir/commands/commands/toggle_auto_time.py:21 | |
679 | msgid "autotime enabled" | |
680 | msgstr "" | |
681 | ||
682 | #: ../src/fenrir/commands/commands/toggle_auto_time.py:23 | |
683 | msgid "autotime disabled" | |
684 | msgstr "" | |
685 | ||
686 | #: ../src/fenrir/commands/commands/toggle_braille.py:17 | |
687 | msgid "enables and disables output in braille" | |
688 | msgstr "" | |
689 | ||
690 | #: ../src/fenrir/commands/commands/toggle_braille.py:21 | |
691 | msgid "braille disabled" | |
692 | msgstr "" | |
693 | ||
694 | #: ../src/fenrir/commands/commands/toggle_braille.py:24 | |
695 | msgid "braille enabled" | |
696 | msgstr "" | |
697 | ||
698 | #: ../src/fenrir/commands/commands/toggle_emoticons.py:16 | |
699 | msgid "enables or disables announcement of emoticons instead of chars" | |
700 | msgstr "" | |
701 | ||
702 | #: ../src/fenrir/commands/commands/toggle_emoticons.py:21 | |
703 | msgid "emoticons enabled" | |
704 | msgstr "" | |
705 | ||
706 | #: ../src/fenrir/commands/commands/toggle_emoticons.py:23 | |
707 | msgid "emoticons disabled" | |
708 | msgstr "" | |
709 | ||
710 | #: ../src/fenrir/commands/commands/toggle_highlight_tracking.py:16 | |
711 | #: ../src/fenrir/commands/onInput/56000-highlight_tracking.py:16 | |
712 | msgid "enables or disables tracking of highlighted" | |
713 | msgstr "" | |
714 | ||
715 | #: ../src/fenrir/commands/commands/toggle_highlight_tracking.py:24 | |
716 | msgid "highlight tracking" | |
717 | msgstr "" | |
718 | ||
719 | #: ../src/fenrir/commands/commands/toggle_highlight_tracking.py:26 | |
720 | msgid "cursor tracking" | |
721 | msgstr "" | |
722 | ||
723 | #: ../src/fenrir/commands/commands/toggle_output.py:17 | |
724 | msgid "toggles all output settings" | |
725 | msgstr "" | |
726 | ||
727 | #: ../src/fenrir/commands/commands/toggle_output.py:23 | |
728 | msgid "Fenrir muted" | |
729 | msgstr "" | |
730 | ||
731 | #: ../src/fenrir/commands/commands/toggle_output.py:31 | |
732 | msgid "Fenrir unmuted" | |
733 | msgstr "" | |
734 | ||
735 | #: ../src/fenrir/commands/commands/toggle_punctuation_level.py:23 | |
736 | msgid "No punctuation found." | |
737 | msgstr "" | |
738 | ||
739 | #: ../src/fenrir/commands/commands/toggle_sound.py:17 | |
740 | msgid "enables or disables sound" | |
741 | msgstr "" | |
742 | ||
743 | #: ../src/fenrir/commands/commands/toggle_sound.py:21 | |
744 | msgid "sound disabled" | |
745 | msgstr "" | |
746 | ||
747 | #: ../src/fenrir/commands/commands/toggle_sound.py:24 | |
748 | msgid "sound enabled" | |
749 | msgstr "" | |
750 | ||
751 | #: ../src/fenrir/commands/commands/toggle_speech.py:17 | |
752 | msgid "enables or disables speech" | |
753 | msgstr "" | |
754 | ||
755 | #: ../src/fenrir/commands/commands/toggle_speech.py:21 | |
756 | msgid "speech disabled" | |
757 | msgstr "" | |
758 | ||
759 | #: ../src/fenrir/commands/commands/toggle_speech.py:24 | |
760 | #: ../src/fenrir/commands/onInput/15000-enable_temp_speech.py:28 | |
761 | msgid "speech enabled" | |
762 | msgstr "" | |
763 | ||
764 | #: ../src/fenrir/commands/commands/toggle_tutorial_mode.py:18 | |
765 | msgid "You are leaving the tutorial mode. Press that shortcut again to enter the tutorial mode again." | |
766 | msgstr "" | |
767 | ||
768 | #: ../src/fenrir/commands/commands/toggle_tutorial_mode.py:21 | |
769 | msgid "you entered the tutorial mode. In that mode the commands are not executed. but you get a description of what the shortcut does. To leave the tutorial mode, press that shortcut again." | |
770 | msgstr "" | |
771 | ||
772 | #: ../src/fenrir/commands/onInput/80000-capslock.py:22 | |
773 | msgid "Capslock on" | |
774 | msgstr "" | |
775 | ||
776 | #: ../src/fenrir/commands/onInput/80000-capslock.py:24 | |
777 | msgid "Capslock off" | |
778 | msgstr "" | |
779 | ||
780 | #: ../src/fenrir/commands/onInput/80300-scrolllock.py:22 | |
781 | msgid "Scrolllock on" | |
782 | msgstr "" | |
783 | ||
784 | #: ../src/fenrir/commands/onInput/80300-scrolllock.py:24 | |
785 | msgid "Scrolllock off" | |
786 | msgstr "" | |
787 | ||
788 | #: ../src/fenrir/commands/onInput/80500-numlock.py:22 | |
789 | msgid "Numlock on" | |
790 | msgstr "" | |
791 | ||
792 | #: ../src/fenrir/commands/onInput/80500-numlock.py:24 | |
793 | msgid "Numlock off" | |
794 | msgstr "" | |
795 | ||
796 | #: | |
797 | #: ../src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py:20 | |
798 | msgid "screen {0}" | |
799 | msgstr "" | |
800 | ||
801 | #: ../src/fenrir/commands/onScreenUpdate/76000-time.py:66 | |
802 | msgid "Autotime: {0}" | |
803 | msgstr "" | |
804 | ||
805 | #: ../src/fenrir/fenrir.py:24 | |
806 | msgid "Start Fenrir" | |
807 | msgstr "" | |
808 | ||
809 | #: ../src/fenrir/fenrir.py:99 | |
810 | msgid "Quit Fenrir" | |
811 | msgstr "" | |
812 | ||
1116 | #: ../src/fenrirscreenreader\core\quickMenuManager.py:124 | |
1117 | msgid "setting invalid" | |
1118 | msgstr "" | |
1119 | ||
1120 | #: ../src/fenrirscreenreader\core\quickMenuManager.py:131 | |
1121 | msgid "setting value invalid" | |
1122 | msgstr "" | |
1123 | ||
1124 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1125 | msgid "black" | |
1126 | msgstr "" | |
1127 | ||
1128 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1129 | msgid "blue" | |
1130 | msgstr "" | |
1131 | ||
1132 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1133 | msgid "cyan" | |
1134 | msgstr "" | |
1135 | ||
1136 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1137 | msgid "green" | |
1138 | msgstr "" | |
1139 | ||
1140 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1141 | msgid "red" | |
1142 | msgstr "" | |
1143 | ||
1144 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1145 | msgid "white" | |
1146 | msgstr "" | |
1147 | ||
1148 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1149 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1150 | msgid "Magenta" | |
1151 | msgstr "" | |
1152 | ||
1153 | #: ../src/fenrirscreenreader\core\screenDriver.py:12 | |
1154 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1155 | msgid "brown/yellow" | |
1156 | msgstr "" | |
1157 | ||
1158 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1159 | msgid "Black" | |
1160 | msgstr "" | |
1161 | ||
1162 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1163 | msgid "Blue" | |
1164 | msgstr "" | |
1165 | ||
1166 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1167 | msgid "Cyan" | |
1168 | msgstr "" | |
1169 | ||
1170 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1171 | msgid "Dark gray" | |
1172 | msgstr "" | |
1173 | ||
1174 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1175 | msgid "Green" | |
1176 | msgstr "" | |
1177 | ||
1178 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1179 | msgid "Light blue" | |
1180 | msgstr "" | |
1181 | ||
1182 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1183 | msgid "Light cyan" | |
1184 | msgstr "" | |
1185 | ||
1186 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1187 | msgid "Light gray" | |
1188 | msgstr "" | |
1189 | ||
1190 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1191 | msgid "Light magenta" | |
1192 | msgstr "" | |
1193 | ||
1194 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1195 | msgid "Light red" | |
1196 | msgstr "" | |
1197 | ||
1198 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1199 | msgid "Light yellow" | |
1200 | msgstr "" | |
1201 | ||
1202 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1203 | msgid "Red" | |
1204 | msgstr "" | |
1205 | ||
1206 | #: ../src/fenrirscreenreader\core\screenDriver.py:13 | |
1207 | msgid "White" | |
1208 | msgstr "" | |
1209 | ||
1210 | #: ../src/fenrirscreenreader\core\vmenuManager.py:66 | |
1211 | #: ../src/fenrirscreenreader\core\vmenuManager.py:226 | |
1212 | msgid "Menu" | |
1213 | msgstr "" | |
1214 | ||
1215 | #: ../src/fenrirscreenreader\core\vmenuManager.py:234 | |
1216 | msgid "Action" | |
1217 | msgstr "" | |
1218 |