terrychou / iVim

A vim port to iOS.
598 stars 35 forks source link

Bluetooth Spacebar Not Working #198

Open GregoryShields opened 3 years ago

GregoryShields commented 3 years ago

Opened up my iPad today, loaded iVim, only to find that the spacebar on my Bluetooth keyboard does not work. The software keyboard's spacebar does work though.

The last time I used iVim, the spacebar was working just fine, so this was surprising because I have no memory of having updated to a new TestFlight version. Very odd.

Just to answer the obvious question: yes, the Bluetooth keyboard works in other apps.

GregoryShields commented 3 years ago

Again, there is no other app in which the external keyboard does not work correctly. No ideas on this?

terrychou commented 3 years ago

The code concerning external keyboard has not changed recently. And I have tested myself and couldn't re-produce this issue at my end.

I may suggest that you check whether you are using English language in the software keyboard. Other language set might cause problem.

GregoryShields commented 3 years ago

Thanks for giving your attention to this, Terry.

During a bout of insomnia a couple of nights ago, I began to investigate this and discovered what the culprit was. This might be of interest to others.

A while back I had gone poking around in the Settings app, changing various things. Well, it turns out that there's an option at... Settings->Accessibility->Full Keyboard Access ...which, if you turn it on, activates certain keyboard shortcuts.

For instance, you can bring up a Help menu by pressing Tab H. In fact, many of the shortcuts incorporate the Tab key. In my case the main problem was that the spacebar wasn't working, although I later realized that my Tab key wasn't working either because this option eats Tab key presses.

The app also eats space characters when you press the spacebar. Looking at the Help for this Settings option, you can see a line that says this: To activate: Space

So what this means is that when you press "Space", something is "activated". I'm not even sure what gets activated, but I know that when I turned this option off, suddenly the spacebar worked just fine in iVim.