I am having a hard time trying to figure this out and am stuck on this but the run down is I put this Tkinter gui in full screen and I need to disable the windows key when the window is open. It is for my own lock screen I am making.
# Imports
import tkinter
import time
import datetime
from threading import Thread
from tkinter import *
import keyboard
from pynput.mouse import Button, Controller
def func1():
# Screen
Screen = tkinter.Tk()
Screen.title('Force Login')
Screen.attributes("-fullscreen", True)
Screen.configure(background='black')
var = StringVar()
label = Label( Screen, textvariable=var, relief=RAISED )
var.set("Hey!? How are you doing?")
label.pack()
Screen.mainloop()
def func2():
while True:
keyboard.wait("cmd")
mouse = Controller()
mouse.move(999, -999)
time.sleep(0.30)
mouse.press(Button.left)
mouse.release(Button.left)
if __name__ == '__main__':
Thread(target = func1).start()
Thread(target = func2).start()