Skip to content

Commit

Permalink
IBus should use ev keycode instead of X keycode
Browse files Browse the repository at this point in the history
  • Loading branch information
wengxt authored and icculus committed Apr 6, 2022
1 parent 27fc582 commit ff5b67e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/linux/SDL_ibus.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,9 @@ SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode)

if (IBus_CheckConnection(dbus)) {
Uint32 mods = IBus_ModState();
Uint32 ibus_keycode = keycode - 8;
if (!SDL_DBus_CallMethodOnConnection(ibus_conn, IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, "ProcessKeyEvent",
DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &keycode, DBUS_TYPE_UINT32, &mods, DBUS_TYPE_INVALID,
DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &ibus_keycode, DBUS_TYPE_UINT32, &mods, DBUS_TYPE_INVALID,
DBUS_TYPE_BOOLEAN, &result, DBUS_TYPE_INVALID)) {
result = 0;
}
Expand Down

0 comments on commit ff5b67e

Please sign in to comment.