diff --git a/Cargo.lock b/Cargo.lock index c6a3a46a..0f2d0423 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -417,7 +417,7 @@ dependencies = [ [[package]] name = "kime-engine" -version = "0.2.0" +version = "0.2.1" dependencies = [ "ahash", "num-derive", @@ -432,7 +432,7 @@ dependencies = [ [[package]] name = "kime-gtk3" -version = "0.2.0" +version = "0.2.1" dependencies = [ "gdk-sys", "glib-sys", @@ -445,7 +445,7 @@ dependencies = [ [[package]] name = "kime-xim" -version = "0.2.0" +version = "0.2.1" dependencies = [ "ahash", "cairo-rs", diff --git a/engine/Cargo.toml b/engine/Cargo.toml index a668dd2a..14905350 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kime-engine" -version = "0.2.0" +version = "0.2.1" authors = ["Riey "] edition = "2018" license = "GPL-3.0" diff --git a/engine/src/keycode.rs b/engine/src/keycode.rs index 95398c04..76126f7d 100644 --- a/engine/src/keycode.rs +++ b/engine/src/keycode.rs @@ -79,6 +79,7 @@ pub enum KeyCode { DownArrow, Esc, + Shift, Backspace, Henkan, AltR, @@ -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), diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 8482689a..b48dd663 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -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) diff --git a/gtk3/Cargo.toml b/gtk3/Cargo.toml index bbe0f2da..cc319b8d 100644 --- a/gtk3/Cargo.toml +++ b/gtk3/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kime-gtk3" -version = "0.2.0" +version = "0.2.1" authors = ["Riey "] edition = "2018" license = "GPL-3.0" diff --git a/xim/Cargo.toml b/xim/Cargo.toml index ce2a29f3..050786ba 100644 --- a/xim/Cargo.toml +++ b/xim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kime-xim" -version = "0.2.0" +version = "0.2.1" authors = ["Riey "] edition = "2018" license = "GPL-3.0"