Skip to content

Commit

Permalink
revert(clafrica): whitespaces as allowed chacracters (#64)
Browse files Browse the repository at this point in the history
This reverts commit fd2336a.
  • Loading branch information
pythonbrad committed Aug 12, 2023
1 parent fd2336a commit 4b60550
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Implement the auto capitalization. [(#56)](https://github.com/pythonbrad/clafrica/pull/56)

### Fixed
- Allowed whitespaces usage. [(#63)](https://github.com/pythonbrad/clafrica/pull/63)
- Improve the pause/resume way via double pressing of CTRL key. [(#54)](https://github.com/pythonbrad/clafrica/pull/54)
- Drop function key F1-12 which was reserved for special purposes. [(#62)](https://github.com/pythonbrad/clafrica/pull/62)

Expand Down
1 change: 0 additions & 1 deletion clafrica/data/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ cc = { value = "ç", alias = ["ccced"]}
uu = "ʉ"
uu3 = "ʉ̄"
uuaf3 = "ʉ̄ɑ̄"
"a\t" = "ɑ"
8 changes: 2 additions & 6 deletions clafrica/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ pub fn run(config: config::Config, mut frontend: impl Frontend) -> Result<(), io
for event in rx.iter() {
let character = event.name.and_then(|s| s.chars().next());
let is_valid = character
.map(|c| c.is_alphanumeric() || c.is_ascii_punctuation() || c.is_whitespace())
.unwrap_or(false);
.map(|c| c.is_alphanumeric() || c.is_ascii_punctuation())
.unwrap_or_default();

match event.event_type {
EventType::KeyPress(E_Key::Backspace) => {
Expand Down Expand Up @@ -257,10 +257,6 @@ mod tests {
input!(CapsLock Num5 CapsLock KeyU, typing_speed_ms);
output!(textfield, format!("{LIMIT}αÛû"));

// We verify that the usage of white works as expected
input!(KeyA Tab, typing_speed_ms);
output!(textfield, format!("{LIMIT}αÛûɑ"));

rstk::end_wish();
}
}

0 comments on commit 4b60550

Please sign in to comment.