cmoskvitin / obsidian-prozen

Obsidian plugin for going FULL screen
GNU General Public License v3.0
41 stars 2 forks source link

can you please disable press "ESC" to exit the prozen mode? #6

Open hndfzhanghui opened 1 year ago

hndfzhanghui commented 1 year ago

First of all, thank you very for this beautiful and elegant plug-in.

I am a Chinese writer, and ESC is usually used for during the Chinese Pinyin input to cancel a sentence.

But while I turn on the zenpro mode, and press ESC while I am going to delete the Chinese Pinyin I just typed, the zenpro mode is gone.

Can you please add a feature to change the default exit key of zenpro?

Thank you very much!

Happy new year!

cmoskvitin commented 1 year ago

Ni hao, @hndfzhanghui ! I saw your comment a couple days ago, but since then I wasn't able to find a quick solution for this problem. Exiting fullscreen on ESC is hard-coded into exitFullscreen() method which I'm using currently. Looks like I will need to rewrite a lot of stuff to exclude ESC. I will continue my search for a better solution. Thank you for using ProZen and for your warming words!

hndfzhanghui commented 1 year ago

Hi, @cmoskvitin

Thank you for your hardwork about this issue. If it is too complicate, I can just try not to use ESC while typing. Thank you for your time and patience.

megamaddu commented 1 year ago

This is also an issue when vim mode is enabled, since ESC is a normal part of moving around the document (often enough that it's commonly bound to CAPSLOCK).

Thanks for the plugin work, though, will definitely use if this can be resolved

cmoskvitin commented 1 year ago

@megamaddu ok. One more reason to re-think the method I hide the stuff with. Thanks you for mentioning this. I'll try to find a way.

cmoskvitin commented 1 year ago

@megamaddu @hndfzhanghui FYI found an interesting partial solution, which doesn't require additional development. Sorry, got loaded with another project at my work, but I will definitely get back to ProZen in the nearest future.

So, to disable ESC, you can actually do this:

rasuru commented 1 year ago

I tried the partial solution to get vim mode working properly. It now does not turn off Zen mode, but for some reason the editor refuses to switch to vim's normal mode.

Edit: Does it have to do with styling?

codeRSH commented 1 year ago

Well this fullscreen hack doesn't work for me. It would be nice if you could find a 'proper solution' to this issue. I am also using vim for my writing and having trouble to use this plugin due to not being able to use ESC inside "ProZen" mode.

Thank you for making this plugin though!

simonallfrey commented 1 year ago

Hi, I'm a vim keybindings user.

Loved proZen for 30 seconds, then crushed when I found out about the ESC (& Ctrl-[) collision.

Have you had any more thoughts on a re-implementation?

With the above caveat, great plugin, thank you.

nikbrunner commented 10 months ago

Loved proZen for 30 seconds, then crushed when I found out about the ESC (& Ctrl-[) collision.

Same experience here! :)

I love what the plugin does, but this little thing crushes my whole experience as a Vim user. This issue is exactly one year old now. I hope this gets fixed. 👍

choozn commented 8 months ago

Loved proZen for 30 seconds, then crushed when I found out about the ESC (& Ctrl-[) collision. I love what the plugin does, but this little thing crushes my whole experience as a Vim user. This issue is exactly one year old now. I hope this gets fixed. 👍

Same experience for me as well.

zbyju commented 5 months ago

The weird thing is then when just using obsidian in fullscreen (F11) with vim mode it doesn't cause any issues (without Zen Mode) = ESC works correctly for going to Normal Mode and even in normal mode it doesn't trigger closing the fullscreen.

When in zenmode it first exits the zenmode without going to normal mode in vim, therefore the behavior is completely different.