title: How to activate keyboard with button?
body: <p>I'm new with this.
  I'm doing android (in future also and iOS) application with Phonegap. I would like that my keyboard opens when I tap on some button and closes also with button. I add ionic keyboard plug from <a href="https://github.com/driftyco/ionic-plugins-keyboard" rel="nofollow">https://github.com/driftyco/ionic-plugins-keyboard</a> and button in html:</p>
  
  <pre><code>&lt;div class="button"&gt;
               &lt;button id="open_keyb"&gt;Click Me!&lt;/button&gt;
           &lt;/div&gt;
  </code></pre>
  
  <p>and javascript :</p>
  
  <pre><code>var app = {
      // Application Constructor
      initialize: function() {
          this.bindEvents();
      },
      // Bind Event Listeners
      //
      // Bind any events that are required on startup. Common events are:
      // 'load', 'deviceready', 'offline', and 'online'.
      bindEvents: function() {
          document.addEventListener('deviceready', this.onDeviceReady, false);
      },
      // deviceready Event Handler
      //
      // The scope of 'this' is the event. In order to call the 'receivedEvent'
      // function, we must explicitly call 'app.receivedEvent(...);'
      onDeviceReady: function() {
          app.receivedEvent('deviceready');
          alert(1);
          cordova.plugins.Keyboard.show();
      },
      // Update DOM on a Received Event
      receivedEvent: function(id) {
          var parentElement = document.getElementById(id);
          var listeningElement = parentElement.querySelector('.listening');
          var receivedElement = parentElement.querySelector('.received');
  
          listeningElement.setAttribute('style', 'display:none;');
          receivedElement.setAttribute('style', 'display:block;');
  
          console.log('Received Event: ' + id);
      }
  };
  
    app.run(function($ionicPlatform) {
      $ionicPlatform.ready(function() {
          if(window.cordova){
              cordova.plugins &amp;&amp; cordova.plugins.Keyboard &amp;&amp; cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
          }
          alert('test');
      });
  });
  
  app.directive('input', function($timeout){
      return {
          restrict: 'E',
          scope: {
              'returnClose': '=',
              'onReturn': '&amp;',
              'onFocus': '&amp;',
              'onBlur': '&amp;'
          },
          link: function(scope, element, attr){
              element.bind('focus', function(e){
                  if(scope.onFocus){
                      $timeout(function(){
                          scope.onFocus();
                      });
                  }
              });
              element.bind('blur', function(e){
                  if(scope.onBlur){
                      $timeout(function(){
                          scope.onBlur();
                      });
                  }
              });
              element.bind('keydown', function(e){
                  if(e.which == 13){
                      if(scope.returnClose) element[0].blur();
                      if(scope.onReturn){
                          $timeout(function(){
                              scope.onReturn();
                          });
                      }
                  }
              });
          }
      }
  });
   .run(function($ionicPlatform) {
    $ionicPlatform.ready(function() {
      // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
      // for form inputs)
      if(window.cordova &amp;&amp; window.cordova.plugins.Keyboard) {
        cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      }
      if(window.StatusBar) {
        // org.apache.cordova.statusbar required
        StatusBar.styleDefault();
      }
      ionic.Platform.isFullScreen = true;
    });
  })
  
  var fn = function() {
  
      alert('test');
      document.getElementById('one').onclick = function() {
          alert('click');
          cordova.plugins.Keyboard.show();
      };
  
  };
  
  document.addEventListener('DOMContentLoaded', fn, false);
  </code></pre>
  
  <p>in www folder.
  And this is not working. This alerts aren't showing also. Can you help me? How to make this working?</p>