Refactor `process_key` of LocoMenu (#111)