From 99889d4c6c02d4418a1a811153afcc6633cfb91b Mon Sep 17 00:00:00 2001 From: Chrys Date: Tue, 10 Jan 2023 02:08:13 +0100 Subject: [PATCH] paste demo --- play zone/pasteClipboardDemo.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 play zone/pasteClipboardDemo.py diff --git a/play zone/pasteClipboardDemo.py b/play zone/pasteClipboardDemo.py new file mode 100755 index 00000000..94c32cfc --- /dev/null +++ b/play zone/pasteClipboardDemo.py @@ -0,0 +1,11 @@ +#!/bin/python3 +import termios +import fcntl + +def injectTextToScreen(text): + useScreen = "/dev/tty5" + with open(useScreen, 'w') as fd: + for c in text: + fcntl.ioctl(fd, termios.TIOCSTI, c) + +injectTextToScreen('this is a test that works')