diff --git a/editor/src/messages/input_mapper/utility_types/input_mouse.rs b/editor/src/messages/input_mapper/utility_types/input_mouse.rs index 7d4d197db6..6fba502779 100644 --- a/editor/src/messages/input_mapper/utility_types/input_mouse.rs +++ b/editor/src/messages/input_mapper/utility_types/input_mouse.rs @@ -76,7 +76,8 @@ pub struct EditorMouseState { impl EditorMouseState { pub fn from_keys_and_editor_position(keys: u8, editor_position: EditorPosition) -> Self { - let mouse_keys = MouseKeys::from_bits(keys).expect("Invalid decoding of MouseKeys"); + // TODO: Some graphic tablets send key codes not mentioned in the spec. In the future we would like to support these as well. + let mouse_keys = MouseKeys::from_bits_truncate(keys); Self { editor_position,