pub struct OptimizedInputHandler { /* private fields */ }Expand description
Optimized input handler with vim-like controls
Implementations§
Source§impl OptimizedInputHandler
impl OptimizedInputHandler
pub fn new() -> Self
Sourcepub fn handle_key_event(
&mut self,
state: &mut CommandPanelState,
key: KeyEvent,
) -> Vec<Action>
pub fn handle_key_event( &mut self, state: &mut CommandPanelState, key: KeyEvent, ) -> Vec<Action>
Handle key event with priority-based routing (delegates to InputHandler)
Sourcepub fn handle_char_input(
&mut self,
state: &mut CommandPanelState,
ch: char,
) -> Vec<Action>
pub fn handle_char_input( &mut self, state: &mut CommandPanelState, ch: char, ) -> Vec<Action>
Handle character input in different modes
Sourcepub fn insert_str(
&mut self,
state: &mut CommandPanelState,
text: &str,
) -> Vec<Action>
pub fn insert_str( &mut self, state: &mut CommandPanelState, text: &str, ) -> Vec<Action>
Insert a full string at the current cursor position efficiently (batch paste)
- In Input mode: inserts as single line (newlines converted to spaces), updates suggestion once
- In ScriptEditor: delegates to ScriptEditor for multi-line aware insertion
Sourcepub fn check_jk_timeout(&mut self, state: &mut CommandPanelState) -> bool
pub fn check_jk_timeout(&mut self, state: &mut CommandPanelState) -> bool
Check for jk timeout and handle it
Sourcepub fn handle_movement(
&mut self,
state: &mut CommandPanelState,
direction: CursorDirection,
) -> Vec<Action>
pub fn handle_movement( &mut self, state: &mut CommandPanelState, direction: CursorDirection, ) -> Vec<Action>
Handle basic movement (arrow keys, etc.)
Sourcepub fn handle_enter(&mut self, state: &mut CommandPanelState) -> Vec<Action>
pub fn handle_enter(&mut self, state: &mut CommandPanelState) -> Vec<Action>
Handle Enter key for script editor
Sourcepub fn handle_delete(&mut self, state: &mut CommandPanelState) -> Vec<Action>
pub fn handle_delete(&mut self, state: &mut CommandPanelState) -> Vec<Action>
Handle Delete key (Ctrl+D) - delete character at cursor position
Sourcepub fn handle_tab(&mut self, state: &mut CommandPanelState) -> Vec<Action>
pub fn handle_tab(&mut self, state: &mut CommandPanelState) -> Vec<Action>
Handle Tab key for script editor
Sourcepub fn handle_submit(&mut self, state: &mut CommandPanelState) -> Vec<Action>
pub fn handle_submit(&mut self, state: &mut CommandPanelState) -> Vec<Action>
Handle command submission (Enter key)
Sourcepub fn handle_backspace(&mut self, state: &mut CommandPanelState) -> Vec<Action>
pub fn handle_backspace(&mut self, state: &mut CommandPanelState) -> Vec<Action>
Handle backspace/delete
Trait Implementations§
Source§impl Debug for OptimizedInputHandler
impl Debug for OptimizedInputHandler
Auto Trait Implementations§
impl Freeze for OptimizedInputHandler
impl RefUnwindSafe for OptimizedInputHandler
impl Send for OptimizedInputHandler
impl Sync for OptimizedInputHandler
impl Unpin for OptimizedInputHandler
impl UnwindSafe for OptimizedInputHandler
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