Open moskovich opened 10 years ago
Hi,
I have a question before send a Pull request for this. Is necessary to keep the Gaia keyboard in the apc-io Gaia source? Will you use it?
Regards, Gio
Set the pref dom.mozInputMethod.enabled
to false after #906096 lands. Did I win?
@Gioyik yes, we should support cases where hardware keyboard is absent, in which case user should be presented with the virtual keyboard. So the use cases are:
Hardware keyboards might be plugged in at boot time, or on-the-fly.
@janjongboom We will investigate this further, tks for pointing this out.
@janjongboom The setting you mentioned in your earlier comment disabled completely the software keyboard, which is not exactly what we want (see also my answer to @Gioyik above). Another hint? :)
@ntlc Sure. Where would the management code live? In system app? If system app it can be hacked into gaia, otherwise will need a gecko fix to add this to navigator.mozInputMethod.mgmt
.
I created a tracking bug in https://bugzilla.mozilla.org/show_bug.cgi?id=922478
Thanks for the bugzilla request. In the meantime, our Free APC remains open to any patch allowing this feature working while waiting for Mozilla (which might be slow) :) All source code is open to public, pls feel free to pull and give it a try :)
Gecko and Gaia patches have been submitted in bugzilla. To give it a try, build with the patch applied (f.e. ./mach build
) and run the gaia branch.
navigator.mozInputMethod.mgmt.softKeyboardEnabled = false
Can be called from any app with the keyboard
permission (warning, will be renamed to inputmethod
) to disable soft keyboards in Firefox OS.
@janjongboom what is tricky here is to detect the presence/absence of the hardware keyboard in order to disable/enable the software keyboard accordingly. Your patch does take care of the second action, but the critical part (event detection and propagation/notification) is still missing. Would you be interested in continuing the challenge? :)
@ntlc The device gets connected in https://github.com/apc-io/apc_b2g_gecko/blob/3fd923659543230db0adb72242037a9990b6261c/widget/gonk/libui/EventHub.cpp#L1100, should throw up an event if keyboard is connected. Then listen in MozKeyboard.js
for that event and set mgmt.softKeyboardEnabled
to false (or pass it through to gaia via a chrome event and handle it there).
I don't have the time to dive into Gonk a.t.m. but anyone who worked with it should pretty easily be able to write that part.
We're talking about a hardware keyboard event on this page: https://wiki.mozilla.org/User:Timdream/InputMethod_API_with_hardware_keyboard#Idea
Hi all, I am the original author of the API proposal above. I believe the API proposal cover the use case here so if there is no objection I highly recommend to patch Gecko according to the API proposal. It seems like @janjongboom have already done so on https://bugzilla.mozilla.org/show_bug.cgi?id=922478
The usual place to discuss API implementation is the https://lists.mozilla.org/listinfo/dev-webapi mailing list.
I wonder if there is any @apc-io developers interested to contribute the entire API? That will enable hardware keyboard to talk to Keyboard app, thus enabling Asian IMEs / Latin language spell check, etc. I am thankful @janjongboom's effort to contribute but we need to prioritize features on Mozilla roadmap.
Do connect me on timdream@mozilla.com
Hi, we've completed our implementation of this use case and is checking if code from @janjongboom can be reused/applied/integrated somehow. Feature is under testing, code is under review and should be available soon, if you're interested in having a look. Thanks for your contributions.
Great, if you want to sync up with implementation according to proposed spec please drop me a line as well.
last version of gaia autohides the keyboard when you enable desktop shims, see: https://developer.mozilla.org/en-US/Firefox_OS/Using_the_B2G_desktop_client#Generating_a_profile
@woutervddn : Thank you! We will check it out!
@ntlc Is the code for this going to be contributed back? It would be useful for all of FFOS.
@woutervddn: we are using the official gaia (master branch) from mozillaorg: https://git.mozilla.org/releases/gaia. I've just update our code to the newest one from that repo and seem it does not support desktop shims? Btw, if I understand correctly, the link you pointed us is for settings up B2G desktop client, which the hardware keyboard is always available, and the desktop shims will disable software keyboard all the time. If I'm not wrong then that is not what we need. We need to hide software keyboard only if the hardware keyboard is connected!
@janjongboom: That should be :)
When typing, sometimes the on screen keyboard appears at times. Please hide this always.
Hey folk
There is an another way you could resolve this issue.
There is an application call null key board in appstore.
Install it on your android OS and select this key board as the default key board.
SInce null keyboard is selected u will never seea key board when the key board is connected.
My proposal is a small algorithm which as given below. 1) sacan USB 2) IF USB detected. 3) Then assign Null key board as the default keyboard. 4) Else restore to Android default keyboard.
Hope this method helps to resolve this issue.
I am not an expert in Android programming but i can write some basic code. if a programing expert can assist me i will be able to solve this issue.
Cheers Bala Keelapdui
I am sorry for my typo errors
ignore it the best solution i hope!!!
When typing, sometimes the on screen keyboard appears at times. Please hide this always.