Thank you for your time and help yuyun2000!
I am using ArduinoIDE. I have attempted to setup PlatformIO, but I was not able to find any information on setting up PlatformIO for the Tab5. I also tried UIFlow2, but when I tried to use M5Burner to load the firmware on the Tab5, it would just display a window with no firmware options.
I tried the simplified code. I do not know how to trigger BtnA.wasPressed, so I copied the Keyboard.print and Keyboard.write to the end of the setup function.
This code does work OK for the Cardputer, but there is no keyboard output when using the same simplified code with the same usb cable on the Tab5.
I have tested this on the Tab5 with the battery attached, but there is still no keyboard output.
I have only been able to get ArduinoIDE working so far, and I have attempted setting up ArduinoIDE on a new Fedora installation with the same results.
Has anyone been successful in getting OTG HID keyboard output from the Tab5?