Add seek forwards/backwards

This commit is contained in:
Jeremy Soller 2024-01-24 21:06:07 -07:00
parent 48ba7e7278
commit d39c10b946
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
3 changed files with 73 additions and 19 deletions

View file

@ -42,10 +42,10 @@ pub fn key_binds() -> HashMap<KeyBind, Action> {
let mut key_binds = HashMap::new();
macro_rules! bind {
([$($modifier:ident),+ $(,)?], $key_code:ident, $action:ident) => {{
([$($modifier:ident),* $(,)?], $key_code:ident, $action:ident) => {{
key_binds.insert(
KeyBind {
modifiers: vec![$(Modifier::$modifier),+],
modifiers: vec![$(Modifier::$modifier),*],
key_code: KeyCode::$key_code,
},
Action::$action,
@ -54,6 +54,8 @@ pub fn key_binds() -> HashMap<KeyBind, Action> {
}
//TODO: key bindings
bind!([], Left, SeekBackward);
bind!([], Right, SeekForward);
key_binds
}