diff options
author | Josh Rahm <rahm@google.com> | 2024-02-21 12:18:28 -0700 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2024-02-21 12:18:46 -0700 |
commit | f070ba42d886025a6988afd1bd847057dca15b27 (patch) | |
tree | 3723323c514a4334a4f5f17486ebe3efa8fefc6a /harness/src/wl.c | |
parent | 22571fc455f50d1774e7abb9a77db3a51182a420 (diff) | |
download | wetterhorn-f070ba42d886025a6988afd1bd847057dca15b27.tar.gz wetterhorn-f070ba42d886025a6988afd1bd847057dca15b27.tar.bz2 wetterhorn-f070ba42d886025a6988afd1bd847057dca15b27.zip |
Add the typed codepoint as an argument to the keyboard handler.
Diffstat (limited to 'harness/src/wl.c')
-rw-r--r-- | harness/src/wl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/harness/src/wl.c b/harness/src/wl.c index 3f00e06..cdc3447 100644 --- a/harness/src/wl.c +++ b/harness/src/wl.c @@ -186,12 +186,17 @@ static void keyboard_handle_key(struct wl_listener *listener, void *data) int nsyms = xkb_state_key_get_syms(keyboard->device->keyboard->xkb_state, keycode, &syms); uint32_t modifiers = wlr_keyboard_get_modifiers(keyboard->device->keyboard); + uint32_t codepoint; /* Pass the information along to the plugin for the plugin to handle. The * plugin will return via 'handled' whether or not the key event was handled * or not. */ int handled = 0; - plugin_call_update_state(server->plugin, plugin_handle_keybinding, event, - modifiers, syms[0], &handled); + if (nsyms > 0) { + codepoint = + xkb_state_key_get_utf32(keyboard->device->keyboard->xkb_state, keycode); + plugin_call_update_state(server->plugin, plugin_handle_keybinding, event, + modifiers, syms[0], codepoint, &handled); + } if (!handled) { /* Otherwise, we pass it along to the client. */ |