Theme parser error: style.css:90:1-13: Unknown @ rule
Theme parser error: style.css:107:3-20: No property named "-gtk-key-bindings"
What’s the way to go with this in GTK4? I found nothing on Gtk3->4 migration guide and there’s no Gtk – 3.0: Key Bindings on GTK4 docs, so I supposed this feature was removed.
Yes, the “key themes” were removed. There is no replacement, as of this moment. There’s also no plan to re-introduce a way to change existing key bindings. See this comment on GitLab: drop keyboard themes (#1669) · Issues · GNOME / gtk · GitLab
I always found this way of defining shortcuts on CSS files confusing and IMO was a good decision to not move with it to GTK4.
But…. is there not even a ugly workaround to remove these key bindings? like adding a shortcut controller with same shortcuts but doing nothing and activating another action?
GykSourceView uses keybindings that I need to use in my application and if I can’t disable them I can’t use it all, making it impossible to port my app to GTK4
You can use a custom ShortcutController for your application, and set it to capture key shortcuts; those will take the precedence over the shortcuts used by other widgets—assuming GtkSourceView does not use the capture phase itself.