TTY info added to cursor_position.
This commit is contained in:
parent
c4cc983c5a
commit
c8be993dd6
@ -5,6 +5,8 @@
|
|||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
from fenrirscreenreader.core import debug
|
from fenrirscreenreader.core import debug
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
class command():
|
class command():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -14,13 +16,13 @@ class command():
|
|||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
pass
|
pass
|
||||||
def getDescription(self):
|
def getDescription(self):
|
||||||
return _('displays the position of the review cursor')
|
return _('displays the position of the review cursor and current TTY')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# Prefer review cursor over text cursor
|
# Prefer review cursor over text cursor
|
||||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||||
|
|
||||||
self.env['runtime']['outputManager'].presentText(_("line {0}, column {1}").format(cursorPos['y']+1, cursorPos['x']+1), interrupt=True)
|
self.env['runtime']['outputManager'].presentText(_("line {0}, column {1}, " + str(os.ttyname(sys.stdout.fileno()))[5:].replace("/", "")).format(cursorPos['y']+1, cursorPos['x']+1), interrupt=True)
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user