diff options
author | koekeishiya <aasvi93@hotmail.com> | 2017-08-24 13:32:19 +0200 |
---|---|---|
committer | koekeishiya <aasvi93@hotmail.com> | 2017-08-24 13:32:19 +0200 |
commit | b9040ee1b687b3d8407e0009be16374d3556ddef (patch) | |
tree | de0ec33d6a532ab9e140a5b74f93559ab406af9d /src/parse.c | |
parent | fbce46ad22ecdbca7ab32729b9e4e5d4dc1e8016 (diff) | |
download | skhd-b9040ee1b687b3d8407e0009be16374d3556ddef.tar.gz skhd-b9040ee1b687b3d8407e0009be16374d3556ddef.zip |
#2 change how we lookup literals
Diffstat (limited to '')
-rw-r--r-- | src/parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse.c b/src/parse.c index 11c3827..0ec0209 100644 --- a/src/parse.c +++ b/src/parse.c @@ -104,14 +104,14 @@ internal uint32_t literal_keycode_value[] = internal uint32_t parse_key_literal(struct parser *parser) { - uint32_t keycode = 0; + uint32_t keycode; struct token key = parser_previous(parser); // NOTE(koekeishiya): Might want to replace this mapping with a hashtable for(int i = 0; i < array_count(literal_keycode_str); ++i) { if(same_string(key.text, key.length, literal_keycode_str[i])) { keycode = literal_keycode_value[i]; - printf("\tkey: '%.*s' (%d)\n", key.length, key.text, keycode); + printf("\tkey: '%.*s' (0x%02x)\n", key.length, key.text, keycode); break; } } |