add keyboard support and refine terminal print

terminal print:
unprintable character will not print

keyboard features:
differ general and shift hold condition