diff --git a/CHANGELOG.md b/CHANGELOG.md index ec3ece0a..4d405ad6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.4.1 + +* Fix unhandled keycode doesn't occur reset + # 0.4.0 * Create CHANGELOG diff --git a/Cargo.lock b/Cargo.lock index 0d8873be..88646d1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -421,7 +421,7 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "kime-engine" -version = "0.4.0" +version = "0.4.1" dependencies = [ "ahash", "num-derive", @@ -435,7 +435,7 @@ dependencies = [ [[package]] name = "kime-engine-cffi" -version = "0.4.0" +version = "0.4.1" dependencies = [ "bindgen", "cbindgen", @@ -443,7 +443,7 @@ dependencies = [ [[package]] name = "kime-gtk3" -version = "0.4.0" +version = "0.4.1" dependencies = [ "gdk-sys", "glib-sys", @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "kime-xim" -version = "0.4.0" +version = "0.4.1" dependencies = [ "ahash", "cairo-rs", diff --git a/engine-cffi/Cargo.toml b/engine-cffi/Cargo.toml index 1d2133f3..fb1fd477 100644 --- a/engine-cffi/Cargo.toml +++ b/engine-cffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kime-engine-cffi" -version = "0.4.0" +version = "0.4.1" authors = ["Riey "] edition = "2018" diff --git a/engine/Cargo.toml b/engine/Cargo.toml index f882c64a..0cdffbc5 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kime-engine" -version = "0.4.0" +version = "0.4.1" authors = ["Riey "] edition = "2018" license = "GPL-3.0" diff --git a/engine/src/lib.rs b/engine/src/lib.rs index b747c78f..24206e94 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -251,9 +251,9 @@ pub unsafe extern "C" fn kime_engine_press_key( hardware_code: u16, state: u32, ) -> InputResult { + let engine = engine.as_mut().unwrap(); match KeyCode::from_hardward_code(hardware_code) { Some(code) => { - let engine = engine.as_mut().unwrap(); let config = config.as_ref().unwrap(); engine.press_key( @@ -266,7 +266,7 @@ pub unsafe extern "C" fn kime_engine_press_key( config, ) } - None => InputResult::bypass(), + None => bypass(&mut engine.state), } } diff --git a/gtk3/Cargo.toml b/gtk3/Cargo.toml index faa72d7b..68aa1678 100644 --- a/gtk3/Cargo.toml +++ b/gtk3/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kime-gtk3" -version = "0.4.0" +version = "0.4.1" authors = ["Riey "] edition = "2018" license = "GPL-3.0" diff --git a/xim/Cargo.toml b/xim/Cargo.toml index 4efd00b3..f8b71ddd 100644 --- a/xim/Cargo.toml +++ b/xim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kime-xim" -version = "0.4.0" +version = "0.4.1" authors = ["Riey "] edition = "2018" license = "GPL-3.0"