Skip to content

Commit

Permalink
feat(clafrica): reserve function key for special purposes. (#52)
Browse files Browse the repository at this point in the history
The key F1-12 will be reserved for future features.
  • Loading branch information
pythonbrad committed Jun 3, 2023
1 parent 3868f8a commit ec9b81d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- Reserved function key F1-12 for special purposes. [(#52)](https://github.com/pythonbrad/clafrica/pull/52)
- Add a pause/resume way via double pressing of CTRL key [(#50)](https://github.com/pythonbrad/clafrica/pull/50) & [(#49)](https://github.com/pythonbrad/clafrica/pull/49)

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion clafrica/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ pub fn run(config: config::Config, mut frontend: impl Frontend) -> Result<(), io
frontend.update_text(cursor.to_sequence());
}
EventType::KeyPress(
E_Key::Unknown(_) | E_Key::ShiftLeft | E_Key::ShiftRight | E_Key::CapsLock,
E_Key::Unknown(_) | E_Key::ShiftLeft | E_Key::ShiftRight | E_Key::CapsLock |
// Reserved for special purpose
E_Key::F1 | E_Key::F2 | E_Key::F3 | E_Key::F4 | E_Key::F5 | E_Key::F6 |
E_Key::F7 | E_Key::F8 | E_Key::F9 | E_Key::F10 | E_Key::F11 | E_Key::F12
) => {
// println!("[ignore] {:?}", event.event_type)
}
Expand Down

0 comments on commit ec9b81d

Please sign in to comment.