improve clipboard
This commit is contained in:
parent
c49a1b318a
commit
98fb60df60
@ -35,7 +35,7 @@ PlaceEndMark='PlaceEndMark.wav'
|
|||||||
# Copied to clipboard
|
# Copied to clipboard
|
||||||
CopyToClipboard='CopyToClipboard.wav'
|
CopyToClipboard='CopyToClipboard.wav'
|
||||||
# Pasted on the screen
|
# Pasted on the screen
|
||||||
PasedClipboardOnScreen='PasedClipboardOnScreen.wav'
|
PasteClipboardOnScreen='PasteClipboardOnScreen.wav'
|
||||||
# An error accoured while speech or braille output or reading the screen
|
# An error accoured while speech or braille output or reading the screen
|
||||||
ErrorSpeech='ErrorSpeech.wav'
|
ErrorSpeech='ErrorSpeech.wav'
|
||||||
ErrorBraille='ErrorBraille.wav'
|
ErrorBraille='ErrorBraille.wav'
|
||||||
|
Binary file not shown.
@ -35,7 +35,7 @@ PlaceEndMark='PlaceEndMark.opus'
|
|||||||
# Copied to clipboard
|
# Copied to clipboard
|
||||||
CopyToClipboard='CopyToClipboard.opus'
|
CopyToClipboard='CopyToClipboard.opus'
|
||||||
# Pasted on the screen
|
# Pasted on the screen
|
||||||
PasedClipboardOnScreen='PasedClipboardOnScreen.opus'
|
PasteClipboardOnScreen='PasteClipboardOnScreen.opus'
|
||||||
# An error accoured while speech or braille output or reading the screen
|
# An error accoured while speech or braille output or reading the screen
|
||||||
ErrorSpeech='ErrorSpeech.opus'
|
ErrorSpeech='ErrorSpeech.opus'
|
||||||
ErrorBraille='ErrorBraille.opus'
|
ErrorBraille='ErrorBraille.opus'
|
||||||
|
Binary file not shown.
@ -24,7 +24,17 @@ class command():
|
|||||||
if currClipboard < 0:
|
if currClipboard < 0:
|
||||||
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
|
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
|
||||||
return
|
return
|
||||||
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasedClipboardOnScreen', interrupt=True)
|
if not self.env['commandBuffer']['clipboard']:
|
||||||
|
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
|
||||||
|
return
|
||||||
|
if self.env['commandBuffer']['clipboard'][currClipboard]:
|
||||||
|
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
|
||||||
|
return
|
||||||
|
if self.env['commandBuffer']['clipboard'][currClipboard] == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText('clipboard empty', interrupt=True)
|
||||||
|
return
|
||||||
|
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
|
||||||
|
time.sleep(0.02)
|
||||||
with open("/dev/tty" + self.env['screenData']['newTTY'], 'w') as fd:
|
with open("/dev/tty" + self.env['screenData']['newTTY'], 'w') as fd:
|
||||||
for c in self.env['commandBuffer']['clipboard'][currClipboard]:
|
for c in self.env['commandBuffer']['clipboard'][currClipboard]:
|
||||||
fcntl.ioctl(fd, termios.TIOCSTI, c)
|
fcntl.ioctl(fd, termios.TIOCSTI, c)
|
||||||
|
Loading…
Reference in New Issue
Block a user