Evan Almloff 1 rok temu
rodzic
commit
4879f65a3e

+ 2 - 2
packages/dioxus-tui/src/element.rs

@@ -82,8 +82,8 @@ impl RenderedElementBacking for TuiElement {
         })
         })
     }
     }
 
 
-    fn get_raw_element(&self) -> dioxus_html::MountedResult<&dyn std::any::Any> {
-        Ok(self)
+    fn as_any(&self) -> &dyn std::any::Any {
+        self
     }
     }
 }
 }
 
 

+ 4 - 4
packages/rink/src/hooks.rs

@@ -177,10 +177,10 @@ impl InnerInputState {
 
 
                 if is_repeating {
                 if is_repeating {
                     *k = SerializedKeyboardData::new(
                     *k = SerializedKeyboardData::new(
-                        is_repeating,
-                        k.code(),
                         k.key(),
                         k.key(),
+                        k.code(),
                         k.location(),
                         k.location(),
+                        is_repeating,
                         k.modifiers(),
                         k.modifiers(),
                     );
                     );
                 }
                 }
@@ -777,10 +777,10 @@ fn translate_key_event(event: crossterm::event::KeyEvent) -> Option<EventData> {
     let modifiers = modifiers_from_crossterm_modifiers(event.modifiers);
     let modifiers = modifiers_from_crossterm_modifiers(event.modifiers);
 
 
     Some(EventData::Keyboard(SerializedKeyboardData::new(
     Some(EventData::Keyboard(SerializedKeyboardData::new(
-        false,
-        code,
         key,
         key,
+        code,
         Location::Standard,
         Location::Standard,
+        false,
         modifiers,
         modifiers,
     )))
     )))
 }
 }