Port classes are the keybrd library’s interface to microcontoller ports and I/O expander ports.
To write your own port classes: 1) Get a copy of the controller or I/O expander datasheet. 2) Study keybrd port classes that use a similar IC. 3) Consider looking for other open-source keyboard code that uses the same IC e.g. TMK keyboard firmware. 4) Write your RowPort* class to inherit from RowPort class. 5) Write your ColPort* class to inherit from ColPort class.
Writing port classes is the most technically demanding task in the keybrd library. It might be faster to designing your keyboard around one of the controllers or I/O expanders that already have port classes in the keybrd library.
keybrd tutorial by Wolfram Volpi is licensed under a Creative Commons Attribution 4.0 International License.
Permissions beyond the scope of this license may be available at https://github.com/wolfv6/keybrd/issues/new.