Allow Espresso::Key in Keyboard#key
Currently the key
parameter for the Keyboard#key
and Keyboard#key?
methods are untyped, meaning you have to pass in a LibGLFW::Key
instance. Seeing as Espresso::Key
exists I figured it made more sense to strongly type it and add a conversion from Espresso::Key
to LibGLFW::Key
.
This allows those methods to be used with the shorthand symbol notation, which is nice.
if keyboard.key?(:escape)
# do something
end