Merge branch 'master' into wordWrappingEndOfScreenBell
This commit is contained in:
commit
4a46858bd0
@ -31,6 +31,7 @@ KEY_FENRIR,KEY_KPDOT=exit_review
|
|||||||
KEY_FENRIR,KEY_KP5=curr_screen
|
KEY_FENRIR,KEY_KP5=curr_screen
|
||||||
KEY_FENRIR,KEY_KP8=curr_screen_before_cursor
|
KEY_FENRIR,KEY_KP8=curr_screen_before_cursor
|
||||||
KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
|
KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
|
||||||
|
#=cursor_read_to_end_of_line
|
||||||
#=cursor_column
|
#=cursor_column
|
||||||
#=cursor_lineno
|
#=cursor_lineno
|
||||||
KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1
|
KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1
|
||||||
|
@ -30,6 +30,7 @@ KEY_FENRIR,KEY_SHIFT,KEY_DOT=cursor_position
|
|||||||
KEY_FENRIR,KEY_SHIFT,KEY_K=curr_screen
|
KEY_FENRIR,KEY_SHIFT,KEY_K=curr_screen
|
||||||
KEY_FENRIR,KEY_SHIFT,KEY_I=curr_screen_before_cursor
|
KEY_FENRIR,KEY_SHIFT,KEY_I=curr_screen_before_cursor
|
||||||
KEY_FENRIR,KEY_SHIFT,KEY_COMMA=curr_screen_after_cursor
|
KEY_FENRIR,KEY_SHIFT,KEY_COMMA=curr_screen_after_cursor
|
||||||
|
#=cursor_read_to_end_of_line
|
||||||
#=cursor_column
|
#=cursor_column
|
||||||
#=cursor_lineno
|
#=cursor_lineno
|
||||||
KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1
|
KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1
|
||||||
|
@ -31,6 +31,7 @@ KEY_FENRIR,KEY_KPDOT=exit_review
|
|||||||
KEY_FENRIR,KEY_KP5=curr_screen
|
KEY_FENRIR,KEY_KP5=curr_screen
|
||||||
#KEY_FENRIR,KEY_KP8=curr_screen_before_cursor
|
#KEY_FENRIR,KEY_KP8=curr_screen_before_cursor
|
||||||
#KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
|
#KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
|
||||||
|
#=cursor_read_to_end_of_line
|
||||||
KEY_FENRIR,KEY_KP2=cursor_column
|
KEY_FENRIR,KEY_KP2=cursor_column
|
||||||
KEY_FENRIR,KEY_KP8=cursor_lineno
|
KEY_FENRIR,KEY_KP8=cursor_lineno
|
||||||
KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1
|
KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1
|
||||||
|
33
src/fenrir/commands/commands/cursor_read_to_end_of_line.py
Normal file
33
src/fenrir/commands/commands/cursor_read_to_end_of_line.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read to end of line, use review cursor if you are in reviewmode, otherwhise use text cursor'
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||||
|
|
||||||
|
x, y, currLine = \
|
||||||
|
line_utils.getCurrentLine(cursorPos['x'], cursorPos['y'], self.env['screenData']['newContentText'])
|
||||||
|
|
||||||
|
if currLine.isspace():
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(currLine[cursorPos['x']], interrupt=True)
|
||||||
|
self.env['runtime']['outputManager'].announceActiveCursor()
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user