Skip to content

Instantly share code, notes, and snippets.

@serdkan
Created December 27, 2017 07:26
Show Gist options
  • Save serdkan/13a89ab22cde39da6fca490b22d721bc to your computer and use it in GitHub Desktop.
Save serdkan/13a89ab22cde39da6fca490b22d721bc to your computer and use it in GitHub Desktop.
Python-ButtonClick-KeyClick
#_*_ coding:cp1254 _*_
from tkinter import *
pencere = Tk()
def tusabas(event):
print ("basildi",repr(event.char))
def tiklanma(event):
frame.focus_set()
print("Mouse Tıklan",event.x,event.y)
frame = Frame(pencere,width=100,height=100)
frame.bind("<Key>",tusabas)
frame.bind("<Button-1>",tiklanma)
frame.grid(row=0,column=0)
pencere.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment