Custom Keyboard (twitter/instagram)


#1

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


#2

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


#3

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!


#4

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


#5

Aww, im sorry :smile:


#6

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


#7

Any news…? @tim @perry


#8

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


#9

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.


#10

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


#11

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


#12

hey @tim any updates?


#13

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?


#14

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


#15

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


#16

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)…


#17

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