Disabling a hotkey in Windows Explorer


  1. Posts : 6
    Windows 10
       #1

    Disabling a hotkey in Windows Explorer


    How can I disable the Ctrl+D hotkey (that deletes files) in Windows Explorer?

    I'm specifically looking for a solution that does not involve 3rd party software; so preferably something like Group Policy, or a Registry key, or some other built-in method.
      My Computer


  2. Posts : 9,788
    Mac OS Catalina
       #2

    It has always involved third party software like Key Tweak. You can download it from majorgeeks.com
      My Computer


  3. Posts : 124
    Windows 10.0.15063 (Version 1703) Pro 64-bit
       #3

    Flummox said:
    How can I disable the Ctrl+D hotkey (that deletes files) in Windows Explorer?

    I'm specifically looking for a solution that does not involve 3rd party software; so preferably something like Group Policy, or a Registry key, or some other built-in method.
    I can provide you with a Windows registry script that will disable all Windows hotkeys, without using third party software.

    Would you be interested in that?
      My Computer


  4. Posts : 9,788
    Mac OS Catalina
       #4

    Hydrate I would post it, unless there is a tutorial with the info already. Not the first time that someone has asked for how to change hard assignments. The majority of the shortcuts that Microsoft puts into their products, the average user does not even use.
      My Computer


  5. Posts : 6
    Windows 10
    Thread Starter
       #5

    Thank you all for your replies.

    For clarity, I should have perhaps elaborated a little more on what I am trying to achieve.

    I use AutoHotkey to allow all sorts of custom key combos and actions to be run. One of the hotkeys that I have created is designed to deselect any selected files in Explorer (sort of the opposite of Ctrl + A). I assigned Ctrl + D (for de-select) to this action because it's the same hotkey that's used to deselect a selection in Photoshop, and I've been using that for so long that it's really engrained in me, so it just made sense for me to go with the same hotkey for deselecting in Explorer.

    I've been happily using this for a couple of years, and all is well ...... provided that Autohotkey is running! However, if AutoHotkey is not running then Ctrl+D changes back to delete.

    I don't clutter my system tray with icons for AutoHotkey (because once the script is edited, it just does it's thing and doesn't need to be interacted with via GUI) so it's not immediately apparent if it is not loaded. Also, whenever I deliberately unload the script (to work on new scripts) or if I'm starting Windows with HKCU & HKLM run commands temporarily disabled for testing, then it's easy to forget that my frequently used hotkey has suddenly changed function and it will now delete files instead of just unselecting them.

    So I was hoping to find solution that does not rely on startup shortcuts or 'run' registry keys; something that essentially can't be bypassed easily, but at the same time which will not completely disable that key combo (because I still need to use it in Photoshop and other apps).

    So when I said "no 3rd party" it wasn't about me wanting to set the restriction directly just for the hell of it, what I meant was I didn't want to have to run yet another piece of software every time because that would just duplicate the function of AutoHotkey, and it would be prone to the same issue of silently reverting the hotkey to default if it didn't run for some reason.

    The option that Bro67 mentioned is a 3rd party software, but it just acts as a font end to the Registry (as far as I can tell) so this might do the trick, unless it permanently maps the hotkey for all applications.
      My Computer


  6. Posts : 124
    Windows 10.0.15063 (Version 1703) Pro 64-bit
       #6

    Flummox said:
    Thank you all for your replies.

    For clarity, I should have perhaps elaborated a little more on what I am trying to achieve.

    I use AutoHotkey to allow all sorts of custom key combos and actions to be run. One of the hotkeys that I have created is designed to deselect any selected files in Explorer (sort of the opposite of Ctrl + A). I assigned Ctrl + D (for de-select) to this action because it's the same hotkey that's used to deselect a selection in Photoshop, and I've been using that for so long that it's really engrained in me, so it just made sense for me to go with the same hotkey for deselecting in Explorer.

    I've been happily using this for a couple of years, and all is well ...... provided that Autohotkey is running! However, if AutoHotkey is not running then Ctrl+D changes back to delete.

    I don't clutter my system tray with icons for AutoHotkey (because once the script is edited, it just does it's thing and doesn't need to be interacted with via GUI) so it's not immediately apparent if it is not loaded. Also, whenever I deliberately unload the script (to work on new scripts) or if I'm starting Windows with HKCU & HKLM run commands temporarily disabled for testing, then it's easy to forget that my frequently used hotkey has suddenly changed function and it will now delete files instead of just unselecting them.

    So I was hoping to find solution that does not rely on startup shortcuts or 'run' registry keys; something that essentially can't be bypassed easily, but at the same time which will not completely disable that key combo (because I still need to use it in Photoshop and other apps).

    So when I said "no 3rd party" it wasn't about me wanting to set the restriction directly just for the hell of it, what I meant was I didn't want to have to run yet another piece of software every time because that would just duplicate the function of AutoHotkey, and it would be prone to the same issue of silently reverting the hotkey to default if it didn't run for some reason.

    The option that Bro67 mentioned is a 3rd party software, but it just acts as a font end to the Registry (as far as I can tell) so this might do the trick, unless it permanently maps the hotkey for all applications.
    Only one way to do this is to try it out for yourself or read the feature list of the 3rd paty software Bro suggested.
      My Computer


  7. Posts : 6
    Windows 10
    Thread Starter
       #7

    I have now had time to read through the manual for KeyTweak and it is completely unsuitable. It's a program for disabling / remapping keyboard keys globally (for all applications and all users), rather than disabling a "hotkey" combination within a specific application.

    If Microsoft had used just the Winkey as part of this hotkey assignment then it would have been a lot easier to deal with. However, the fact that they've used the Ctrl key means that I obviously can't block that particular key globally (because I wouldn't even be able to copy and paste, never mind continuing to use Ctrl + D in Photoshop as stated as a requirement in my original post).

    Anyway, I think I have come up with my own solution (although I've not had time to test it out yet).

    I will use AutoHotkey to create a script to block Ctrl + D only when that combination is pressed in Explorer (which is what I have already) but I will put this in its own script by itself. Then, instead of running it as a script, I'll compile it into a executable. This would mean that it would not be affected if I shut down all running AutoHotkey scripts while testing.

    To go one step further and ensure that it can't be easily disabled from running at startup (by editing 'run' Registry keys, or by using MSconfig) I will take the compiled .exe and run it as a background system Service (where it cannot easily be disabled or killed using Task Manager).

    That should pretty much ensure that I can rely on it being there, regardless of what I'm doing on the computer.
      My Computer


  8. Posts : 124
    Windows 10.0.15063 (Version 1703) Pro 64-bit
       #8

    Flummox said:
    I have now had time to read through the manual for KeyTweak and it is completely unsuitable. It's a program for disabling / remapping keyboard keys globally (for all applications and all users), rather than disabling a "hotkey" combination within a specific application.

    If Microsoft had used just the Winkey as part of this hotkey assignment then it would have been a lot easier to deal with. However, the fact that they've used the Ctrl key means that I obviously can't block that particular key globally (because I wouldn't even be able to copy and paste, never mind continuing to use Ctrl + D in Photoshop as stated as a requirement in my original post).

    Anyway, I think I have come up with my own solution (although I've not had time to test it out yet).

    I will use AutoHotkey to create a script to block Ctrl + D only when that combination is pressed in Explorer (which is what I have already) but I will put this in its own script by itself. Then, instead of running it as a script, I'll compile it into a executable. This would mean that it would not be affected if I shut down all running AutoHotkey scripts while testing.

    To go one step further and ensure that it can't be easily disabled from running at startup (by editing 'run' Registry keys, or by using MSconfig) I will take the compiled .exe and run it as a background system Service (where it cannot easily be disabled or killed using Task Manager).

    That should pretty much ensure that I can rely on it being there, regardless of what I'm doing on the computer.
    You came up with your own intelligent solution. You didn't need us

    Well, it was hard for me to understand why you needed this when you seemed to have already solved the problem early with AHK.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:17.
Find Us




Windows 10 Forums