keyboard icon indicating copy to clipboard operation
keyboard copied to clipboard

Using exit(0) inside on_press_key() lambda doesn't exit the program

Open 8dcc opened this issue 1 year ago • 0 comments

If I use the following line:

keyboard.on_press_key("F4", lambda event: print("test"))

The message is printed, but if I try to exit instead, nothing happens at all:

keyboard.on_press_key("F4", lambda event: exit(0))

I also tried using sys.exit(0), but nothing happens.

8dcc avatar Jan 17 '24 22:01 8dcc