pub struct InputHandler;Expand description
Handles input processing for the command panel
Implementations§
Source§impl InputHandler
impl InputHandler
Sourcepub fn handle_key_event(
state: &mut CommandPanelState,
key: KeyEvent,
) -> Vec<Action>
pub fn handle_key_event( state: &mut CommandPanelState, key: KeyEvent, ) -> Vec<Action>
Handle special key events for history and suggestions (only handles specific keys)
Sourcepub fn insert_char(state: &mut CommandPanelState, c: char) -> Vec<Action>
pub fn insert_char(state: &mut CommandPanelState, c: char) -> Vec<Action>
Insert a character at the current cursor position
Sourcepub fn delete_char(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_char(state: &mut CommandPanelState) -> Vec<Action>
Delete character before cursor
Sourcepub fn move_cursor(
state: &mut CommandPanelState,
direction: CursorDirection,
) -> Vec<Action>
pub fn move_cursor( state: &mut CommandPanelState, direction: CursorDirection, ) -> Vec<Action>
Move cursor in specified direction
Sourcepub fn check_jk_timeout(state: &mut CommandPanelState) -> bool
pub fn check_jk_timeout(state: &mut CommandPanelState) -> bool
Check and handle jk timeout (should be called periodically)
Sourcepub fn delete_previous_word(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_previous_word(state: &mut CommandPanelState) -> Vec<Action>
Delete the previous word from the cursor position
Sourcepub fn delete_to_end(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_to_end(state: &mut CommandPanelState) -> Vec<Action>
Delete from cursor to end of line
Sourcepub fn delete_to_beginning(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_to_beginning(state: &mut CommandPanelState) -> Vec<Action>
Delete from cursor to beginning of line
Auto Trait Implementations§
impl Freeze for InputHandler
impl RefUnwindSafe for InputHandler
impl Send for InputHandler
impl Sync for InputHandler
impl Unpin for InputHandler
impl UnwindSafe for InputHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more