diff --git a/dislocker_client.py b/dislocker_client.py index 69a61cf..2867c89 100644 --- a/dislocker_client.py +++ b/dislocker_client.py @@ -121,6 +121,7 @@ class Lock(customtkinter.CTkToplevel): self.password_entry = customtkinter.CTkEntry(self.input_frame, placeholder_text='パスワード', show='*', font=self.textbox_font) self.password_entry.grid(row=0, column=0, padx=10, sticky="ew") + self.password_entry.bind("", self.auth_start_ev) self.button_frame = customtkinter.CTkFrame(self, corner_radius=0, fg_color='transparent') self.button_frame.grid(row=3, column=0, padx=10, pady=10, sticky="nsew") @@ -136,7 +137,7 @@ class Lock(customtkinter.CTkToplevel): self.signin_button = customtkinter.CTkButton(self.button_frame, text='ヘルプ', command=self.help_dummy, font=self.button_font) self.signin_button.grid(row=0, column=0, padx=10, sticky="w") - + self.keyboard_listener_thread = threading.Thread(target=self.keyboard_listener) self.keyboard_listener_thread.daemon = True self.keyboard_listener_thread.start() @@ -156,6 +157,12 @@ class Lock(customtkinter.CTkToplevel): auth_thread.daemon = True auth_thread.start() + def auth_start_ev(self, event): + auth_thread = threading.Thread(target=self.auth) + auth_thread.daemon = True + auth_thread.start() + + def auth(self): password = str(self.password_entry.get()) if len(password) == 10: