Skip to content

Instantly share code, notes, and snippets.

@tomgidden
Last active January 15, 2021 16:00
Show Gist options
  • Save tomgidden/0cd7dd3b021b2e030f34 to your computer and use it in GitHub Desktop.
Save tomgidden/0cd7dd3b021b2e030f34 to your computer and use it in GitHub Desktop.
Adafruit Bluefruit LE Micro iOS control for iBooks
To control iBooks, you can activate VoiceOver, mute it (as you don't actually want voice),
select the page progress bar, and then use up/down keyboard buttons.
You can set Settings→General→Accessibility→Accessibility Shortcut = VoiceOver to set
triple-click of Home to (de-)activate VoiceOver.
AT+BLEHIDCONTROLKEY=0x0223 # Sends iOS Home button
AT+BLEHIDCONTROLKEY=0x30 # Sends iOS Power button
AT+BLEHIDCONTROLKEY=0xb8 # Sends iOS Show Keyboard (Eject)
AT+BLEHIDCONTROLKEY=0xb0 # Sends iOS Play
AT+BLEHIDCONTROLKEY=0xb1 # Sends iOS Pause
AT+BLEHIDCONTROLKEY=0xb3 # Sends iOS FFwd / Next
AT+BLEHIDCONTROLKEY=0xb4 # Sends iOS Rewind / Previous
AT+BLEHIDCONTROLKEY=0xe2 # Sends iOS toggle Mute
AT+BLEHIDCONTROLKEY=0x0221 # Sends iOS Search
... or it turns out HOME, PLAYPAUSE, SEARCH, etc. also work
AT+BLEKEYBOARDCODE=00-00-52 # Starts Up
AT+BLEKEYBOARDCODE=00-00-51 # Starts Down
AT+BLEKEYBOARDCODE=00-00-50 # Starts Left
AT+BLEKEYBOARDCODE=00-00-4F # Starts Right
AT+BLEKEYBOARDCODE=00-00-4B # Starts PgUp
AT+BLEKEYBOARDCODE=00-00-4E # Starts PgDn
AT+BLEKEYBOARDCODE=00-00 # Stop
http://www.freebsddiary.org/APC/usb_hid_usages.php
https://learn.adafruit.com/bluefruit-le-micro-atmega32u4-microcontroller-usb-bluetooth-le-in-one/ble-services
I've sent an Enhancement Request to Apple, as there's no reason why iBooks shouldn't
support Keyboard controls out-of-the-box (ie. without Accessibility activated)
Accessibility functions are excessively inaccessible, ironically: you need to do
fiddly stuff to get iBooks in a state where it can be used with Accessibility functions.
Ideally, iBooks would recognise the standard Skip Forward/Back media buttons, but I can
imagine some users would like to control music while reading. Personally, I'd make that
a configurable setting, but that's not really Appleish.
Regardless, no reason why it couldn't accept Keyboard Up/Down/Left/Right or PgUp/PgDn
anyway. It'd be good if it accepted whatever keycodes common wireless presenter remotes
use, as then no hacking would be necessary at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment