Is it possible, without the use of a macro program or the like, to reassign the shortcut key for closing the current window to something else? I would like to be able to press Alt+`(grave accent) in order to perform this action and essentially render Alt+F4 ineffective. Could there perhaps be a way to do this by editing a certain registry value? I know it sounds silly that I should want to do it this way and not and not just use a program like AutoHotkey, but for reasons I'd rather not expand on, I must do it this way. Help would be appreciated.
I'm suspicious of the "reasons I'd rather not expand on". I can't think of a legitimate reason that you would want to make this change.
Well, I can certainly tell you why I want to make this change. I generally use the keyboard to get around on the computer and internet as it's much faster than using the mouse once you get the hang of it. But Alt+F4 is quite a pain to press all of the time and isn't even a worthy alternative to just clicking "X". "Alt+` ", on the other hand, would greatly facilitate this action and would antiquate the mouse for me even further. Plus I hate my mouse.
You can't change the <Alt>-F4 action to <Alt>-`. (Well, you possibly could be writing your own keyboard map, but you probably wouldn't be asking if you knew how to do that.) Your best bet would be to get a keyboard with some programmable keys and then assign the action that way. For example, my Logitech S520 allows you to do that or - even better - assign that function to the middle mouse button.
Since this is the programming forum, the easiest method would be to write your own keyboard filter that looks for Alt+`, and sends Alt+F4 instead. I think Window's DDK has an example of such a filter, but it's been years since I looked.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |