Please sign in to comment.
Renamed get_key_state to pressed_keys, and improved it.
* Runs SDL.PumpEvents() to ensure key state is up to date. * The returned hash only has the keys that are pressed, non-pressed keys are omitted (instead of set to false). This is more lightweight, and easier to convert to a plain Array of the keys that are pressed. * Simplified code. * Rewrote docs.
- Loading branch information...
Showing with 29 additions and 14 deletions.