keyboardio / KeyboardioHID

A HID library for Arduino
MIT License
34 stars 17 forks source link

Add new 'isKeyPressed/wasKeyPressed API to help calling code be more … #43

Closed obra closed 6 years ago

obra commented 6 years ago

…efficient

We'd need this for my refactor of the modifier key masking branch.

@algernon, could you san check me before I merge this?

(Or if you're +1 and feel like merging, that's cool too)

algernon commented 6 years ago

The only thing I dislike about this is that all of these functions are for non-modifier keys, but the name does not convey that (the docs do, though). On the other hand, isNonModifierPressed would be even worse, so lets get these in.