Titanium: Disable keyboard to use a custom numberpad - titanium

I am trying to use a custom number pad with a textfield to take advantage of blur and focus. But, how to disable the keyboard permanently on ios. Everything I tried does not work.
"Textfield": {
keyboardVisible: false
}

Well, i don't think there is a way to disable keyboard on textfield, but if you can call your custom keyboard on a onClick event, maybe you can use a label instead of textfield and open your keyboard on click.
I know that isn't a optimal solution but maybe it is useful.
Another way to solve this problem is open directly a default pad number with attribute keyboardType : Ti.UI.KEYBOARD_DECIMAL_PAD and use Keyboard Toolbar.
I hope this is helpful.

This is currently not possible in Titanium, but it seems achievable on iOS:
https://stackoverflow.com/a/16467767/4626813
You might want to do a Feature Request Appcelerator JIRA. Check if it has already been requested before you create a new ticket. Refer to this question and also link back to the ticket here so that others can watch it with you.

Related

How to hide a keypad for IOS in Titanium without using 'blur'

Can anyone please let me know how to hide the keypad without using 'blur' in titanium for IOS.
My scenario is I have a textfield, When I scan an item, that value will be shown on textfield. When textfield is focused, the scanner will be activated. In this scenario i need to focus the textfield, but should not show the keypad.
Can any one please share your ideas.
Thanks,
Swathi.
There is no possibility to hide keypad when textfield is focused on iOS. It is a system thing.
I think your approach is wrong. Why do you need textfield if you don't want to type text there?
Instead of it:
- create label (or label inside view) with proper background (looking like textfield),
- add 'click' event which will start scanning (i suppose you have that functionality for 'focus' event),
- if you need cursor blinking than create animation next to label.

Automatically scroll the view up when keyboard is shown in react-native

How can I automatically scroll the view up when I focus in a TextInput box and a keyboard is shown such that the TextInput box is not hidden behind the keyboard?
This question has been asked on StackOverflow a few times and I implemented the solution here which is the general solution advised in most of the answers. This solution works fine in the iPhone simulator but doesn't work on the actual phone. Has anyone else experienced this problem that the solution doesn't work on the actual phone?
Second thing that I noticed after adding this solution is that now if I am focussing in a TextInput box and keyboard is shown, if I press a button or try to focus into a different TextInput box, the first touch is always consumed to hide the keyboard and the button is not pressed or the other TextInput box is not focussed. It is a little annoying for the user to have to do the operation twice. Has anyone else observed this problem?
Please let me know if you have any inputs on how to solve these problems?
I assume you are using this solution. I ran into the same problem and made some adjustments (see gist). I addressed both problems you describe. keyboardShouldPersistTaps solves your second problem.
I have not found the exact reason why the spacing works in Simulator but not on a real device. It has something to do with the timing. The original code sets a timeout on input focus and tries to scroll down after 50ms. Increasing this to for example 500ms makes it work on devices too, but I don't really like adding magic timeouts that I don't understand. I changed it, so onFocus I look up the element to scroll to and store a reference. When onKeyboardDidShow fires I use the reference.

Bringing up the iPad keyboard which is predominantly symbols

Apologies in advance if this is answered but I genuinely couldn't find it. I'm trying to bring up the keyboard type on iPad which appears when pressing the "#+=" button. I've tried going through all the types on the docs and I'm sure that this wasn't successful. Am I missing something or does the user have to click this button every time?
Edit: this question was closed as "off-topic" because it didn't include code or ideas or what I've tried already... Therefore for a bit of extra detail, I used EVERY keyboard type that is available on the docs e.g.
theTextField.keyboardType = UIKeyboardTypeNumberPad;
This did not yield the results that I require, which is the keyboard plane that appears when you press the #+= button because I wanted users to go straight to that one.
Unfortunately, this is impossible. It's not a keyboard type you want, it's a keyboard plane. There is no public API to switch or in any way access the keyboard planes.
One solution could be to create your own keyboard with the symbols you want. Another solution would be to open the keyboard and then generate a touch event that will switch the keyboard plane. However, this would be complicated, non-portable and a bit dangerous.
You have no ability to affect the built-in keyboards.
You can however create your own custom input view which you would set on the inputView of your text editing view before you make it first responder. Then iOS will show this view instead.
Have a look at this project of mine which implemented a "Morse keyboard" (April Fool's joke), but demonstrates how to achieve a custom keyboard that still interacts with a text field as you'd expect. http://www.cocoanetics.com/2012/04/dtmorsekeyboard-tutorial/

Imitating keyboard delete key with a button

I am using a UIWebView for text and emoticon/smiley display in my app. I can input and delete the text and emoticons using the keyboard, but I want to have a button in the UI which will do the same thing. How can I imitate the keyboard delete functionality with my own button?
My guess would be that you have to set up some sort of communication between the native app and the webview so that you can pass certain events to be handled accordingly. Check out the post here NSString in UIWebview that might shed some light on how you can solve your problem.

ios custom keyboard

Is it possible to change what each key does? I have a client application and the way it needs to work is that each key press is a command to send over the network. I do not need my keyboard to produce letters (the server will do this) when pressed but commands to the server. Currently I have this working by making a custom view that looks like a keyboard however it would look better if it was the ios default keyboard.
Of course I dont expect the code but I need a starting point. My current google searching hasnt gone to good. Maybe a link to an example or some documentation on how to do it.
notes: you will see the first answer below makes a good suggestion but it brings up another point. my keyboard needs to mask the keyboard of the server, so no .com button or any other out of the ordinary keys, so I would also need to edit the layout I guess.
Create a text field with a custom delegate, hide it and set it as the first responder. Then you can hook into the delegate methods to work out what was pressed.