PDA

View Full Version : Want to switch keyboard type after first character is entered




beachdog
Nov 4, 2008, 10:00 AM
I have a need to present a keyboard for an input field, into which the user may either type a name or a phone number. I won't know which until they start typing. I was thinking it would be nice if I present the alphabetic keyboard, but then if they switch it to numbers and enter a digit as the first character, I would want to change it to the phone number pad. I have found that it is somewhat difficult to add a phone number thru the number pad, so it would be nice to switch. I know how to get a notification that a digit was entered, but is there an API to programmatically/dynamically change the keyboard type.



ArtOfWarfare
Nov 4, 2008, 10:37 AM
I'm not sure about how to actually do this however it sounds like something that would end up confusing the user. Having the keyboard switch while you're typing would either confuse or frustrate the user.

Imagine if you were typing on a computer, every time you enter a letter, the keyboard suddenly rearranged itself so that the key you most likely want is on the top row. You can throw the concept of being able to touch type right out the window I think. Users don't want their input devise to change on them while they're still filling in the same data field.

If you really wanted the keyboard to switch, you might offer a button that appears above the keyboard to allow them to switch between the alphanumeric and the number keypad (don't ask me how... I'd probably have a hidden button that gets revealed when the keyboard is invoked.)

jnic
Nov 4, 2008, 11:11 AM
Further to ArtOfWarfare's post; what if the user wants to enter a name containing numbers? Not everyone using your application will be a native English speaker.

To give a concrete example, a user writing in Arabic using an English alphabet might wish to include numbers for a name input. See http://en.wikipedia.org/wiki/Arabic_chat_alphabet for instance.

Likely there are many scenarios with other languages where forcing the user over to numeric input might be counterproductive.

beachdog
Nov 5, 2008, 07:46 AM
Yeah, I don't disagree with your usability comments...its just that what I have right now has usability issues either. The user is either going to enter a phone number, or a contact name from their address book. I can't put up the phone number keyboard, since that would prevent them from entering a contact; and the numbers and punctuation keyboard is really not that easy to use for entering a phone number (keys are small and thus tend to increase error rate)