I am working with Movilizer v15 in eclipse neon.
Currently, I am making a quiz, where people need to answer a number of questions with numeric values. But every question now consists of clicking on the answer (attributeType="2") to open the numeric keyboard, followed by answering, closing it again and pressing ok. This get's very tedious after a while.
So my question: Is there a way I can bypass opening the keyboard or having to click twice to move on to the next screen?
You can focus an Answer in the onEnterAssignment of a Question. If that Answer is of attributeType="2" this should open the numeric keyboard of the platform right away. If that keyboard allows "tabbing" forward, you can move from input field to input field. I think on Android the standard keyboard can do that.
focus(answ-desc answer, str clientKey)
Limitations might be
input fields across complex UIs
triggering OK event after the last input field is left
Related
I have an editText that needs to be of the "text" type, but I want that when it gets focus my Android keyboard opens showing the numbers first, instead of the letters that are the default.
I've been researching for a while now, but I can't find an answer. Could anyone tell me if it is possible to do this?
PS: setting my editText to "number" doesn't get me the result I need.
EDIT
I need my keyboard to have this behavior when opening: https://streamable.com/2ohsaz ; that is, the user can type whatever he wants, but the numeric keypad option must appear first
No, there isn't. THe keyboard is a separate app, and it gets to decide what to show. There's an API to provide hints to the keyboard, such as NUMBER to tell it that it should show numbers. But there's no API to tell it to show certain information at certain times. You can try to hack it by setting the input type, but it will be more likely that a keyboard will ignore or be confused by changing input types, because they aren't actually supposed to change until a new field is focused.
Because the keyboard is a separate app that isn't part of the OS and is frequently replaced by OEMs and users, you can't require special advanced behavior like that- the API between the app and the keyboard just isn't set up to allow that, and is mostly guided by conventions and expectation. So any advanced trickery you use will work on some devices, and may totally break others. As such its recommended that other than setting an initial input type, you let the keyboard do what it wants.
I am working on a project in Java using JavaFX. The project is for a Cafe notification system that has a front end for the customers and has a front end for the cooks and I am running a dual display where one display has the user front end and another display for the cooks front end. The problem is that if there are 2 keyboards connected to the raspberry pi, both input will be in the same TextField because you can't select more than one TextField on a single machine.
What I think could work is that the keyboard for cooks is just the number pad and the users have a normal keyboard without a numberpad. So if there was a way to grab input from the numberpad (since they have different key codes then the numbers on the top of a keyboard) and enter text into the cook TextField without the window being in focus, that would solve my issue I just don't know how to go about that. The user input would just be entered normally since it will be focused on the user UI and they can click for different text fields.
Is that method possible? Is there a better method? Or is this whole thing not feasible and I should just switch to 2 separate raspberry pi's? (please see if it is possible before going straight to 2 devices)
For reference the github project is here: https://github.com/thatoneguy43/CafeBuzzerSystem
I'm hoping I didn't leave any important information out, this is my first post here. If you need any more info from me or have any questions ask away.
I'm currently building a small game for Android using LibGdx in Android Studio. In the game the player uses the on-screen keyboard to enter different letters one by one.
My problem is that the autocomplete is one (since I use it when I'm texting) and this forces the player to click the "suggestion box" after every typed letter to actually make sure that the keyboard press and character input is registered. Since the input in my game should be one letter at a time I don't want autocomplete to try to "guess"/create a word.
I'm using the InputProcessor class with the "keyTyped(char character)" function. If I turn of the auto complete in phone settings (manually before starting the game) the input is registered and the correct character is passed in.
So, my question is if there is any way to turn off/toggle autocomplete programmatically?
Thanks in advance!
I realise this is old but if you or anyone else is looking for a way to do this then I have a solution. I built a completely new method for Android soft keyboard input to tackle the issues involved with the current libgdx methods. I am surprised to read auto-complete was actually working for you, because on all my testing devices it does not, and this is one of the problems I have attempted to solve.
I have built a sample project for people to work with that allows for much more reliable input using the Android soft keyboard, this includes swype, auto-correct, dictionary, etc. What you may be interested in is I have also included some customisation for the keyboard, such as the ability to disable auto-complete and suggestions. You would simply customise your TextFieldStyle with;
textFieldStyle.androidKeyboardAutoCorrect = false;
textFieldStyle.androidKeyboardTextSuggestions = false;
As of posting, no one has used this sample project and I have only tested on a few devices, so it may be a little erroneous. I will carry on maintaining it when/if feedback is received.
You can find it on Github here (source and executable apk)
If you have any comments/feedback please refer to Github or the badlogic forum topic
Hope this helps!
Is there a way to make the keyboard appear automatically on its own, without the user having to press the textfield first.
I noticed that if I use textfield.pointerRelased(0, 0) the keyboard shows up but its not functional.
You can give your textfield a focus and fire keyboard open by doing this:
Display.getInstance().editString(textfield, textfield.getMaxSize(), TextArea.ANY, textfield.getText());
There is also some newer way to do this which are slightly simpler and should work with the next plugin update. For the common use case of editing a text field/area once a form is shown use:
myForm.setEditOnShow(textfield);
Just to launch editing use:
textField.startEditing();
Or better yet:
textField.startEditingAsync();
Which is equivalent to wrapping startEditing with a callSerially. That's generally a good practice to workaround some odd platform specific bugs.
Not sure if I'm asking this question on the correct site (I have been wondering if this should rather be posted on the EE.stackoverflow site).
So I have an OLD serial input mouse, and I want the system to reprogram or retranslate it to a keyboard button-press.
The whole thing is that I have software with shortcut keys, but remembering all of them is just not possible. So, why does one want to have a whole keyboard when one can only have a set of three buttons? Using a keyboard, when one presses F11 (and holds it in), it activates the system's mic. While holding in F11, one wants to press F1 to start playing music, thus being a voice over song application.
I've been trying to research the possibility, and I've come to notice that there are a LOT of applications that can convert a USB device, such as a game controller to a keyboard button-press. That's what's driving my concept.
Is this even possible?
Thanks,
Johan Brink
Well, as described here, if you are using Windows, you can use X-Mouse Button Control for mouse. If you want to use gamepad, try J2K - A Joystick to Keyboard Mapper 1.1
Have a look on Makey Makey (www.makeymakey.com). This is a board which emulates a key stroke each time one of his input is closed.