开发者

Disable webview keyboard equivalents

开发者 https://www.devze.com 2023-02-08 00:22 出处:网络
I\'ve got a webview in my window (well, several) and want to use the delete key for a custom action. Is there a way to disable the delete key shortcut in the webview so i can use it for someth开发者_如

I've got a webview in my window (well, several) and want to use the delete key for a custom action. Is there a way to disable the delete key shortcut in the webview so i can use it for someth开发者_如何学JAVAing else?


I managed to do it via the webkit javascript bridge. Just check for the key in a javascript event and then call an obj-c method from there.


The WebEditingDelegate will let you know if a command is about to performed, and so you could override that perhaps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号