Documentation for Keyboard library needs some correction

Hi Team,

I was trying to use Keyboard Library with Arduino UNO R3 because the documentation lists UNO as a compatible board with this library. Only when the library failed to compile, I found on this forum that this library is not compatible with UNO. I found multiple posts on Arduino forum where people complained about not able to use this library and then they are told that the Library is not compatible with the board.

Hence requesting you to please update this page so that it will not cause confusion in the future.

UNO is compatible, but you are right - particular this page is useless. if it will be deleted nothing changes.

Hi @viraniac. The library reference pages like Keyboard - Arduino Reference are automatically generated for all the libraries in the Arduino Library Manager based on the information in their library.properties metadata file.

The "Compatibility" list on the reference pages is based on the architectures field of that file. The reference page generator simply adds all the official boards of each architecture in the field to the list. This is why official boards like the UNO are included in the "Compatibility" list on the "Keyboard" library's page.

As in this case, a library might require capabilities that are not provided by all boards of that architecture. Currently, there isn't any machine readable data that would allow the generator to understand this so boards that are incompatible with the library may be listed in the reference page.

This problem is tracked by the Arduino website developers here:

Note that this is explained in the "Compatibility note" on the reference page:

Compatibility Note

Note: while the library is supposed to compile correctly on these architectures, it might require specific hardware features that may be available only on some boards.

The developers are already working on adding the capability to define compatibility at a board-level granularity:

If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject.

Since the list is automatically generated and the data it is based on does not have board-level granularity, there is currently no way for a human to remove a specific board such as UNO.

Thanks for responding back to me. After starting the thread, I did went through the library.properties metadata documentation and was also looking at library-repository-engine and other repositories to see if I can find where this is getting generated. But as I now know that a developer is already working on it, I guess there is nothing more I can contribute regarding this.

Nice to see this will get fixed soon.

@Kolaha By UNO is compatible, do you mean 16u2 on UNO is compatible after it is flashed with hoodloader?

I just found out about Hoodloader, will give it a try tomorrow.

Arduino Team means

You are welcome. I'm glad to have the opportunity to share some information on this interesting subject. Although the problem has existed for years and been brought up here a few times, the solidification of a proposal for how it might be solved, and the work to implement that proposal is very recent so we have more information now than ever before.

I think the path to fixing arduino/Arduino#11871 will be as follows:

  1. Add the supported field of library.properties to the Arduino Library Specification (in progress)
  2. Change the libraries-repository-engine tool to include the data from the supported field in the Library Manager index.
  3. Change the Arduino Library Reference generator tool to use the data from the supported field when generating the "Compatibility" lists.
  4. Define board compatibility in the supported field of the library.properties files of libraries.
  5. Make new releases of the libraries.

Step (4) is where there is a lot of opportunity for the Arduino community to contribute to the initiative. This supported field will be completely optional, so it is not mandatory to define the board compatibility for a library, but all the work to implement the infrastructure to use the data only provides a benefit for the libraries that do define it. The Arduino company will work to define it in the official libraries, but that leaves the task of adding the data to thousands of 3rd party libraries.

Thanks for sharing the article. I also found the following article

This also lists filenames for files that need to be flashed for their respective devices.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.