mac-comp127 / kilt-graphics

Graphics and UI library for learning software development principles in Java
https://mac-comp127.github.io/kilt-graphics/
2 stars 17 forks source link

Add keyboard events to CanvasWindow #1

Closed pcantrell closed 4 years ago

pcantrell commented 4 years ago

comp127graphics currently can detect keystrokes inside a TextField, but does not provide a way for a whole window to detect keystrokes. This makes it impossible to, for example, write a keyboard-controlled video game.

Could CanvasWindow provide onKeyDown and onKeyUp methods, similar to the existing mouse event methods?

pcantrell commented 4 years ago

Keyboard events are now available for use! Please read more in the pull request that implements them: https://github.com/mac-comp127-f19/127-shared/pull/7