aerys / minko

3D framework for web, desktop and mobile devices.
http://minko.io
Other
906 stars 210 forks source link

keyboard inputs don't work in html-overlay + linux #208

Closed bgbnbigben closed 4 years ago

bgbnbigben commented 9 years ago

Using an field inside the html-overlay plugin doesn't seem to accept input. On my linux64 machine each keystroke triggers an error similar to the following:

[0402/112706:ERROR:browser_main_loop.cc(234)] Gdk: IA__gdk_keymap_get_entries_for_keyval: assertion 'keyval != 0' failed

I haven't tested this on android nor iphone yet but I suspect this issue likely occurs on those platforms too.

warrenseine commented 9 years ago

The error you've got looks related to your installed GTK version, which might be incompatible with the CEF framework we use.

I haven't tested this on android nor iphone yet but I suspect this issue likely occurs on those platforms too.

I wouldn't expect that. On mobile platforms, we're using a completely different technology to render HTML content (webview vs. embedded browser).

bgbnbigben commented 9 years ago

It happens with both <input> and <textarea>, whether or not they're subelements of a <form> or not. I have both libgtk2.0-dev and libgtkglext1-dev installed on Ubuntu 14.04 -- though it's running under a virtualbox, which might be an issue. I also have cef_binary_3.1750.1638_linux64 installed as per the instructions in the README.

There are also two start-up log messages that I hadn't noticed but don't believe are part of the problem:

[0403/081811:ERROR:proxy_service_factory.cc(103)] Cannot use V8 proxy resolver in single process mode
[0403/081811:WARNING:proxy_service.cc(890)] PAC support disabled because there is no system implementation
JMLX42 commented 9 years ago

I confirm the bug does exist on Linux.

@bgbnbigben did you find a solution?

JMLX42 commented 9 years ago

Hello,

the fix is rather simple: we have to fill the CefKeyEvent::native_key_code and CefKeyEvent::unmodified_character properties like this:

keyEvent.windows_key_code = key;
keyEvent.native_key_code = key;
keyEvent.unmodified_character = key;

You have to do this in all keyboard callbacks (key down, key up, text input) in ChromiumApp.cpp. The fix will soon be on the dev branch.

bgbnbigben commented 9 years ago

Hi there,

No, I didn't find a solution -- it didn't particularly bother me since Warren suggested it was a different technology to mobile (and I'm only required to target mobile for this project, though perhaps in the future we might also move to desktop). However, it seems you found a fix; great news! I currently only have an android build on hand so can't test this on linux, but shall clone the dev branch in a few days to confirm.

bgbnbigben commented 9 years ago

I don't believe this is a complete fix; for instance, the backspace button doesn't register with this fix.

JMLX42 commented 9 years ago

Correct. Some specific keys still don't work. Yet they work just fine on Windows. This is still likely a Linux specific issue. Le 11 mai 2015 09:01, "Ben Stott" notifications@github.com a écrit :

I don't believe this is a complete fix; for instance, the backspace button doesn't register with this fix.

— Reply to this email directly or view it on GitHub https://github.com/aerys/minko/issues/208#issuecomment-100790314.