Dialog menu not receiving Enter key - menu

I’m currently writing an MFC dialog app which has a menu. The menu displays correctly and the menu entries work correctly via mouse, accelerators, and hotkeys (e.g., to quit: Ctrl+Q or Alt+F,Q).
Unfortunately, the Enter key doesn’t seem to work. That is, pressing Alt+F will open the File menu and pressing ↑ will highlight the Quit entry, but pressing Enter will not select it.
I know that using menus in dialog apps can be a bit tricky, but I’ve done this successfully before. However, that was a long time ago with a customized VS wizard, so I am trying to remember how to do this from scratch. I tried checking my old code, but could not find anything in reference to VK_RETURN. (No, there’s nothing special in PreTranslateMessage.)
These two questions are related, but they want the dialog to receive the key, I need the menu to get it.
Does anyone know what the problem is and how to fix it?

Related

Why doesn't the “Clone or download” button copy its URL to my primary selection?

On Linux (really on X11) there are multiple kinds of selection.
When I click the clipboard button on a Github "Clone or download" popup using Firefox the clone URL gets copy to the clipboard.
It does not get "copied" into the primary selection.
This annoys me, since I am used to select things with the left mouse and then pasted them with my middle mouse button. In this popup however I am forced to use the CTRL+V method to paste.
Is this a deliberate decision or a bug? I believe that it used to work some time ago?!
If it is a bug:
Is this a Firefox bug, a GTK+ bug, a Github bug or what? Where would I start looking for this problem?

How to change the functionality of a button so that it can work as the backspace button

Okay, so I have a Compaq laptop [American keyboard].
It is a few days that the backspace button is broken - I mean, it is totally popped off. It ought to be replaced but it is hard to find it out.
Now, I was wondering whether or not there was a way to change the functionality of another button so that it can replace the functionality of the backspace button.
It is not the DEL button. It is the BACKSPACE button [above the Enter button].
I knew that through some binary numbers it is possible to change the functionality of a button. For example, I can change the DEL button in the Number Lock so that instead of working as DEL button or dot, it will work as backspace.
Is it possible?
Another way on Ankit's recommendation:
After installing the AutoHotkey, creating the short script and saving it with .ahk extension, just put the file in the startup folder :) click Start(or windows logo)---All Program---startup folder :) then re-start pc.
If on windows, you may use AutoHotkey, install it, create a file with .ahk extension and put following code in it.
F1::Send {BackSpace} ; Makes the 'F1' key send 'BackSpace' key.
Then run the above script on startup.
More Details for remapping here.

Visual Basic 2013 - Pressing ALT gets me out of code

I just installed my Visual Basic and this is a problem I couldnt find an answer to. Everytime I press ALT it gets me out of code, and because I use SHIFT+ALT to change keyboards a lot while writing code, this is really disturbing to have to click in code again to be able to write.
Any ideas ?
Are you referring to the normal Windows way of accessing the menu via keyboard? This has nothing to do with Visual Studio; it will work similarly in almost any Windows application.
E.g. pressing Alt+F will open the File Menu etc. Just pressing Alt will highlight the menu (you should see the shortcut letters underlined for each item) and pressing a letter key will then open the menu. Instead, press Alt again to return to what you were doing before.

Linux - Any way to configure or create a script/program to make right click not select menu item?

The default behavior for right-clicking on most recent Linux distros is to select a menu item in a right-click menu upon releasing the right mouse button. While this saves some mouse presses, it is driving some of my Windows-trained (and rather vocal) coworkers completely bonkers, and a lot of searching has told me that there is no option to change this behavior in the distros they are using (mostly RHEL 6).
To make my work environment a little less volatile I would like to try to program a fix or patch for their systems to make right clicking work like they are used to (the menu does not even appear until the right mouse button is released), but I don't know what kinds of tutorials I should be looking for (shell scripts? C? etc.) in order to do this.
If I could be pointed in the right direction that would be lovely! (or if someone by chance already knows of a fix, that would work too, though a lot of Googling has told me that there does not appear to be one currently)
Follow the directions here:
https://unix.stackexchange.com/questions/20550/how-to-disable-the-forward-back-buttons-on-my-mouse
But instead of disabling the forward and back buttons, disable the right click mouse button. You can easily dump the resulting command into a shell script which calls xmodmap. Then you can make icons that disable and enable the right mouse button, for the times where they will need it.

"Find and Replace" text box holds the cursor

context, Find and Replace "window" in VS2012 (rc)
Anyone know how to either alter the behavior or get back the old find and replace?
When you execute a search in the new "Find and Replace" you can press F3 to cycle through the results (same as old behavior). However, you have to click ESC to put the active cursor location in your code. With the old setup (if you have the search window auto-close) the cursor is already in the code. Pressing down without pressing ESC requests the history of searches dropdown list to open.
Basically, I just want the old search window, it worked perfectly.
Nope, this is the new search box, and the old one basically isn't available anymore. What you can do it file a bug report on the Connect site, but honestly it will probably be ignored because MS has decided that usability is not important for this new version of Visual Studio (in my own humble opinion)
Good luck!
As an alternate, I guess that you could make an extension that repeats the previous behaviour (like I am doing for all of my Macros) but that is kind of in the territory of overkill.
If you hit Ctl-Shift-F or Ctl-Shift-H, you'll open the Find/Replace in files dialog, which is very similar to Visual Studio 2010. Even though it says "find in files", you have the option of searching in selected text and the current document.
Taking the information above, I went into Tools / Options / Environment / Keyboard and switched the Ctrl+F and Ctrl+Shift+F hotkeys around.
I then dragged the "Find and Replace" window to the right and docked it as a tab (along with Solution Explorer, Properties, etc), as I haven't found a way to have it close automatically after starting a search.
I can now place the cursor anywhere in my document, press Ctrl+F, enter my criteria and press F3 to start the search.
Repeated F3's, even after moving the cursor, behaves just like the good-old-times! (but as bobobobo mentions, be prepared to curse if you accidentally start your search with ENTER instead of F3 :()

Resources