darthdeus / comfy

Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use.
https://comfyengine.org
Apache License 2.0
678 stars 28 forks source link

Fix keyboard event detection #102

Open Plonq opened 1 month ago

Plonq commented 1 month ago

To be honest I'm not sure whether this is the correct way to fix this, but it seems that #101 is caused by https://github.com/darthdeus/comfy/commit/cd52f9f3db6b2e5db260ad35e4a59894e90ef727 which moved the keyboard event handling to use Event::DeviceEvent instead of Event::WindowEvent -> WindowEvent::KeyboardInput. In my testing Event::DeviceEvent is not fired when pressing keys (on macOS). This doesn't revert the above commit, it merely moves the code to use WindowEvent::KeyboardInput instead.

Fixes #101

Plonq commented 1 month ago

Note: doc check seems to be failing due to pre-existing typo

darthdeus commented 1 month ago

Thanks for this, I'll take a look soon 👀