Avdan-OS / Compositor

Rusty AvdanOS Wayland compositor
GNU General Public License v3.0
22 stars 11 forks source link

Keyboard shortcuts: Integrate with compositor. #68

Open Sammy99jsp opened 1 year ago

Sammy99jsp commented 1 year ago
Sammy99jsp commented 1 year ago

Such an interface could be an extension to the ConfigurationSection macro, combined with a revision to AvKeys.

Sammy99jsp commented 1 year ago

In terms of code, we need:

Sammy99jsp commented 1 year ago

So, I am proposing:

The AvShortcut macro generates an implementation of AvKeyShortcut for a particular action:

#[AvShortcut(Logo+{d})]
fn switch_window<B: 'static>(state : &mut Navda<B>, params : &[AvKeyParam]) {
    state.space.elements().nth(params[0].value()).focus();
}