6 years ago

Oof, I have just now added pip to my program, though now it is giving me another error that says unindent does not match any outer indentation level. The program is python 3.8.6, though here is the code.


from pynput import keyboard

import os

import tkinter as tk

root= tk.Tk()

canvas1 = tk.Canvas(root, width = 300, height = 300, bg = 'gray90', relief = 'raised')

canvas1.pack()

def myCmd ():

os.system('cmd /k "color c"')

button1 = tk.Button(text=' press Ctrl and L ', command=myCmd, bg='green', fg='purple', font=('helvetica', 12, 'bold'))

canvas1.create_window(150, 150, window=button1)

root.mainloop()

COMBINATIONS = [

{keyboard.Key.ctrl, keyboard.KeyCode(char-'l')},

{keyboard.Key.ctrl, keyboard.KeyCode(char-'L')}

]

current = set()

def on_press(key):

if any([key in COMBO for COMBO in COMBINATIONS]):

current.add(key)

if any(all(k in current for k in COMBO) for COMBO in COMBINATIONS): execute()

def on_release(key):

if any([key in COMBO for COMBO in COMBINATIONS]):

current.remove(key)

def execute ():

('cmd /k "color c & date')

with keyboard.Listener(on_press=on_press, on_release=on_release) as listener:

listener.join()



0 comments

Loading...

Next up

Remember when there'd be random ahh images like these that everyone reposted? (not that it's bad tho, I just kinda forgot that these types of images existed)

Fortnite

Considering I only played like maybe 2 hrs I did really good

Lucky Tower Ultimate is a chaotic, comedy roguelite. Escape from an incredibly dangerous, randomly generated tower in a slapstick adventure that looks like a cartoon and feels like a joke. Slashy slashy! 

Wishlist the game now: https://bit.ly/LuckyTowerUltimate

Did they add this for pride month or has this always been there?

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

20th crown win of the season!

Bridge 😄

#LuckyTowerUltimate is OUT NOW on Steam and Nintendo Switch! It's your turn to become the Chosen One and rid the land of Evelius’s tower for good! https://store.steampowered.com/app/1700270/Lucky_Tower_Ultimate/

Accidentally won a solo game while unlocking Blazing Fire Cerberus!