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.
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.
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.
Change the Arduino Library Reference generator tool to use the data from the supported field when generating the "Compatibility" lists.
Define board compatibility in the supported field of the library.properties files of libraries.
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.