Referring https://github.com/arduino/Arduino/issues/6659 Same/similar issue (which was solved), but now for the Keyboard library (e.g. Leonardo). The functions in the title return size_t, not int.