আমরা
উদাহরণ
# Import required libraries
from tkinter import *
from tkinter import ttk
# Create an instance of tkinter frame
win = Tk()
# Define the geometry of the window
win.geometry("700x250")
win.title("CAPS Lock Status")
def caps_lock_on(e):
label_caps.config(text="CAPS Lock is ON")
def caps_lock_off(e):
label_caps.config(text="CAPS Lock is OFF")
label_caps = Label(win, font="Helvetica 15 bold")
label_caps.pack(pady=20)
win.bind("<Lock-KeyPress>", caps_lock_on)
win.bind("<Lock-KeyRelease>", caps_lock_off)
win.mainloop() আউটপুট
ব্যবহারকারী যখন CAPS লক টিপে, তখন এটি তার বর্তমান স্থিতি দেখাবে, তা চালু হোক বা বন্ধ হোক৷

