Skip to content

Commit

Permalink
Fix uppercase characters being ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
apognu committed Nov 5, 2023
1 parent de5f73b commit fe58763
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,24 +266,14 @@ pub async fn handle(greeter: Arc<RwLock<Greeter>>, input: KeyEvent, ipc: Ipc) ->
Mode::Processing => {}
},

// Do not handle any other controls keybindings
KeyEvent { modifiers: KeyModifiers::CONTROL, .. } => {}

// Handle free-form entry of characters.
KeyEvent {
code: KeyCode::Char(c),
modifiers: KeyModifiers::NONE,
..
} => insert_key(&mut greeter, c).await,
KeyEvent { code: KeyCode::Char(c), .. } => insert_key(&mut greeter, c).await,

// Handle deletion of characters.
KeyEvent {
code: KeyCode::Backspace,
modifiers: KeyModifiers::NONE,
..
}
| KeyEvent {
code: KeyCode::Delete,
modifiers: KeyModifiers::NONE,
..
} => delete_key(&mut greeter, input.code).await,
KeyEvent { code: KeyCode::Backspace, .. } | KeyEvent { code: KeyCode::Delete, .. } => delete_key(&mut greeter, input.code).await,

_ => {}
}
Expand Down

0 comments on commit fe58763

Please sign in to comment.