Having trouble finding documentation for emulating a keyboard

"Have you actually selected 0.6.0-rc.2 as target?"
What exactly “actually selected” mean? You’ve seen screenshot. Do I need to do something else?
Screen capture: http://bit.ly/2cACcPC

I believe the problem is that your device #5 appears to be a Core. From [usb_config_hal.h] (https://github.com/spark/firmware/blob/develop/hal/inc/usb_config_hal.h) it appears that USB keyboard is only supported on the Photon and Electron (PLATFORM_ID >= 6).

May be that is Web IDE bug with existing code that won’t reliably switch firmware? I’m encountering this on Firefox 48.0.2 Windows 7 x64 if that matters.

That sucks. I already have HID device working on Core built with pretty old branch manually and it sucks that only Photon has that now. And I have many Cores left that I’d want to use.

i have the same/similar problem.
if i'm trying to compile the following code

#include "application.h"

void setup() {
Keyboard.begin();
Mouse.begin();
}

void loop() {
Keyboard.print("Hello");
Mouse.move(5,-5,0);
delay(1000);
}

i get:

error: 'Keyboard' was not declared in this scope
error: 'Mouse' was not declared in this scope
error: 'Keyboard' was not declared in this scope
error: 'Mouse' was not declared in this scope

I'm using the web IDE.
And a Particle Photon.

any ideas?

Yup, the one already mentioned in this post (in this thread)

And is your device one of Photon/P1/Electron (as mentioned in the github "thread")?

That sucks. I already have HID device working on Core built with pretty old branch manually and it sucks that only Photon has that now. And I have many Cores left that I'd want to use.

If you felt comfortable contributing I'm sure the firmware team would love a PR to support the Spark Core!

1 Like

I believe HAL was rewritten from scratch since then, so my adjustments are basically useless for current firmware. It is from 1.5 years. Also code was not so clean to contribute it. I’m still using that version for that device though