question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use a "Hardware" keyboard on an ion-input (iOS simulator)

See original GitHub issue

Ionic version: (check one with “x”) [ ] 1.x [x] 2.x

I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request

Current behavior: I am unable to utilise the “hardware” keyboard when deploying to the iOS simulator which uses an ion-input (in this instance, the hardware is the MacBook’s keyboard).

I gather this may well be related to the ionic-plugin-keyboard plugin.

If I uncheck this so the simulator is forced to use the software keyboard, I can focus and type, but this is somewhat painstaking. 🙂

But when I attempt to set focus by clicking, focus is immediately lost and I am unable to type.

Expected behavior: To be able to use the hardware keyboard, and type without the ion-input losing focus.

Steps to reproduce:

  1. Generate an Ionic v2 project: ionic start -t blank -v IonInputTest && cd IonInputTest
  2. Run the project on an iOS simulator: ionic emulate
  3. Ensure the hardware keyboard is connected: Hardware | Keyboard | Connect Hardware Keyboard.

Related code: I added this to the bottom of home.page in the Ionic 2 blank starter app:

<ion-list>
  <ion-item>
    <ion-input></ion-input>
  </ion-item>
</ion-list>

Other information: The input seems to momentarily focus - since if I hammer the mouse/keyboard then I can type a letter or two.

Ion Input issue

Ionic info:

Cordova CLI: 6.5.0 
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v6.9.4
Xcode version: Xcode 8.2.1 Build version 8C1002

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

16reactions
kelvindartcommented, Aug 30, 2017

Omg - after nearly a year of pain and misery pressing each individual key on the iOS simulator, I have found out my issue related to this bug!

The issue was related to Hardware | Keyboard | Toggle Software Keyboard (⌘ + K) - my guess it was disabled. Weirdly, this isn’t an issue in a Cordova, non-Ionic app. If you have Connect Hardware Keyboard disabled, the issue persists.

There is a bug in the simulator menu since it does not show a tick next to the option, so you have no way of knowing whether it’s enabled/disabled (it also appears disabled in the menu in some instances, unsure why). However, after enabling it via ⌘ + K, it became enabled - still no tick, but I can type!

Keyboard menu

3reactions
kelvindartcommented, Feb 1, 2017

For me it works fine on physical devices. Just not the simulator…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to use a "Hardware" keyboard on an ion-input (iOS ...
I am unable to utilise the "hardware" keyboard when deploying to the iOS simulator which uses an ion-input (in this instance, the hardware...
Read more >
Hardware keyboard not working in simulator (toggle in on)
I cannot use my keyboard to type in the simulator. The toggle is on. I also cant make the inputs active when I...
Read more >
iOS Keyboard not working - ionic-v3
It can fix various iOS issues including iOS keyboard not working. Hope this is helpful for you!
Read more >
Ionic2 ion-input not working on iOS Simulator - Stack Overflow
I insisted that they need to toggle the Software Keyboard, disconnect the Hardware Keyboard. They keep saying that I need to fix the...
Read more >
Physical Keyboard Not Working For iOS Simulator on 16.10.4
This appears to be broken and there are no way in the Settings panel to enable the physical keyboard. The virtual keyboard works...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found