I/O Retargeting  Version 1.2.0
User Code Templates for I/O Retargeting using ARM Compiler
 All Files Macros Pages
Retarget Input via Keyboard and Output via Display

For development boards from Keil (for example MCB4300, MCB1800, MCBSTM32F200/400), example projects are available that show how to use a USB keyboard for STDIN and a TFT LCD for STDOUT. These examples are usually called USB Host Keyboard and can be found using Pack Installer:

PI_USB_Keyboard.png
Pack Installer showing the USB Host Keyboard Example Project

Copy the project to your harddrive and examine how the example works. This will be the base for the next steps that show how to change the example to use ITM for STDOUT, and later a UART for STDOUT and STDIN.