mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: cmdsys: define arranger commands
This commit is contained in:
parent
abbe0dc8f7
commit
1f375219db
3 changed files with 40 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ pub trait Command<T>: Sized {
|
|||
}
|
||||
|
||||
pub trait HandleKey<C: Command<Self> + 'static>: Sized {
|
||||
const HANDLE_KEY_MAP: &'static [(KeyEvent, C)];
|
||||
const HANDLE_KEY_MAP: &'static [(KeyEvent, C)]; // FIXME: needs to be method
|
||||
fn match_key (key: &KeyEvent) -> Option<&'static C> {
|
||||
for (binding, command) in Self::HANDLE_KEY_MAP.iter() {
|
||||
if key == binding {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue