Update linux_paste_clipboard.py
This commit is contained in:
parent
13b762ed9b
commit
340a98c5af
@ -5,9 +5,7 @@
|
|||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
from core import debug
|
from core import debug
|
||||||
import fcntl
|
import time
|
||||||
import termios
|
|
||||||
import time, sys
|
|
||||||
|
|
||||||
class command():
|
class command():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -34,11 +32,8 @@ class command():
|
|||||||
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='PasteClipboardOnScreen', interrupt=True)
|
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
|
||||||
time.sleep(0.02)
|
time.sleep(0.01)
|
||||||
with open("/dev/tty" + self.env['screenData']['newTTY'], 'w') as fd:
|
self.env['runtime']['screenManager'].injectTextToScreen(self.env['commandBuffer']['clipboard'][currClipboard])
|
||||||
for c in self.env['commandBuffer']['clipboard'][currClipboard]:
|
|
||||||
fcntl.ioctl(fd, termios.TIOCSTI, c)
|
|
||||||
time.sleep(0.02)
|
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user