Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More key combinations #9

Open
qezz opened this issue Jun 10, 2024 · 1 comment
Open

More key combinations #9

qezz opened this issue Jun 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@qezz
Copy link
Owner

qezz commented Jun 10, 2024

  • M-DEL aka M-<backspace> to delete a word, equiv to backward-kill-word
  • M-f, M-b to move one word forward and backward It's already there.
  • C-t to swap chars, M-t to swap words
  • M-d delete word (forward)
  • M-g M-g go to line
  • C-s to search, or regex search (swiper-like)
  • M-; comment/uncomment region
  • ...
@qezz qezz added the enhancement New feature or request label Jun 10, 2024
@qezz
Copy link
Owner Author

qezz commented Jul 11, 2024

M-<backspace> etc. is currently not possible due to the upstream implementation of zee's TUI library -- zi

/// Input event
#[derive(Debug)]
pub enum Event {
    KeyPress(Key),
}

/// Keyboard input. It aims to match what a terminal supports.
#[derive(Debug, Clone, Copy, PartialOrd, PartialEq, Eq, Hash)]
pub enum Key {
    /// Backspace.
    Backspace,
    /// Left arrow.
    Left,
    /// Right arrow.
    Right,
    /// Up arrow.
    Up,
    /// Down arrow.
    Down,
    /// Home key.
    Home,
    /// End key.
    End,
    /// Page Up key.
    PageUp,
    /// Page Down key.
    PageDown,
    /// Backward Tab key.
    BackTab,
    /// Delete key.
    Delete,
    /// Insert key.
    Insert,
    /// Function keys.
    ///
    /// Only function keys 1 through 12 are supported.
    F(u8),
    /// Normal character.
    Char(char),
    /// Alt modified character.
    Alt(char),
    /// Ctrl modified character.
    ///
    /// Note that certain keys may not be modifiable with `ctrl`, due to limitations of terminals.
    Ctrl(char),
    /// Null byte.
    Null,
    /// Esc key.
    Esc,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant