I’d have to try with a Photon, but AFAICT there is no HID support on mesh devices yet.
It’s a requested feature but not very high on the priority list.
Update:
I have just tried this code on a Photon 1.4.2 and it works as expected.
Each time I hit the SETUP button the expected text gety typed out
SYSTEM_MODE(SEMI_AUTOMATIC)
STARTUP(Keyboard.begin())
void setup() {
}
void loop() {
if (!digitalRead(BTN)) {
Keyboard.printlnf("Test %lu", millis());
delay(1000);
}
}