Questions about Digistump's Digikeyboard

Hello everyone,

I would like to properly understand Digikeyboard.h (link)
What puzzles me is that you can do the following:

#include "DigiKeyboard.h"
void setup() {


I can only find the definition for delay() and sendKeyStroke() in DigiKeyboard.h but not print().
I would really like to understand how print() works in DigiKeyboard.

Does anybody happen to know where print() and F() are defined?

Thank you very much!

They are defined in the core library.

Does anybody happen to know where print()

it is inherited from the Print class:

class DigiKeyboardDevice : public Print {

The definition of the Print class is here:

This is some pretty cool code. It converts any printable type down to a call to a virtual method named write(). write() is defined by the class that inherits the Print class. So that same Print class code can be used for the DigisparkKeyboard library, HardwareSerial, SoftwareSerial, Ethernet, LiquidCrystal, and on and on…

and F() are defined?

It seems they left it out of their “tiny” core. You can see it here in the “pro” core:

Thank you very much for the detailed answer!

While looking into it I also started to wonder how it's done that a PC recognizes the Digispark as a HID device.
Is this simply because

defines it as a keyboard?