Giter Club home page Giter Club logo

cordova-custom-keyboard's Introduction

Custom Keyboards For iOS

Description

This plugin for open any native iOS keyboard in cordova app.

There is no way to completely replace original keyboard. :-( Under hood this plugin just create invisible native input and open keyboard for it. You just get callback when text changed.

Installation

cordova plugin add https://github.com/mnill/cordova-custom-keyboard

Methods

  • CustomKeyboard.open(startedValue, keyboardType, changedCb, finishedCb);
  • CustomKeyboard.change(newValue);

Description.

Our plugin creating invisible textview and you need to call 'change' if you want to correct user input;

Available keyboards:

1 = UIKeyboardTypeDefault;
2 = UIKeyboardTypeASCIICapable;
3 = UIKeyboardTypeNumbersAndPunctuation;
4 = UIKeyboardTypeURL;
5 = UIKeyboardTypeNumberPad;
6 = UIKeyboardTypePhonePad;
7 = UIKeyboardTypeNamePhonePad;
8 = UIKeyboardTypeEmailAddress;
9 = UIKeyboardTypeDecimalPad;
10 = UIKeyboardTypeTwitter;
11 = UIKeyboardTypeWebSearch;

Quick Example

document.getElementById('decimal').onclick = function() {
  CustomKeyboard.open(document.getElementById('decimal').value, 9, function (value) {
    //fired every time when value changed
      document.getElementById('decimal').value = value;
    }, function (value) {
      alert('Editing ended with ' + value);
      fired once when user finished editing.
    })
}

Supported Platforms

  • iOS

License

MIT

cordova-custom-keyboard's People

Contributors

mnill avatar

Watchers

 avatar  avatar

cordova-custom-keyboard's Issues

Only seems to work the first time

Perhaps I'm doing something wrong, but I can only seem to get the keyboard to appear once. Tapping the input field again makes it disappear.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.