diff options
author | sanine-a <sanine.not@pm.me> | 2020-05-22 23:50:07 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-05-22 23:50:07 -0500 |
commit | 3cf958fb0836cc07df413792be0266fe80988e00 (patch) | |
tree | 141a0ce4a001388471ae6141ba25b236159258d5 /src | |
parent | ad50ee243d9d7ac30ef507acd01bbc4ccb02f862 (diff) |
add honey_key_unbind_all()
Diffstat (limited to 'src')
-rw-r--r-- | src/input.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c index 7188560..bae32c6 100644 --- a/src/input.c +++ b/src/input.c @@ -39,6 +39,15 @@ void honey_key_unbind(int key) { /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +void honey_key_unbind_all() { + for (int i=0; i<HONEY_N_KEYS; i++) { + honey_key_callbacks[i] = NULL; + honey_key_callbacks_data[i] = NULL; + } +} + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + void default_honey_keyboard_callback(honey_window window, int key, int scancode, int action, int mods) { switch (key) { case GLFW_KEY_UNKNOWN: |