Custom Keyboard (twitter/instagram)

Hi everyone,

I’m building an app where I need to have the “hashtag” key accessible directly when the keyboard is open (think twitter or instagram). I know that - in objectiveC - it’s something along the line of UIKeyboardTypeTwitter

Is there any way to have this exact behavior with ionic keyboard?

Thanks in advance to all of you

3 Likes

<input type="tel"/> should help.

You had me so excited I almost asked you to marry me, then I realized that input tel means number instead of actual text.

What I need is exactly this : http://farm8.staticflickr.com/7175/6442306651_c9520d6c5e.jpg

paging the great @perry and @adam on that one!

It’s a good question. @tim has been chewing over some ideas lately.

Aww, im sorry :smile:

Can’t wait to hear @tim ideas! Could really use help here…

Any news…? @tim @perry

I asked a very similar question and would love to know the answer too as well. :smile:

1 Like

Hey all I’ll be looking into this very soon, the last time I checked (pre iOS 8) it wasn’t possible because the UIWebView wouldn’t respond to the keyboardType selector, but maybe things have changed.

2 Likes

Also Ill be interested in knowing how to change the GO button to Next. When you have a large form you want to go to the next field, not press submit. Right now the Alphanumeric keyboard by default show GO when what is needed is Next

Thanks

Hey @tim, thanks for the answer, please keep us updated!

hey @tim any updates?

Hey sorry for the delay, I haven’t had time to look at this yet, but I’ll post back when I do.

If anyone wants to try their hand at hacking the plugin, take a look at https://github.com/driftyco/ionic-plugins-keyboard/blob/master/src/ios/UIWebViewExtension.m and maybe read up on swizzling (great name :blush:) http://nshipster.com/method-swizzling/.

I am by no means an expert myself, but the way I understand it is UIWebView does not fully support the UITextInputTraits protocol (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInputTraits_Protocol/). For example, I got UIKeyboardAppearance working to turn on the dark keyboard (if you uncomment the code in the source file above you can use it), but was unable to get keyboardType to work. Maybe WKWebView is different?

@tim thanks for the update! Looking forward to future posts.

@tim any updates related to this? changing the keyboard would be really awesome :smile:

Hey Tim, a follow up question: how would you actually implement this in the appdelegate.m file? For example, instead of what you might normally do:

[[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceDark];

How do you reference the extension created by uncommenting?

Thanks (obj c noob here)…

Any news on this? I for one would love it!