react-native-keyevent icon indicating copy to clipboard operation
react-native-keyevent copied to clipboard

Does not work when the focus is inside webview.

Open mrcatman opened this issue 5 years ago • 4 comments

The listener (KeyEvent.onKeyDownListener()) does not work when the focus is inside webview. (on Android TV)

mrcatman avatar Jan 27 '20 18:01 mrcatman

Would also love support for this

austinhjones avatar May 26 '20 15:05 austinhjones

I faced a similar problem, maybe a year ago. I've fork react-native-webview and add method ref.requesFocus(), its's already in master. You need to focus on WebView to trigger key events on the component. Previously I've done this with a focus on inputs inside WebView, but this sometimes leads to unexpected behavior. I hope I understand properly and it will help you.

marcupan avatar May 26 '20 21:05 marcupan

@marcupan I'm trying to capture keyevents in the parent of the WebView, but the issue is that when i make the WebView (a video) go fullscreen, i'm having trouble getting the fullscreen to release focus to my component so i can register the keypresses

austinhjones avatar May 29 '20 03:05 austinhjones

Any update on this?

tsalama avatar Aug 31 '22 19:08 tsalama