implement first version of Key input feature.