lunduniversity / introprog-scalalib

Scala library with simple-to-use utilites for students of introductory programming. http://cs.lth.se/pgk/api
BSD 2-Clause "Simplified" License
60 stars 14 forks source link

Improve cross-platform event handling #12

Closed Patrikgyllvin closed 4 years ago

Patrikgyllvin commented 4 years ago

Using a Map for key code lookup in handleEvent unifies event handling across platforms, fixing issues with special keys on macOS. Calling setFocusTraversalKeysEnabled(false) on frame in initFrame fixes TAB strokes not being recognized. This is tested with labs on all major platforms.

Fixes #11, fixes #1.