It's half USB Key, half Adafruit Trinket, half rotary encoder*...*it's Rotary Trinkey, the circuit board with a Trinket M0 heart ...
encoder.tick(); // just call tick() to check the state.