fix clipboard

This commit is contained in:
chrys 2016-10-05 23:28:52 +02:00
parent 7bebe30744
commit 8d500f1470
4 changed files with 50 additions and 24 deletions

View File

@ -5,37 +5,65 @@ KEY_FENRIR,KEY_KP7=review_top
KEY_KP8=review_curr_line KEY_KP8=review_curr_line
KEY_KP7=review_prev_line KEY_KP7=review_prev_line
KEY_KP9=review_next_line KEY_KP9=review_next_line
#KEY_FENRIR,KEY_KP6=review_line_end KEY_FENRIR,KEY_KP4=review_line_begin
#KEY_FENRIR,KEY_KP5=review_line_begin KEY_FENRIR,KEY_KP6=review_line_end
#KEY_FENRIR,KEY_KP6=review_line_last_char
KEY_FENRIR,KEY_KP1=review_line_first_char KEY_FENRIR,KEY_KP1=review_line_first_char
KEY_FENRIR,KEY_KP3=review_line_last_char KEY_FENRIR,KEY_KP3=review_line_last_char
KEY_FENRIR,KEY_ALT,KEY_1=present_first_line
KEY_FENRIR,KEY_ALT,KEY_2=present_last_line
KEY_KP5=review_curr_word KEY_KP5=review_curr_word
KEY_KP4=review_prev_word KEY_KP4=review_prev_word
KEY_KP6=review_next_word KEY_KP6=review_next_word
2,KEY_KP5=curr_word_phonetic KEY_SHIFT,KEY_KP5=curr_word_phonetic
KEY_KP2=review_curr_char KEY_KP2=review_curr_char
KEY_KP1=review_prev_char KEY_KP1=review_prev_char
KEY_KP3=review_next_char KEY_KP3=review_next_char
2,KEY_KP2=curr_char_phonetic KEY_SHIFT,KEY_KP2=curr_char_phonetic
KEY_FENRIR,KEY_KP5=review_up #=review_up
KEY_FENRIR,KEY_KP6=review_down #=review_down
KEY_KPDOT=cursor_position KEY_KPDOT=cursor_position
KEY_FENRIR,KEY_I=indent_curr_line KEY_FENRIR,KEY_I=indent_curr_line
KEY_FENRIR,KEY_KPDOT=exit_review 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
KEY_FENRIR,KEY_1=set_window_application KEY_FENRIR,KEY_CTRL,KEY_1=clear_bookmark_1
KEY_FENRIR,KEY_3=clear_window_application KEY_FENRIR,KEY_SHIFT,KEY_1=set_bookmark_1
#KEY_FENRIR,KEY_3=clear_bookmark_1 KEY_FENRIR,KEY_1=bookmark_1
#KEY_FENRIR,KEY_1=set_bookmark_1 KEY_FENRIR,KEY_CTRL,KEY_2=clear_bookmark_2
KEY_FENRIR,KEY_2=bookmark_1 KEY_FENRIR,KEY_SHIFT,KEY_2=set_bookmark_2
KEY_FENRIR,KEY_2=bookmark_2
KEY_FENRIR,KEY_CTRL,KEY_3=clear_bookmark_3
KEY_FENRIR,KEY_SHIFT,KEY_3=set_bookmark_3
KEY_FENRIR,KEY_3=bookmark_3
KEY_FENRIR,KEY_CTRL,KEY_4=clear_bookmark_4
KEY_FENRIR,KEY_SHIFT,KEY_4=set_bookmark_4
KEY_FENRIR,KEY_4=bookmark_4
KEY_FENRIR,KEY_CTRL,KEY_5=clear_bookmark_5
KEY_FENRIR,KEY_SHIFT,KEY_5=set_bookmark_5
KEY_FENRIR,KEY_5=bookmark_5
KEY_FENRIR,KEY_CTRL,KEY_6=clear_bookmark_6
KEY_FENRIR,KEY_SHIFT,KEY_6=set_bookmark_6
KEY_FENRIR,KEY_6=bookmark_6
KEY_FENRIR,KEY_CTRL,KEY_7=clear_bookmark_7
KEY_FENRIR,KEY_SHIFT,KEY_7=set_bookmark_7
KEY_FENRIR,KEY_7=bookmark_7
KEY_FENRIR,KEY_CTRL,KEY_8=clear_bookmark_8
KEY_FENRIR,KEY_SHIFT,KEY_8=set_bookmark_8
KEY_FENRIR,KEY_8=bookmark_8
KEY_FENRIR,KEY_CTRL,KEY_9=clear_bookmark_9
KEY_FENRIR,KEY_SHIFT,KEY_9=set_bookmark_9
KEY_FENRIR,KEY_9=bookmark_9
KEY_FENRIR,KEY_CTRL,KEY_0=clear_bookmark_10
KEY_FENRIR,KEY_SHIFT,KEY_0=set_bookmark_10
KEY_FENRIR,KEY_0=bookmark_10
KEY_FENRIR,KEY_KPSLASH=set_window_application
2,KEY_FENRIR,KEY_KPSLASH=clear_window_application
KEY_KPPLUS=last_incoming KEY_KPPLUS=last_incoming
KEY_FENRIR,KEY_F2=toggle_braille KEY_FENRIR,KEY_F2=toggle_braille
KEY_FENRIR,KEY_F3=toggle_sound KEY_FENRIR,KEY_F3=toggle_sound
KEY_FENRIR,KEY_F4=toggle_speech KEY_FENRIR,KEY_F4=toggle_speech
KEY_FENRIR,KEY_F5=toggle_punctuation_level KEY_FENRIR,KEY_CTRL,KEY_P=toggle_punctuation_level
KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check
KEY_FENRIR,KEY_BACKSLASH=toggle_output KEY_FENRIR,KEY_BACKSLASH=toggle_output
key_FENRIR,KEY_KPENTER=toggle_auto_read key_FENRIR,KEY_KPENTER=toggle_auto_read
@ -54,8 +82,8 @@ KEY_FENRIR,KEY_ALT,KEY_RIGHT=inc_speech_pitch
KEY_FENRIR,KEY_ALT,KEY_LEFT=dec_speech_pitch KEY_FENRIR,KEY_ALT,KEY_LEFT=dec_speech_pitch
KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume KEY_FENRIR,KEY_ALT,KEY_UP=inc_sound_volume
KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume KEY_FENRIR,KEY_ALT,KEY_DOWN=dec_sound_volume
KEY_FENRIR,KEY_SHIFT,KEY_C=clear_clipboard KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_C=clear_clipboard
KEY_FENRIR,KEY_SHIFT,KEY_X=remove_marks KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_X=remove_marks
KEY_FENRIR,KEY_HOME=first_clipboard KEY_FENRIR,KEY_HOME=first_clipboard
KEY_FENRIR,KEY_END=last_clipboard KEY_FENRIR,KEY_END=last_clipboard
KEY_FENRIR,KEY_PAGEUP=prev_clipboard KEY_FENRIR,KEY_PAGEUP=prev_clipboard

View File

@ -57,7 +57,7 @@ module=espeak
voice= voice=
# Select the language you want fenrir to use. # Select the language you want fenrir to use.
language=de language=english-us
# Read new text as it happens? # Read new text as it happens?
autoReadIncoming=True autoReadIncoming=True
@ -82,7 +82,7 @@ device=AUTO
grabDevices=True grabDevices=True
ignoreShortcuts=False ignoreShortcuts=False
# the current shortcut layout located in /etc/fenrir/keyboard # the current shortcut layout located in /etc/fenrir/keyboard
keyboardLayout=test keyboardLayout=desktop
# echo chars while typing. # echo chars while typing.
charEcho=False charEcho=False
# echo deleted chars # echo deleted chars
@ -95,8 +95,8 @@ interruptOnKeyPress=False
doubleTapDelay=0.2 doubleTapDelay=0.2
[general] [general]
debugLevel=0 debugLevel=3
punctuationLevel=Some punctuationLevel=some
numberOfClipboards=10 numberOfClipboards=10
# define the current fenrir key # define the current fenrir key
fenrirKeys=KEY_KP0,KEY_META fenrirKeys=KEY_KP0,KEY_META

View File

@ -27,7 +27,7 @@ class command():
if not self.env['commandBuffer']['clipboard']: if not self.env['commandBuffer']['clipboard']:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True) self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
return return
if self.env['commandBuffer']['clipboard'][currClipboard]: if not self.env['commandBuffer']['clipboard'][currClipboard]:
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True) self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
return return
if self.env['commandBuffer']['clipboard'][currClipboard] == '': if self.env['commandBuffer']['clipboard'][currClipboard] == '':

View File

@ -29,8 +29,6 @@ class command():
return return
prevLine = self.env['screenData']['oldContentText'].split('\n')[self.env['screenData']['newCursor']['y']] prevLine = self.env['screenData']['oldContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
currLine = self.env['screenData']['newContentText'].split('\n')[self.env['screenData']['newCursor']['y']] currLine = self.env['screenData']['newContentText'].split('\n')[self.env['screenData']['newCursor']['y']]
#if prevLine == currLine:
# return
if currLine.isspace(): if currLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True) self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
else: else:
@ -47,7 +45,7 @@ class command():
announce = currLine[currPrompt+1:] announce = currLine[currPrompt+1:]
else: else:
announce = currLine announce = currLine
print(announce)
if currLine.isspace(): if currLine.isspace():
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True) self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
else: else: