diff --git a/CHANGELOG.md b/CHANGELOG.md index 98ce58d..f37d8f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,13 @@ ## Unreleased +## v0.8.0 (13 Sep 2024) + * Add 102/105-key Finnish/Swedish layout * Add 102/105-key Norwegian layout +* Fix broken Backslash for Us104 layout +* Fix `<` and `>` for Azerty layout +* Renamed `Modifiers::alt_gr` to `Modifiers::ralt` and add `Modifiers::lalt` ## v0.7.0 (12 Feb 2022) diff --git a/Cargo.toml b/Cargo.toml index 65d4f51..fccb2fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pc-keyboard" -version = "0.7.0" +version = "0.8.0" authors = ["Jonathan 'theJPster' Pallant ", "Rust Embedded Community Contributors"] description = "PS/2 keyboard interface library." keywords = ["keyboard", "ps2", "scancode", "layout"] diff --git a/src/lib.rs b/src/lib.rs index 98bb1ae..172102a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -68,13 +68,12 @@ where /// Indicates different error conditions. #[derive(Debug, PartialEq, Eq, Copy, Clone)] +#[non_exhaustive] pub enum Error { BadStartBit, BadStopBit, ParityError, UnknownKeyCode, - #[doc(hidden)] - InvalidState, } /// Keycodes that can be generated by a keyboard. @@ -646,6 +645,12 @@ impl Ps2Decoder { } } +impl Default for Ps2Decoder { + fn default() -> Self { + Ps2Decoder::new() + } +} + impl EventDecoder where L: KeyboardLayout, diff --git a/src/scancodes/set1.rs b/src/scancodes/set1.rs index 4775eb2..4c7dbf8 100644 --- a/src/scancodes/set1.rs +++ b/src/scancodes/set1.rs @@ -313,6 +313,12 @@ impl ScancodeSet for ScancodeSet1 { } } +impl Default for ScancodeSet1 { + fn default() -> Self { + ScancodeSet1::new() + } +} + #[cfg(test)] mod test { use super::*; diff --git a/src/scancodes/set2.rs b/src/scancodes/set2.rs index 4dcc9d6..5f74ab7 100644 --- a/src/scancodes/set2.rs +++ b/src/scancodes/set2.rs @@ -266,6 +266,12 @@ impl ScancodeSet for ScancodeSet2 { } } +impl Default for ScancodeSet2 { + fn default() -> Self { + ScancodeSet2::new() + } +} + #[cfg(test)] mod test { use super::*;