terrychou / iVim

A vim port to iOS.
597 stars 34 forks source link

Cmd-Period no longer interpreted as <Esc> in iPadOS 16 #256

Open majick opened 1 year ago

majick commented 1 year ago

After the iPadOS 16 upgrade, when Cmd-Period is pressed, iVim now interprets the keypress as <D-.> rather than <Esc>. The somewhat other more cross-platform convention of <C-]> continues to work fine.

The workaround is to map <D-.> to <Esc>, which makes iVim work as it did yesterday. Weirdly, it seems that all over iPadOS 16, Cmd-Period works perfectly well as <Esc> just as it has for every Apple OS since 1984 so it doesn't seem like an intended change to the OS.

mchalkley commented 1 year ago

Thank you for reporting this! When it first happened, I thought my 63-year-old synapses had finally started to fail completely...

terrychou commented 1 year ago

iVim has always been monitoring the <D-.> keypress. In systems before i(Pad)OS 16.0, <D-.> had been interpreted into esc automatically by the system before it sends the keypress event to iVim (in other words, iVim had never actually get <D-.> but <Esc>). However, the system gives up the interpretation in version 16.0 and iVim gets the original <D-.>.

IMHO, this is a better thing because we can use this keypress with more freedom:). (Though I need to update the related documentation.)

nekotiajones commented 1 year ago

@terrychou No, no, no. Please listen to us. Some iPad users are expecting the Command + period to be an ESC, regardless of history/theory you mention. Yes, we could re-map the keys but why make users do something like that? The iPad already is a new device with a lot of things to learn. Please change it so that command + period does ESC by default, for the sake of many future users. Thanks.

majick commented 1 year ago

Note that every other iPadOS program I use continues to treat Cmd-. as <Esc> so while this is clearly a change in the way input is being passed to iVim in particular it's not a universal nor expected change. Every Apple keyboard without an Escape key -- going back to the Macintosh in 1984 -- used this chord for the purpose, just like the iPad does today.

It would be nice if Apple would just pick a consistent way of passing this stuff through to the app!

terrychou commented 1 year ago

Since this interpretation is important, I will make the mapping the default in the next update.

nekotiajones commented 1 year ago

Thanks! And thanks for the quick response, that means a lot! I am impressed so far by this tool. It is very thorough and in-depth. I learn more and more just by reading the documentation. I think it would be wise to create a single document or video for new iOS users. The video would cover the areas which the user is most likely to get stuck at:

I think the text documentation is great, but if there was a quick video to show ^ those listed steps the user could learn much faster.

Thanks.