From 8774a8c916ffdbad20a7378f544a40983e592ec9 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 25 Mar 2018 00:25:00 +0100 Subject: [PATCH] add demo --- src/fenrirscreenreader/core/fenrirManager.py | 66 ++++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index 1c731dbf..b7b2586b 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -139,40 +139,40 @@ class fenrirManager(): command = '' try: commands = { - b'^[h':'toggle_tutorial_mode', - b'^[/': 'shut_up', - b'^[O': 'review_bottom', - b'^[U': 'review_top', - b'^[i': 'review_curr_line', - b'^[u': 'review_prev_line', - b'^[o': 'review_next_line', - b'^[J': 'review_line_begin', - b'^[L': 'review_line_end', - b'^[j': 'review_line_first_char', - b'^[L': 'review_line_last_char', - b'^[k': 'review_curr_word', + b'\x1bh':'toggle_tutorial_mode', + b'\x1b/': 'shut_up', + b'\x1bO': 'review_bottom', + b'\x1bU': 'review_top', + b'\x1bi': 'review_curr_line', + b'\x1bu': 'review_prev_line', + b'\x1bo': 'review_next_line', + b'\x1bJ': 'review_line_begin', + b'\x1bL': 'review_line_end', + b'\x1bj': 'review_line_first_char', + b'\x1bL': 'review_line_last_char', + b'\x1bk': 'review_curr_word', b'\x1bj': 'review_prev_word', - b'^[l': 'review_next_word', - b'^[,': 'review_curr_char', - b'^[m': 'review_prev_char', - b'^[.': 'review_next_char', - b'^[<': 'curr_char_phonetic', - b'^[M': 'prev_char_phonetic', - b'^[>': 'next_char_phonetic', - b'^[OR': 'toggle_sound', - b'^[OS': 'toggle_speech', - b'^[8': 'toggle_highlight_tracking', - b'^[q': 'quit_fenrir', - b'^[t': 'time', - b'^[y': 'date', - b'^[[5~': 'prev_clipboard', - b'^[[6~': 'next_clipboard', - b'^[C': 'curr_clipboard', - b'^[c': 'copy_marked_to_clipboard', - b'^[v': 'paste_clipboard', - b'^[[15~': 'import_clipboard_from_file', - b'^[X': 'remove_marks', - b'^[x': 'set_mark', + b'\x1bl': 'review_next_word', + b'\x1b,': 'review_curr_char', + b'\x1bm': 'review_prev_char', + b'\x1b.': 'review_next_char', + b'\x1b<': 'curr_char_phonetic', + b'\x1bM': 'prev_char_phonetic', + b'\x1b>': 'next_char_phonetic', + b'\x1bOR': 'toggle_sound', + b'\x1bOS': 'toggle_speech', + b'\x1b8': 'toggle_highlight_tracking', + b'\x1bq': 'quit_fenrir', + b'\x1bt': 'time', + b'\x1by': 'date', + b'\x1b[5~': 'prev_clipboard', + b'\x1b[6~': 'next_clipboard', + b'\x1bC': 'curr_clipboard', + b'\x1bc': 'copy_marked_to_clipboard', + b'\x1bv': 'paste_clipboard', + b'\x1b[15~': 'import_clipboard_from_file', + b'\x1bX': 'remove_marks', + b'\x1bx': 'set_mark', } command = commands[escapeSequence].upper() self.environment['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, command)