Adding action to key text field