Showing the changes to input (2 of 4 files). Show all
Unified · Split
| @@ -322,6 +322,16 @@ void mp_print_key_list(struct mp_log *out) · 321 unmodified lines | ||
| 322 | 322 | mp_info(out, "%s\n", key_names[i].name); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | +char **mp_get_key_list(void) | |
| 326 | +{ | |
| 327 | + char **list = NULL; | |
| 328 | + int num = 0; | |
| 329 | + for (int i = 0; key_names[i].name != NULL; i++) | |
| 330 | + MP_TARRAY_APPEND(NULL, list, num, talloc_strdup(NULL, key_names[i].name)); | |
| 331 | + MP_TARRAY_APPEND(NULL, list, num, NULL); | |
| 332 | + return list; | |
| 333 | +} | |
| 334 | + | |
| 325 | 335 | int mp_normalize_keycode(int keycode) |
| 326 | 336 | { |
| 327 | 337 | if (keycode <= 0) |
| @@ -253,5 +253,6 @@ int mp_input_get_keys_from_string(char *str, int max_num_keys, · 252 unmodified lines | ||
| 253 | 253 | |
| 254 | 254 | struct mp_log; |
| 255 | 255 | void mp_print_key_list(struct mp_log *out); |
| 256 | +char **mp_get_key_list(void); | |
| 256 | 257 | |
| 257 | 258 | #endif /* MPLAYER_KEYCODES_H */ |