ubuntu-flutter-community / settings

:penguin: :orange_heart: :blue_heart: An Ubuntu Desktop system settings app made with Flutter.
GNU General Public License v3.0
272 stars 47 forks source link

Grab keyboard for entering shortcuts #327

Closed jpnurmi closed 2 years ago

jpnurmi commented 2 years ago

NOTE: VS Code forces GDK_BACKEND=x11 which breaks keyboard grabbing on Wayland. For testing shortcuts on Wayland, run the app from outside of VS Code. Alternatively, you can also set GDK_BACKEND=wayland for the launch config even though it may result in strange behavior such as the window titlebar buttons being aligned to the wrong side etc.

Close: #102

Feichtmeier commented 2 years ago

Thank you so much! Testing 🤗 soon

jpnurmi commented 2 years ago

On app close:

(settings:1169695): GLib-GIO-WARNING **: 14:04:19.940: Your application did not unregister from D-Bus before destruction. Consider using g_application_run().
(settings:1169695): GLib-GObject-WARNING **: 14:04:19.940: invalid unclassed pointer in cast to 'GObject'
(settings:1169695): GLib-GObject-CRITICAL **: 14:04:19.940: g_object_notify: assertion 'G_IS_OBJECT (object)' failed
(settings:1169695): GLib-GIO-CRITICAL **: 14:04:19.940: g_dbus_connection_flush_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(settings:1169695): GLib-GObject-CRITICAL **: 14:04:19.940: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
malloc(): unaligned fastbin chunk detected
Feichtmeier commented 2 years ago

grafik

Keyboard grabbing works! But I might have some issue with my logic because the shortcut is combined to SuperA instead of super + A