Skip to content

Commit

Permalink
Bypass Shift key
Browse files Browse the repository at this point in the history
  • Loading branch information
Riey committed Jan 13, 2021
1 parent 77fe4ba commit 92cc584
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kime-engine"
version = "0.2.0"
version = "0.2.1"
authors = ["Riey <[email protected]>"]
edition = "2018"
license = "GPL-3.0"
Expand Down
3 changes: 3 additions & 0 deletions engine/src/keycode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ pub enum KeyCode {
DownArrow,

Esc,
Shift,
Backspace,
Henkan,
AltR,
Expand All @@ -102,6 +103,8 @@ impl KeyCode {
21 => Some(Self::Equal),
34 => Some(Self::OpenBracket),
35 => Some(Self::CloseBracket),
// Shift_L, Shift_R
50 | 62 => Some(Self::Shift),
51 => Some(Self::Backslash),
61 => Some(Self::Slash),
47 => Some(Self::SemiColon),
Expand Down
2 changes: 2 additions & 0 deletions engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ impl InputEngine {
if config.hangul_keys.contains(&key) {
self.enable_hangul = !self.enable_hangul;
InputResult::Consume
} else if key.code == KeyCode::Shift {
InputResult::Bypass
} else if key.code == KeyCode::Esc && config.esc_turn_off {
self.enable_hangul = false;
bypass(&mut self.state)
Expand Down
2 changes: 1 addition & 1 deletion gtk3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kime-gtk3"
version = "0.2.0"
version = "0.2.1"
authors = ["Riey <[email protected]>"]
edition = "2018"
license = "GPL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion xim/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kime-xim"
version = "0.2.0"
version = "0.2.1"
authors = ["Riey <[email protected]>"]
edition = "2018"
license = "GPL-3.0"
Expand Down

0 comments on commit 92cc584

Please sign in to comment.