Call keyboard on Event and send to Stream - flutter

I have a complex design for a text input field and its impossible to apply so many styles and effects on it. So i was thinking about to call (show/hide) the keyboard on a click event and send input data to a Stream and then display it with Text(). But i have no idea if it is possible to do it?
The problem is how to call a keyboard on gesturedetector. Do you have any ideas?
Thanks

Related

Is it possible to send arbitrary event values ​to a webview?

In Flutter, I want to create a button on top of a webview, and when that button is pressed, a keyboard event will be sent inside the webview.
There is a property value called javascriptChannels, but it seems that it can only receive signals and cannot send them.
Is there any way to handle this?

Trigger keyboard show-up Flutter

I know most of the people have problems with keyboard and want it to go away, but I'm interested in it showing up. Basically, I want to trigger the keyboard show-up when I tap an element and then get the text I typed via RawKeyboard. Is there a way I can trigger the keyboard to show in Flutter? So far I understood you can do that only when you have a TextField.
Many thanks.

Telling when the user has finished entering text in a GtkComboBoxText

I've created a GtkComboBoxText using gtk_combo_box_text_new_with_entry. When I type into it, the "changed" callback is called for every letter.
How can I tell when the user has finished their entry?
I'd be happy to require the user to press 'Enter' at the end, but that doesn't call the callback.
(I'm using GTK+2.)
(Stackoverflow suggested another Q&A which put me on the path to enlightenment. I hadn't seen it while searching before I wrote my Q.)
It boils down to
g_signal_connect(gtk_bin_get_child(GTK_BIN(cb))/*entry*/, "activate", G_CALLBACK(entryActivated), NULL); where cb is the GtkComboBoxText (GtkWidget*). The callback is called when 'Enter' is pressed.
Pressing enter in a GtkComboBoxText that has an entry causes the child GtkEntry to emit the activate signal.
If the GtkComboBoxText contains an entry (via the 'has-entry' property), its contents can be retrieved using gtk_combo_box_text_get_active_text(). The entry itself can be accessed by calling gtk_bin_get_child() on the combo box.
https://developer.gnome.org/gtk2/stable/GtkEntry.html#GtkEntry-activate
The combo box might be considered as part of a form that has its own apply button.
You can also connect to GtkWidget signals. I can't say which event but there is one that is emitted when a widget loses keyboard focus to another widget in the same window. This would allow save on tab out. This is distinct from the window losing focus to another window which is a signal emitted on the GtkWindow. As the widget that has focus in the window does not change when a window loses focus.

How to hide the keyboard without using resignFirstResponder in iPhone?

I want to do this because I tried to receive data by using textField via BLE. But the keyboard of the iOS always shows up when the textField becomeFirstResponder. So, is there any way to dismiss the keyboard for ever?
There is not way. I think your best option is don't use a textField. If you need to show any text you can use a label.
Anyway I really don't understand what you mean with "I tried to receive data by using textField via BLE"

fill UIWebVIew TextInput with custom keyboard

For an app I am working on I want a custom keyboard to come up when you tap on an input field in a UIWebview, for example for UITextView i use this code :
myText.text = [myText.text stringByAppendingString:#"a"];
but i don't know how can i fill a text field in UIWebVIew
Any help would be very much appreciated; thanks!
I don't think it's possible to use a custom keyboard for a text field within a UIWebView.
There is bidirectional communication with the UIWebView, but it is a little convoluted.
You can use stringByEvaluatingJavaScriptFromString to execute any javascript in the context of the web page. That can be used to send data to the web page, modify forms, or poll for data and events.
You can use webView:shouldStartLoadWithRequest:navigationType: to receive notifications from the web view. Define a custom scheme like myapp: and handle all such requests returning NO from shouldStart. You can use ajax style calls to trigger the notifications, although the actual ajax call will always fail because you are returning NO.
If you want to have a custom keyboard show up, you must send a notification to the host application via your custom scheme, display a UITextView over the web view, then send the results back via javascript.
At least, that is the documented way to do it.
Check dcorbatta's answer in this article Custom Keyboard in UIWebView
He suggest to use a UITextField as a "media" when you detect keyboard coming up inside a UIWebView. Thus, you can use whatever Keyboard type you want on the UITextField. After users taps something, copy the text in UITextField the media via JavaScript ActiveDocument.
I spent too much time investigating that.
Blur the text inputs using JavaScript or jQuery.
Use on screen keyboard like any UIjquery plugin
Now you have to take a look at this nice keyboard and learn how to integrate it into you web pages.
http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-keyboard-with-css-and-jquery/
One limitation.
It works only for your pages unless you hijack the page when it is done loading and attaché your keyboard and blur all text inputs when they get highlighted or focused.