applidium / Vim

Port of the Vim text editor to the iOS
https://applidium.com/en
533 stars 100 forks source link

Keyboard Non-Functional unless powered off and on #11

Closed fncll closed 6 years ago

fncll commented 12 years ago

I am using a Kensington KeyFolio Pro keyboard and it is having issues with Vim for iPad. In particular, when I launch Vim, I often can't use the keyboard at all, can't get to the command mode or insert mode, etc. Just nothing. Most of the time if I am turn the keyboard off, wait for the on-screen keyboard to appear, then dismiss it and turn the keyboard back on, it works. But sometime even that doesn't do it and I end up having to turn off bluetooth and do much the same thing.

I don't experience any problems with this keyboard in any other app, including many 3rd party applications.

Ecco commented 12 years ago

That's odd. As you can see if you browse the source code, Vim/iOS uses quite a different pattern as compared to all other iOS apps because Vim insists on maintaining its own event loop. So I'm not so surprised to see an issue occuring only in Vim. It doesn't mean that it's Vim fault though :-)

Long story short : would you mind testing this with an Apple bluetooth keyboard or an official iPad keyboard/dock ? Thanks a lot !

fncll commented 12 years ago

I'll track one down and let you know. I hope I can figure it out-- I've logged hundreds of thousands of words on this thing and I'd hate to switch. Or maybe it's an excuse to buy another folio style keyboard :)

At any rate, I have at least one of the Apple keyboards at work and will check it out and let you know...

Ecco commented 12 years ago

Thanks a lot!

fncll commented 12 years ago

I don't know what is going on: I tried an official Apple keyboard with dock and it doesn't work with Vim at all, no matter what I do. The wireless keyboard has stopped working as well, though once when I switched from the wired keyboard to the wireless, the wireless worked. I've tried all combinations of soft-resetting the iPad, turning bluetooth on and off, keyboard settings, etc.

The weird thing is, Vim must know the keyboard is there because when I start and the cursor is flashing, when I press keys the cursor is interrupted by those keystrokes (if I keep pressing a key repeatedly, it doesn't flash at all, just stays solid)...

Any ideas? Any thoughts on how I can troubleshoot? The iPad isn't jailbroken and I use the keyboard extensively and have no issues in any other app...

jsy99 commented 12 years ago

I have tried to use Vim with a bluetooth keyboard. It would not work for me at first. What I did (just goofing around) was to tap the screen with 2 fingers a couple of times. After this, the keyboard works for me. Let me know if you need any other experiments run. (I have the code and xcode4 if you want me to compile and run it.)

Also, how do I get escape key remapped back instead of backslash?

fncll commented 12 years ago

This just gets weirder and weirder. If I start Vim, hit ESC (backslash), then tap with twice with three fingers, Vim works. It seems pretty consistent. It continues to work if I leave vim running and switch apps, but I have to repeat the process if I :q or kill vim...

abclements commented 12 years ago

I have an Apple iPad Keyboard Dock. At first I didn't think that it worked at all. After some playing around I have found that tapping the screen allows the keyboard to work. While this still qualifies as a bug it does not make it unusable as I had first thought. Since I spend a lot of time in a text editor, I would like it to be VIM since I already am familiar with it. Since I have my iPad with me most of the time anyway it's a perfect match and I don't have to wait for my laptop to boot to jot down a thought or two. Thank you all for you effort.

smeggingsmegger commented 12 years ago

I too am having issues using an Apple bluetooth keyboard. Nothing I type causes anything to happen in vim except for the cursor flickers. I can type i until my batteries die and it never goes into insert mode.

smeggingsmegger commented 12 years ago

Let me know what I can do to help diagnose this issue! Happy to help.

benekastah commented 12 years ago

I am having the same issue. When I tap the screen for a while, I can eventually get to work. I can't seem to identify any pattern to it.

demisheep commented 12 years ago

I too am having the same problem with a Bluetooth Logitech Fold-up Keyboard for the iPad2. Sure enough what you guys said, tapping the screen (with just 1 finger) allows me to use the keyboard. Woohoo! Yes, that's a bug, but something I can deal with for now.

fncll commented 11 years ago

Has there been any progress with this issue? With my new keyfolio and iPad 3 the problem has returned and no combination of touching, powering on/off, etc. works.

ghost commented 9 years ago

Issue reproducible with a generic bluetooth keyboard (bundled with an iPad 2 case), model BL-BKB76DP. Touching the screen once enables it. Thanks for the tip/workaround.