Changed format of printed keys

Now it is easier to distinguish between strings and actual keys. For
example: <esc> or <e><s><c>.
This commit is contained in:
Dennis Potter 2018-11-26 12:51:11 +01:00
parent 44c542d99a
commit daf88336eb
1 changed files with 2 additions and 1 deletions

View File

@ -355,7 +355,8 @@ pub fn encode_byte(c: &str) -> Option<u8> {
pub fn decode_byte(u: &u8) -> Option<String> {
for key in KEY_MAP.iter() {
if key.1 == *u {
return Some(key.0.to_string())
let return_value = format!("{}{}{}", "<", key.0.to_string(), ">");
return Some(return_value)
}
}