forked from NotAShelf/beer
input: encode keyboard events and send them to the shell
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6ee2acd5f74575f4bcc2f41417207c626a6a6964
This commit is contained in:
parent
0df5588f02
commit
b2d656e7bd
5 changed files with 322 additions and 8 deletions
11
src/grid.rs
11
src/grid.rs
|
|
@ -124,6 +124,8 @@ pub struct Grid {
|
|||
alt_saved: Option<Vec<Vec<Cell>>>,
|
||||
cursor_shape: CursorShape,
|
||||
cursor_visible: bool,
|
||||
/// Application cursor-keys mode (DECCKM): arrows send SS3 instead of CSI.
|
||||
app_cursor: bool,
|
||||
/// Cursor colour from OSC 12; `None` follows the cell under the cursor.
|
||||
cursor_color: Option<(u8, u8, u8)>,
|
||||
}
|
||||
|
|
@ -154,6 +156,7 @@ impl Grid {
|
|||
cursor_shape: CursorShape::default(),
|
||||
cursor_visible: true,
|
||||
cursor_color: None,
|
||||
app_cursor: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -250,6 +253,14 @@ impl Grid {
|
|||
self.cursor_color
|
||||
}
|
||||
|
||||
pub fn set_app_cursor(&mut self, on: bool) {
|
||||
self.app_cursor = on;
|
||||
}
|
||||
|
||||
pub fn app_cursor(&self) -> bool {
|
||||
self.app_cursor
|
||||
}
|
||||
|
||||
// --- printing ---
|
||||
|
||||
/// Place a printable character at the cursor, honouring width and autowrap.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue