Skip to content

Commit

Permalink
docs / fix global default
Browse files Browse the repository at this point in the history
  • Loading branch information
nick42d committed Dec 4, 2024
1 parent b9e842f commit b582c33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions youtui/src/app/component/actionhandler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::{
};
use async_callback_manager::AsyncTask;
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers, MouseEvent};
use itertools::Itertools;
use std::{borrow::Cow, collections::BTreeMap};
use tracing::warn;
use ytmapi_rs::common::SearchSuggestion;
Expand Down
4 changes: 3 additions & 1 deletion youtui/src/app/keycommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ pub struct Keybind {
pub modifiers: KeyModifiers,
}
// Since KeyCode and KeyModifiers derive PartialOrd, it's safe to implement this
// as per below. TODO: PR upstream
// as per below.
//
// Upstream PR that would allow derive(Ord): https://github.com/crossterm-rs/crossterm/pull/951
#[allow(clippy::derive_ord_xor_partial_ord)]
impl Ord for Keybind {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
Expand Down
2 changes: 1 addition & 1 deletion youtui/src/config/keybinds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ fn default_global_keybinds() -> BTreeMap<Keybind, KeyActionTree<AppAction>> {
),
(
Keybind::new_unmodified(crossterm::event::KeyCode::Char(' ')),
KeyActionTree::new_key_defaulted(AppAction::Pause),
KeyActionTree::new_key_with_visibility(AppAction::Pause, CommandVisibility::Global),
),
(
Keybind::new(crossterm::event::KeyCode::Char('c'), KeyModifiers::CONTROL),
Expand Down

0 comments on commit b582c33

Please sign in to comment.