diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index 763fd63b..2b7d2a29 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -5,8 +5,8 @@ KEY_FENRIR,KEY_KP7=review_top KEY_KP8=review_curr_line KEY_KP7=review_prev_line KEY_KP9=review_next_line -#=review_end_of_line -#=review_begin_of_line +#=review_line_end +#=review_line_begin #=present_first_line #=present_last_line KEY_KP5=review_curr_word diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index fbb158aa..68c7fb66 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -5,8 +5,8 @@ KEY_FENRIR,KEY_SHIFT,KEY_U=review_top KEY_FENRIR,KEY_I=review_curr_line KEY_FENRIR,KEY_U=review_prev_line KEY_FENRIR,KEY_O=review_next_line -#=review_end_of_line -#=review_begin_of_line +#=review_line_end +#=review_line_begin #=present_first_line #=present_last_line KEY_FENRIR,KEY_K=review_curr_word diff --git a/config/keyboard/test.conf b/config/keyboard/test.conf index 693526d3..ebf7fbca 100644 --- a/config/keyboard/test.conf +++ b/config/keyboard/test.conf @@ -5,8 +5,8 @@ KEY_FENRIR,KEY_KP7=review_top KEY_KP8=review_curr_line KEY_KP7=review_prev_line KEY_KP9=review_next_line -#=review_end_of_line -KEY_FENRIR,KEY_KP6=review_begin_of_line +#=review_line_end +#=review_line_begin #=present_first_line #=present_last_line KEY_KP5=review_curr_word diff --git a/src/fenrir-package/commands/commands/review_line_begin.py b/src/fenrir-package/commands/commands/review_line_begin.py new file mode 100644 index 00000000..0fd51f82 --- /dev/null +++ b/src/fenrir-package/commands/commands/review_line_begin.py @@ -0,0 +1,25 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return 'displays the position of the review cursor' + + def run(self): + cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() + self.env['runtime']['cursorManager'].setReviewCursorPosition(0 ,cursorPos['y']) + self.env['runtime']['outputManager'].presentText("begin of line", interrupt=True) + + def setCallback(self, callback): + pass diff --git a/src/fenrir-package/commands/commands/review_line_end.py b/src/fenrir-package/commands/commands/review_line_end.py new file mode 100644 index 00000000..86511ca3 --- /dev/null +++ b/src/fenrir-package/commands/commands/review_line_end.py @@ -0,0 +1,25 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return 'displays the position of the review cursor' + + def run(self): + cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() + self.env['runtime']['cursorManager'].setReviewCursorPosition(self.env['screenData']['columns']-1 ,cursorPos['y']) + self.env['runtime']['outputManager'].presentText("end of line", interrupt=True) + + def setCallback(self, callback): + pass