"Alternative keymap" enter key with iOS 18
-
How exactly does Flic Universal's "Alternative keymap" work? Has anything about it changed with newer versions of iOS 18?
We program our Flic button for Flic Universal, configured to send the Enter key when clicked. We enable the "Alternative keymap" feature so iOS still shows the on-screen keyboard. It's used with a web application to trigger web page buttons. At some point between iOS 16 and iOS 18.3.2, this stopped working: the web page no longer responds to the Flic button. If we pair a regular Bluetooth keyboard along with the Flic button, then the Flic button works as expected. If we disable Flic's "Alternative keymap" feature, then the Flic button works as expected (but we lose the on-screen keyboard). This leads me to believe that something recently changed in iOS regarding how it handles Flic's "Alternative keymap" feature.
-
@josh-k I see, it indeed seems like capturing keyboard events without having a text field focused has been restricted since iOS 18.
There might be workarounds but I have not tried them personally, but maybe try this:
Set "contenteditable" to "true" on an element, and have the user tap the element to give it focus:
<div id="editor" contenteditable="true">Tap here</div>
-
Thanks for the reply.
The issue is within webpages (so not in the address bar). It also only appears if a text input does not have the focus. (I omitted this detail; I apologize.)
For example: Using https://codepen.io/joshkel/pen/EaxRMgq, I'm seeing the following behavior:
- If I tap the text input element on an iPad, so it has the focus, then I see all keyboard events from a Flic button, as expected.
- If I click the button element on a PC or Mac, so it has the focus, I see keyboard events, as expected.
- If I tap the button element on an iPad, I see keyboard events from (1) a Bluetooth keyboard, (2) a Flic button that does not use "Alternate keymap," and (3) a Flic button that uses "Alternate keymap" if a Bluetooth keyboard is also connected. But I do not see keyboard events from (4) an "Alternate keymap" Flic button with no Bluetooth keyboard connected.
-
Hi!
I tested this on iOS 18.4, and it seems to work. I tested with the "A" and "Return" to type into the address bar of Safari. Both seem to work.
I also tested on:
https://www.toptal.com/developers/keycode(Note that you have to focus the textfield for this to work)
Could you let me know if there is any detail I'm missing in recreating this issue?
Note that it's a good habit to "Forget" the device if you go between different keymaps since this is cached for the Bluetooth device.
-
Looking into this further, it seems that we can't get a Flic Universal with "Alternative keymap" to work at all with iOS 18.3.2, unless a regular Bluetooth keyboard is also attached.