name line begin/end commands more consistent
This commit is contained in:
25
src/fenrir-package/commands/commands/review_line_begin.py
Normal file
25
src/fenrir-package/commands/commands/review_line_begin.py
Normal file
@ -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
|
25
src/fenrir-package/commands/commands/review_line_end.py
Normal file
25
src/fenrir-package/commands/commands/review_line_end.py
Normal file
@ -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
|
Reference in New Issue
Block a user