Data Entry - Using a Keyboard

Anthony Burman's Avatar

Anthony Burman

19 Jun, 2011 05:22 AM

Hi Matthew

I am currently using EasyBooks using an iPad, Keyboard Dock and Magic Mouse. everything works fine except entering numerical data. As the values require loading via the built in calculator rather than keyboard i cannot use my Keyboard Dock to enter the amounts when preparing transactions.

Is there a possibility in the near future to allow users to elect to use keyboard functions for transaction amounts (perhaps under the settings module).

Kind regards

Anthony

  1. Support Staff 1 Posted by Admin on 20 Jun, 2011 12:16 PM

    Admin's Avatar

    Hi Anthony,

    I've been in touch with Apple about this issue as it has been reported once before. I'll attach the emails I sent and received to this post, but if you just want a quick summary it's this...

    The calculator uses a custom keypad that relies on taps of its buttons to feed in the digits into the calculator screen. If I could intercept the key presses of the hardware keyboard, I could treat them the same as if someone had just tapped the on-screen button. But there isn't an API available to detect the key presses, as the Apple engineer confirmed (below).

    As soon as I have access to the hardware keyboard, I will update the app to include the feature.

    All the best,

    Mathew

    ---------- Forwarded message ---------- From: Apple Developer Technical Support
    Date: 16 November 2010 22:00
    Subject: Re: Bluetooth keyboard events when connected to an iOS device?
    To: Mathew Waters

    Hi Mathew,

    Thank you for your inquiry to Apple Worldwide Developer Technical Support.

    Currently, via public interfaces, it's only possible to see the unicode characters
    sent by hardware (and software) keyboards to text receivers, like text fields or views.
    There are no publicly accessible keyboard events in iOS at this time (although it's
    a common request, and I recommend filing a bug for this at http://developer.apple.com/bugreporter
    to add your voice to the number of developers requesting this).

    One common "trick" work-around that works in some scenarios is to create an off-screen
    UITextField and via delegate methods, check the user entered text and interpret the text as
    keypresses as needed. In your case, this is tricky, since you only want this to happen with
    the HW keyboard (else just setting the hidden textfield to firstResponder might pop up the
    software keyboard if the HW keyboard is not connected). Unfortunately, I don't know of
    a reliable way to detect if the HW keyboard has been connected/disconnected.

    Daniel Yu

    DTS Engineer, Apple Worldwide Developer Relations

    Name: Mathew Waters
    Company: Geode Software Ltd

    DESCRIPTION OF PROBLEM
    Part of our app (Easy Books) contains a calculator, which is made up of lots
    of UIButtons. Each button is a corresponding digit or operator on the
    calculator, so "1", "2"... "9", "+" and so on. There is a simple UITextLabel
    above to show the current value. I would like to add better support for my
    user with a bluetooth keyboard. (There may only be one user with this
    issue!). The problem is that I've searched for hours and can't find how I
    could receive messages or notifications about which keyboard key has been
    pressed. I know its all working fine for screens that contain UITextField,
    but I have a custom calculator that doesn't show the on-screen keyboard.

    I have tried a few things like subclassing UIApplication and handling the
    sendEvent message, but the type is set to -1 for a hardware keyboard event
    (that is according to the simulator's hardware keyboard).

    Under conditions where the on-screen keyboard would not be shown, could I
    still receive a key event from a connected hardware keyboard?

    Thanks in advance!
    ...

  2. Admin closed this discussion on 20 Jun, 2011 12:16 PM.

  3. Admin re-opened this discussion on 21 Jun, 2013 07:16 AM

  4. Support Staff 2 Posted by Admin on 21 Jun, 2013 07:16 AM

    Admin's Avatar

    Hi Anthony,

    Just to update you about this discussion:

    I know its been a couple of years but Apple are finally adding an API that gives access to hardware keyboards on iOS. This means when iOS 7 is available, I will be supporting a bluetooth keyboard on Easy Books.

    Mathew

  5. 3 Posted by Anthony Burman on 29 Jul, 2013 06:42 PM

    Anthony Burman's Avatar

    Hi Mathew

    Will this enhancement be available when iOS 7 is out?

    Kind regards

    Sent from my iPhone

  6. Support Staff 4 Posted by Mark on 30 Jul, 2013 01:06 AM

    Mark's Avatar

    That's right, only when your device is running iOS 7.

  7. Mark closed this discussion on 30 Jul, 2013 01:06 AM.

  8. Anthony Burman re-opened this discussion on 30 Jul, 2013 01:12 AM

  9. 5 Posted by Anthony Burman on 30 Jul, 2013 01:12 AM

    Anthony Burman's Avatar

    Cool thanks, do you know if the current Beta version of iOS7 stable?

    Sent from my iPhone

  10. Support Staff 6 Posted by Mark on 30 Jul, 2013 01:37 AM

    Mark's Avatar

    I wouldn't advise running the beta unless you're developing apps and don't mind a lot of them not working properly. There's such a lot about iOS 7 that differs from iOS 6 and I'd advise waiting until the public launch which we think will be around October time.

    For Easy Books at least, there isn't an advantage to running it on iOS 7 as the keyboard support will only be added when the app is updated for iOS 7 around the same time as the OS becomes available to the public.

  11. Admin closed this discussion on 08 Aug, 2013 10:53 PM.

Discussions are closed to public comments.
If you need help with Easy Books please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac