Shortcut support for orbclient::Window
Implementation to your Window application:
//Provides the capturing of default shortcuts: ALT+O (Open), ALT+N (New), ALT-Q (Quit) let mut sceq = ShortcutEq::with_defaults();
In a loop to capture window events implement EventOption::Key(ke):
Every keystroke that's a supported shortcut will return a ShortcutId::{New, Open, Quit}, which can be matched
events: loop { for event in window.events() { match event.to_option() { EventOption::Key(ke) => match sceq.update(ke) { Some(sc) => { //Sample action if PartialEq::eq(sc, &ShortcutId::Quit) {break 'events} None => {...}, }, ...