• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Capturing raw soft keyboard input on iOS

Contributor ,
Feb 03, 2016 Feb 03, 2016

Copy link to clipboard

Copied

I've followed the Adobe devnet article on capturing soft keyboard input but it doesn't work on iOS 9.2.

article: Capturing soft key input | Adobe Developer Connection

Setup: AIR 20.0.0.233 overlaid on Adobe Flex 4.6, targeting iOS SDK 9.2.

I'm controlling a TextInput instance. Setting the focus to it successfully brings up the soft keyboard. However, the only way I'm able to grab any input from the soft keyboard is by attaching a TextOperationEvent.CHANGE listener to the TextInput instance. KeyboardEvent.KEY_DOWN does not trigger. I've tried attaching a KeyboardEvent.KEY_DOWN listener to the instance, to the stage, and to NativeApplication.nativeApplication, and all fail.

Using TextOperationEvent.CHANGE works somewhat, but I can't perform capture of keycodes (e.g. Keyboard.UP), which is what I really need.

What's the proper, working way to capture soft keyboard key codes on iOS?

TOPICS
Performance issues

Views

890

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 09, 2016 Feb 09, 2016

Copy link to clipboard

Copied

Hi ,

I'm trying to reproduce this issue. Meanwhile, can you give me some additional information, to narrow it down ?

1. Have you tried this with any other AIR build.

2. Are you facing this only with iOS 9.2, or with other iOS versions too ?

-Tushar,

Adobe AIR team

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 09, 2016 Feb 09, 2016

Copy link to clipboard

Copied

The problem occurs in AIR 19.0.0.241, AIR 20.0.0.233, and AIR21.0.0.128 overlaid on Adobe Flex 4.6.0, on both iOS 9.2.1 and Android 6.0.1.

These are the listener methods I've tried. Only one (marked) works:

// This works, but can't capture key codes:

_myTextInputInstance.addEventListener(TextOperationEvent.CHANGE, onTextInputChange);


// These three attempts fail:

_myTextInputInstance.addEventListener(KeyboardEvent.KEY_DOWN, onTextInputKeyDown);

NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN,onNativeApplicationKeyDown);

this.stage.addEventListener(KeyboardEvent.KEY_DOWN, onStageKeyDown);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 09, 2016 Feb 09, 2016

Copy link to clipboard

Copied

Hi,

1. Are you using some specific skinClass for the text inputs ?

<s:TextInput skinClass="some.skinClass.mobile.TextInputSkin"/>

<s:TextArea skinClass="some.skinClass.mobile.TextAreaSkin"/>

Not all of them support KEY_UP or KEY_DOWN events.

Moreover, when the user interacts with the default soft keyboard for the TextInput and TextArea controls, the keyUp and keyDown events are dispatched only for a small subset of keys.

Reference : http://help.adobe.com/en_US/flex/mobileapps/WS82181550ec4a666a39bafe0312d9a274c00-8000.html

It would be great if you could provide us with a sample project in which you are able to reproduce this issue, so that we may know exactly what is troubling you.


-Tushar

Adobe AIR team

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 22, 2016 Feb 22, 2016

Copy link to clipboard

Copied

LATEST

The skin for the target TextInput instance is spark.skins.mobile.StageTextInputSkin.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines