diff --git a/.changes/revert-global-command.md b/.changes/revert-global-command.md new file mode 100644 index 000000000..ac21f9f62 --- /dev/null +++ b/.changes/revert-global-command.md @@ -0,0 +1,5 @@ +--- +"wry": patch +--- + +Revert global keys shortcuts (wry#1156) \ No newline at end of file diff --git a/src/wkwebview/mod.rs b/src/wkwebview/mod.rs index cd929b4fa..0607e2b72 100644 --- a/src/wkwebview/mod.rs +++ b/src/wkwebview/mod.rs @@ -342,10 +342,6 @@ impl InnerWebView { sel!(acceptsFirstMouse:), accept_first_mouse as extern "C" fn(&Object, Sel, id) -> BOOL, ); - decl.add_method( - sel!(performKeyEquivalent:), - key_equivalent as extern "C" fn(&mut Object, Sel, id) -> BOOL, - ); extern "C" fn accept_first_mouse(this: &Object, _sel: Sel, _event: id) -> BOOL { unsafe { @@ -357,17 +353,7 @@ impl InnerWebView { } } } - - extern "C" fn key_equivalent(_this: &mut Object, _sel: Sel, event: id) -> BOOL { - unsafe { - let app = cocoa::appkit::NSApp(); - let menu: id = msg_send![app, mainMenu]; - let () = msg_send![menu, performKeyEquivalent: event]; - } - YES - } } - decl.register() } _ => class!(WryWebView),