can-lehmann / owlkettle

A declarative user interface framework based on GTK 4
https://can-lehmann.github.io/owlkettle/README
MIT License
375 stars 13 forks source link

How to set up shortcuts for buttons? #20

Closed kulkesk closed 1 year ago

kulkesk commented 1 year ago

I looked everywhere in the examples and still i can't find how to set up shortcuts for buttons

can-lehmann commented 1 year ago

The development version of owlkettle has a shortcut field for buttons. You can use it to set a keyboard shortcut for a button. The format is the same one that GTK uses https://docs.gtk.org/gtk4/func.accelerator_parse.html

Note that this API might change in the future.

can-lehmann commented 1 year ago

I just added a short example for how to use the shortcut field to the widget documentation for the Button widget.

kulkesk commented 1 year ago

Thank you very much! Can't wait to see how this lovely library will evolve over time