Minor refactoring in input#proc-key-input.