boppreh / keyboard

Hook and simulate global keyboard events on Windows and Linux.
MIT License
3.76k stars 433 forks source link

Remove early initialization (Fix #563) #568

Closed Avasam closed 1 year ago

Avasam commented 1 year ago

Don't initialize the keyboard by simply importing the module. This is often too soon. And runs when installing (because setup.py imports keyboard).

The keyboards are initialized later anyway through start_if_necessary

Fixes #563

boppreh commented 1 year ago

I don't think skipping an import error is ideal, but it definitely fixes this important error. Thanks for the contribution!

Avasam commented 1 year ago

I don't think skipping an import error is ideal, but it definitely fixes this important error. Thanks for the contribution!

Agreed the macos Quartz import fix is a bandaid fix. Imo setup.py should maybe not import from keyboard?