summaryrefslogtreecommitdiff
path: root/Scripts/mayHem.py
blob: 6ac90d60f73cf987262dc9ec2a3f8b6b05760a0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
import tkinter as tk
import time
root = tk.Tk()
root.withdraw()

control_c_sequence = '''keydown Shift_L;
key Left;
keyup Shift_L;
keydown Control_L;
key x;
keyup Control_L
'''

left = 'key Left'
right = 'key Right'

def keypress(sequence):
    #print(sequence.replace('\n', ''))
    for item in sequence.replace('\n', '').split(';'):
        print("xdotool " + item)
        os.system("xdotool " + item)
        

keypress(right)
while(True):
    keypress(control_c_sequence)
    keypress("keydown Shift_L key " + root.clipboard_get() + " keyup Shift_L")
    keypress(right)
    keypress(right)