Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - Keyboard events HTMLWindow with chromiumFx #34

Open
renanpc opened this issue Nov 9, 2017 · 5 comments
Open

Question - Keyboard events HTMLWindow with chromiumFx #34

renanpc opened this issue Nov 9, 2017 · 5 comments

Comments

@renanpc
Copy link

renanpc commented Nov 9, 2017

I'm trying to use the HTMLWindow.PreviewKeyDown event, but it is never fired.

Should I use another event to catch the pressed keys ?

Thanks !

@David-Desmaisons
Copy link
Member

Did you try PreviewKeyDown on the corresponding window?

@renanpc
Copy link
Author

renanpc commented Nov 14, 2017

Yes, I tried on the example project too, and that event is never fired.

The problem happens when I use wpf:HTMLWindow and the app with chromiumfx:ChromiumFxWebBrowserApp, the MainWindow PreviewKeyDown is never fired.

Another question, Is there some way to inject keyboard events on chromiumFX IWebView, like the event InjectKeyboardEvent of MVVMAwesomium ?

How can I get the current Instance of IWebView inside a ViewModel ?

@David-Desmaisons
Copy link
Member

To inject keybord use IWPFCfxWebWindow that gives a reference to ChromiumFx ChromiumWebBrowser.

See Example.ChromiumFX.Vue.SOP main window as an example how to get a reference to IWPFCfxWebWindow

@David-Desmaisons
Copy link
Member

@renanpc , Regarding previewKeyDown, did you try KeyDown on ChromiumWebBrowser? By the way, which scenario you want to adress with this event?

@renanpc
Copy link
Author

renanpc commented Nov 23, 2017

I tried, KeyDown and PreviewKeyDown and neither one works.

I need use keys in some scenarios of my application, the most scenarios where I need to use are in development environment, because the software use some keys to simulate some machine behaviors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants