-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape key closes environment editor modal in vim mode #4877
Comments
I'm having the same issue. I also believe this used to work as expected. I had to switch back to normal keybindings just to edit the environments. |
Hi @ian-h-chamberlain (and @drice) thanks for reporting this issue! We're looking to improve how we handle shortcuts (e.g. like In the meantime and as an alternative to unblock you, I suggest you could change the keyboard shortcut to close modals to another key that is not |
@filfreire thank you!! It's not a perfect solution, but this is a decent enough workaround for now and at least enables reasonably editing of the modal contents in Vim mode. I set a shortcut |
I recently updated to I can't find any "Close Modal" shortcut anymore, and actually it seems like the shortcuts are now backwards from what I had previously configured (I have to use Is there any way users could at least have the option to reconfigure the "close modal" shortcut to restore the previous workaround? Fixing |
I can confirm that |
Can confirm in 2022.7.5 "Close Modal" is not there anymore, this bug is incredibly annoying I've had to switch the keymaps back to normal. |
It's great that Insomnia has Vim mode (Postman doesn't), but this makes it a little unpleasant. The current status on my machine (macOS) is the same as @mattmannion and @ian-h-chamberlain report. Is there any forecast when this will be addressed? Thank you very much. |
I am having the same problem. I would love to try the workaround where you disable the close modal key bind, but as stated by others that setting appears to be missing. |
Thank you for dealing with this issue, Insomnia is great to use, except this environment modal, which is driving me i n s a n e |
Bump on this, is there a reason this keyboard shortcut was removed? Using Ctrl+c really messes up my flow. Can this be fixed for the next release please? |
Fixes Kong#4877 There are a couple other places that had 'Escape' hardcoded for some kind of keydown event, but it seems mostly harmless - AFAIK this was the biggest painful hardcoded shortcut.
I got frustrated enough and decided to try and fix this myself, after all this time (took me long enough)! Hopefully a maintainer can take a look at #6573 and see if they're happy with my solution. Edit: got pointed to #6518 (comment) which references #6511 and #6370 Linking them here hopefully as a reminder to consider vim keybinds as well with this new refactor of modal closing... Not sure what the timeline is on those changes but 🤞 hopefully will also address this isssue! |
Fixes Kong#4877 There are a couple other places that had 'Escape' hardcoded for some kind of keydown event, but it seems mostly harmless - AFAIK this was the biggest painful hardcoded shortcut.
I'll chime in and say this is also driving me to madness: I've had to modify environments up to three or four times because pressing the It's becoming incredibly maddening to edit → esc → lose work → curse Insomnia → repeat for several cycles every time I have to use the tool. Muscle memory is a harsh mistress. I realize that may be more than you'd want to support, but a 'vi-mode' is about mode switching - so it makes sense to use mode switching to do the equivalent things like close a modal dialog. At least in the environment window, if you're using the vi keybinding, it would make sense to require the "close window" keyboard command be inputted from the "command mode", not from any mode. (ie. vi is a modal keyboard input, make sure "command" inputs are from the "command" mode!). |
Expected Behavior
When editing an environment, I'd like to use
Esc
to exit insert mode, without closing the modal. Ideally, when pressing the escape key:In practice that might be tricky, so maybe an alternative would be to simply pass the escape keypress to the vim mode handler and prevent closing of the modal with it entirely (in which case, hopefully another keyboard shortcut could be used to close it?
:q
or:wq
would be nice).Actual Behavior
Pressing escape closes the modal, even when in insert mode.
Reproduction Steps
Preferences > General
Text Editor Key Map
toVim
Manage Environments
(cmd+E)i
and type some text OR select some textIs there an existing issue for this?
Additional Information
Previously closed issue (although seemingly with slightly different behavior): #208
Perhaps this is a regression from the PR delivered against that issue (#1429)?
Insomnia Version
2022.4.1
What operating system are you using?
macOS
Operating System Version
macOS Monterey 12.4 (21F79)
Installation method
Homebrew
Last Known Working Insomnia version
Unsure, but I do think it previously worked as expected.
The text was updated successfully, but these errors were encountered: