keymanapp / keymanapp/keyman

feat(linux): mcompile exchange GdkKeymap as it is deprecated in GTK 4 🐘

Open
#8,972 0 comments 0 reactions 1 assignee Assigned to @Markus-SWAG View on GitHub
epic-linux-mcompile feat linux/ linux/engine/
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

At the moment we use GdkKeymap in mcompile for Linux but GdkKeymap is [deprecated in GTK 4](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/docs/reference/gtk/migrating-3to4.md#adapt-to-gdkkeymap-api-changes). Therefore it it preferable we wouldn't use it.

One possible solution that would work with X11 as well as Wayland would be something along the lines of the implementation of [gdk_wayland_keymap_get_entries_for_keycode](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdkkeymap-wayland.c#L173).

[xkb_keymap_new_from_names](https://xkbcommon.org/doc/0.2.0/group__keymap.html#ga502717aa7148fd17d4970896f1e9e06f) returns a struct xkb_keymap pointer. [xkb_keymap_key_get_syms_by_level](https://xkbcommon.org/doc/0.2.0/group__components.html#gad92b9334170316926595fbb5d634a181) then allows to get the keyvals for a given keycode.

see #3345

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.