Vimari: Hitting escape exits full screen

Created on 14 Aug 2018  ·  9Comments  ·  Source: televator-apps/vimari

As a person pretty much exclusively using safari in full/split screen mode I find myself constantly exiting fullscreen by accident when using vimari, for instance if I want to return to normal mode after writing a comment like this to hit the submit key from links hint mode.

This can be avoided by preventing default behaviour through an event listener.

Rough example:

function disable_esc_exit(window){
    const ESC_KEY = 27;
    const KEYPRESS_EVENT = "keypress";

    window.addEventListener(KEYPRESS_EVENT, 
        event => event.keyCode === ESC_KEY && event.preventDefault()
    );
}

... 
disable_esc_exit(window);
feature request

Most helpful comment

What's the status here? This bug makes this extension pretty much useless in fullscreen mode.

All 9 comments

Hi @Hultner. I don't understand your explanation of your use-case - could you provide a more detailed explanation, or maybe a gif? Thanks.

@simeg Okay I'm going to list steps to reproduce.

Problem

  1. Open Safari with vimari
  2. Enter Full Screen
  3. Browse the web using vimari
  4. Press Esc at some point

This trigger Safari to exit full screen mode, accompanied with a disruptive animation.
In addition if the user ran the window in split Full Screen with another movie they need to rearrange the split windows manually again forcing the user to use their mouse or other pointer device.

Suggested solution

Block default behaviour for Esc thus prevent the user from accidentally exiting full screen due to overlapping keybindings.

Extra, make the feature optional through a toggle in the extension settings in case any user actually relies on the default behaviour.

I hope it's a bit clear now, if explanation is insufficient I'll try to provide a gif.
I'm not familiar with such screen recording software, if you or anyone else have a suggestion on which software is good for the purpose I'd love to hear that input.

Thanks for taking your time reading my input.

Hi @Hultner, thanks for the detailed explanation! So if I understand correctly, the problem is that when you're using Safari in fullscreen and navigating with vimari and accidentally hit escape one too many times, fullscreen exits. Is that correct?

Or, is it that when you're in fullscreen and a single esc key press exits fullscreen? I can't really tell from your description.

Anyway, I made this GIF to demonstrate that the correct behavior is expected. I navigate Wikipedia with vimari and I can press esc to get out of link mode perfectly fine. But when I press esc when I'm not in some vimari mode - it exits fullscreen. I'm running version 1.13.

vimari_safari_fullscreen

Let me know the exact problem and we'll take it from there.

There’s two cases triggering this behaviour

1) I accidentally hit Esc to many times or due to muscle memory
2) I’ve edited a input field, hit Esc to exit insert mode to normal mode. My instinct when writing this comment is to input desired text, hit Esc, enter link target mode, trigger the [Comment]-button.

Both these cases are equally disrupting.

Thanks again for reading and taking my input into consideration.

Thanks @Hultner, I understand now. I can see that this is annoying and disruptive, and I think having an option for it makes sense. However, I'm torn between working on this current version of the extension (that will soon be deprecated due to the fact that it becomes incompatible with any Safari version below 11), and the new version of the extension which still lacks some basic stuff like settings.

I think implementing this would not be too difficult, and since you are the only one wanting this feature so far I recommend you do it yourself. I can be of help reviewing and testing but I won't write any code. I'm sorry, but I have to priorities my time.

What is status on that? I am mostly looking on a way to exit "insert mode". The flows goes like:

  1. Visit for example GitHub
  2. Hit i to enter "pass-through" or "insert" mode (for example to use GitHub y shortcut to expand the URL)
  3. Hit <Esc> to go back to "normal mode"

Workaround in some cases is to use ^[, but on my keyboard (40% Planck) it is more troublesome than just using <Esc>.

@hauleth I'm not working on it, I don't know if Vimari is actively being developed. At this moment I'm hoping the chrome based vim extensions will work on the next Safari version as they seem more mature and feature complete. I do love vimari, without it I wouldn't be able to use Safari as my daily browser but it's still missing a good chunk of the power from it's siblings in Chrome & Firefox.

What's the status here? This bug makes this extension pretty much useless in fullscreen mode.

I'm in the same boat — this basically forces me to choose between using the extension and full screen :(

Was this page helpful?
0 / 5 - 0 ratings