Standard Hotkey to Close a Modal Window - modal-dialog

I am currently working on a project that features a great deal of modal popups and recently received some feedback from users requesting a hot-key or shortcut to close these modal windows.
I know that modal dialogs aren't really standardized across the board, so I was curious if anyone was aware of a commonly used hot-key or shortcut to implement this functionality.
My question : Is anyone of aware of a commonly used shortcut or hot-key to close a modal popup? I am implementing it myself, but was just curious if anyone had any suggestions or recommendations on a choice.

The Escape key is commonly used.

Related

VBA hide form from menu

I'm trying to hide a form from the menu using VBA; I've Googled this, but everything is giving me the .visible option, however I want to hide it from the groups menu located on the left side. I could just as easily manually do this, however it's very tedious and I can't be going on other user's computers to do so.
Is this possible?
I might suggest normally you should only disable menus vs. removing them all together, might suggest doing an enable/disable menu item instead..
It should be possible but how much work is it and is it worth it to you? It isn't clear what your host application is just that you're using VBA. Might suggest the host application may already allow for customization if so use what it provides.
If the app doesn't allow customizing your menu you can still do it, just how much work is it worth for you? You'll need to look at the Win32 way of doing things. If not familiar with Win32 and menus take a look and start here looking here at MSDN to start learning about menus in Windows. After this you'll find Pinvoke will be handle to give you C#/VB sample to call what is needed. The VB should be useful but you will probably need to further translate the VB to VBA for your needs. FYI when starting out a a C/C++ developer back in the day 30 years ago it was anticipated anyone getting into windows might take them a few months, there is a lot you'll need to get up to speed on. Thus is this feature really worth it?

How to add keyboard shortcut (accelerator) for wireshark lua plugin?

I have created a wireshark plugin using lua, which currently shows up under Tools->my_plugin
I want to know, if there is a way by which I can assign a keyboard shortcut to it, so that users dont have to go through menu bar.
No, there isn't a way to do that currently. You could submit a patch to allow register_menu to take a shortcut key.
For others, documentation of register menu:
https://wiki.wireshark.org/LuaAPI/GUI#register_menu.28name.2C_action_.5B.2Cgroup.5D.29

How do you open the Javascript console?

A moment ago I had minimized VSCode but then accidentally pressed some set of keys. VSCode popped up and displayed a standard Javascript debug console on the right side. While this may very well be an error and VSCode does not intend to expose this console, it's very interesting and I'd love to use it.
Is this an expose feature of VSCode? Is it a legitimate "secret" feature? In either case, how can you access it?
There is a little console available under the F12 short-cut that has DOM / Styles / Event Listeners and the like.
It is pretty analogous to browser tools.
The main purpose of it is that it exposes the "under the hood" editor - as that is the web page that it is inspecting.

Matlab: How to activate autocomplete without Tab?

From
How to enable auto word completion in the MATLAB Editor?
I know that we can Tab to ask for autocomplete. However, this is kind tedious. In IDEs like rubymine, there is no need to ask for a autocomplete, the suggestion jumps out by itself.
And this is working on mobile device: http://www.mathworks.cn/cn/help/matlabmobile_android/ug/autocomplete.html. Is is possile to do it on desktop?
So how can I make the autocomplete autoly? without the need of Tab?
I've searched that on the Internet before. But no results:( It seems that Tab is the only way to achieve complete on MATLAB desktop up till now. AUTOcomplete is available on the mobile version because of the inconvenience for one to type on a mobile phone MAYBE.

How to get back the focus to my application automatically

I am setting up a simple 'boot menu' for my app, where the (experienced) user can check or uncheck various run options. The boot menu is a simple borderless form shown modally and with
Quit button
Continue button, as well as
boot options checkboxes
I display this boot option dialog as I am starting my app if the user is holding the F8 key - I've discovered that Windows does not use F8, so you can actually hold down F8 while clicking on a shortcut to my exe and my boot dialog opens. Herein lies the probem.
My form does not become the active application - rather the Explorer window hosting the shortcut that I clicked on does. If I click on my form (boot dialog) it gets the focus. How can I make my boot dialog form 'pull' Windows into focusing it?
In general you cannot take focus. From Raymond Chen's Old New Thing blog:
Foreground activation permission is like love: You can't steal it, it has to be given to you
...the window manager sees no reason for the first instance to have any right to take the foreground. There is no evidence that the first instance is coming to the foreground in response to some user action.
There are a variety of ways of addressing this problem. The easiest way is simply to...
You don't need to steal focus if you can just arrange for someone to give it to you
...outright stealing the focus is the wrong thing to do...
...Just because there's no good way to do something doesn't mean that you are automatically permitted to do it in a bad way.
The problem is that the user has been giving input to a program that is not yours. You're not entitled to have focus just cause you want it.
It may not be the answer you want, but it is the answer. And Microsoft has been working hard to thwart programs that try to steal focus. Any solution you come up with is breaking the rules, and might not work at any point in the future.
...Just because there's no good way to do something doesn't mean that you are automatically permitted to do it in a bad way.