Open Sammy99jsp opened 1 year ago
Such an interface could be an extension to the ConfigurationSection macro, combined with a revision to AvKeys
.
In terms of code, we need:
xkbcommon
So, I am proposing:
AvKey
-- Represents a key (Key(...)
); a key parameter Parameter(AvKeyParam)
; or a raw X11 keycode (X11(u32)
)).AvKeyParam
to represent the key parameters.trait
(AvKeyShortcut
),AvShortcut
.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();
}
ModifierState
and key-codes (u32
s)