tag:support.easybooksapp.com,2011-04-05:/discussions/suggestions/20-data-entry-using-a-keyboardEasy Books: Discussion 2018-10-18T20:07:59Ztag:support.easybooksapp.com,2011-04-05:Comment/80173932011-06-20T12:16:19Z2011-06-20T12:16:19ZData Entry - Using a Keyboard<div><p>Hi Anthony,</p>
<p>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...</p>
<p>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).</p>
<p>As soon as I have access to the hardware keyboard, I will update
the app to include the feature.</p>
<p>All the best,</p>
<p>Mathew</p>
<p>---------- Forwarded message ---------- From: Apple Developer
Technical Support<br>
Date: 16 November 2010 22:00<br>
Subject: Re: Bluetooth keyboard events when connected to an iOS
device?<br>
To: Mathew Waters</p>
<p>Hi Mathew,</p>
<p>Thank you for your inquiry to Apple Worldwide Developer
Technical Support.</p>
<p>Currently, via public interfaces, it's only possible to see the
unicode characters<br>
sent by hardware (and software) keyboards to text receivers, like
text fields or views.<br>
There are no publicly accessible keyboard events in iOS at this
time (although it's<br>
a common request, and I recommend filing a bug for this at <a href=
"http://developer.apple.com/bugreporter">http://developer.apple.com/bugreporter</a><br>
to add your voice to the number of developers requesting this).</p>
<p>One common "trick" work-around that works in some scenarios is
to create an off-screen<br>
UITextField and via delegate methods, check the user entered text
and interpret the text as<br>
keypresses as needed. In your case, this is tricky, since you only
want this to happen with<br>
the HW keyboard (else just setting the hidden textfield to
firstResponder might pop up the<br>
software keyboard if the HW keyboard is not connected).
Unfortunately, I don't know of<br>
a reliable way to detect if the HW keyboard has been
connected/disconnected.</p>
<p>Daniel Yu</p>
<h2>DTS Engineer, Apple Worldwide Developer Relations</h2>
<p>Name: Mathew Waters<br>
Company: Geode Software Ltd</p>
<p>DESCRIPTION OF PROBLEM<br>
Part of our app (Easy Books) contains a calculator, which is made
up of lots<br>
of UIButtons. Each button is a corresponding digit or operator on
the<br>
calculator, so "1", "2"... "9", "+" and so on. There is a simple
UITextLabel<br>
above to show the current value. I would like to add better support
for my<br>
user with a bluetooth keyboard. (There may only be one user with
this<br>
issue!). The problem is that I've searched for hours and can't find
how I<br>
could receive messages or notifications about which keyboard key
has been<br>
pressed. I know its all working fine for screens that contain
UITextField,<br>
but I have a custom calculator that doesn't show the on-screen
keyboard.</p>
<p>I have tried a few things like subclassing UIApplication and
handling the<br>
sendEvent message, but the type is set to -1 for a hardware
keyboard event<br>
(that is according to the simulator's hardware keyboard).</p>
<p>Under conditions where the on-screen keyboard would not be
shown, could I<br>
still receive a key event from a connected hardware keyboard?</p>
<p>Thanks in advance!<br>
...</p></div>Admintag:support.easybooksapp.com,2011-04-05:Comment/80173932013-06-21T07:16:49Z2013-06-21T07:16:49ZData Entry - Using a Keyboard<div><p>Hi Anthony,</p>
<p>Just to update you about this discussion:</p>
<p>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.</p>
<p>Mathew</p></div>Admintag:support.easybooksapp.com,2011-04-05:Comment/80173932013-07-29T18:42:31Z2013-07-29T18:42:31ZData Entry - Using a Keyboard<div><p>Hi Mathew</p>
<p>Will this enhancement be available when iOS 7 is out?</p>
<p>Kind regards</p>
<p>Sent from my iPhone</p></div>Anthony Burmantag:support.easybooksapp.com,2011-04-05:Comment/80173932013-07-30T01:06:10Z2013-07-30T01:06:10ZData Entry - Using a Keyboard<div><p>That's right, only when your device is running iOS 7.</p></div>Marktag:support.easybooksapp.com,2011-04-05:Comment/80173932013-07-30T01:12:56Z2013-07-30T01:12:56ZData Entry - Using a Keyboard<div><p>Cool thanks, do you know if the current Beta version of iOS7
stable?</p>
<p>Sent from my iPhone</p></div>Anthony Burmantag:support.easybooksapp.com,2011-04-05:Comment/80173932013-07-30T01:37:01Z2013-07-30T01:37:01ZData Entry - Using a Keyboard<div><p>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.</p>
<p>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.</p></div>Mark