Maintaining custom keyboard shortcuts across restarts

  1.    04 Apr 2016 #1

    Maintaining custom keyboard shortcuts across restarts

    My keyboard does does not have a sleep button so I setup a desktop shortcut with the command line command (rundll32.exe powrprof.dll,SetSuspendState 0,1,0) per instructions on various sites and setup a keyboard shortcut of F2 in the Properties. It works, but then when I restart the computer, it does not remember the shortcut. My guesses are either
    1) Windows just doesn't remember such custom shortcuts across restarts
    2) F2 is already a standard Windows shortcut for something else, and when I set the shortcut it overrides it, but when I restart the computer the standard shortcut takes over again.
    Does anyone know which applies (or something else), and if 1), is there a way to automatically reestablish the shortcut, and if 2) is there a way to automatically reestablish the shortcut, or is there a "safe" keyboard shortcut I could use that isn't used for anything else? I would prefer to have to use a key combination since this is for my parents and I went to make it as simple as possible.
      My ComputerSystem Spec

  2. Ztruker's Avatar
    Posts : 7,236
    Windows 10 Pro X64 1809 17763.292
       04 Apr 2016 #2

    AutoHotKey is used by many folks to remap key or assign different function to them.
    I'd suggest remapping Scroll Lock since it is almost never used.

    or ...

    Have them press Windows key + X then click on Sleep
      My ComputersSystem Spec

  3. Fafhrd's Avatar
    Posts : 1,929
    Windows 10 x86 14383 Insider Pro and Core 10240
       04 Apr 2016 #3

    You are right, Windows won't map an F key to a hotkey command without a 3rd party hotkey app. Nor any other single key. But you can map a group of simultaneous key presses to a command:

    right click on the shortcut you have made and select properties - and in the tabbed dialog for shortcut there is the shortcut key:

    by default it says 'None', but click in the box and hold down ctrl, and the box will show CTRL+ALT+ and waits for the letter you choose. Sleep is often represented in cartoons by ZZZzzzz, so why not make the shortcut CTRL+ALT+Z, by pressing the 'Z' key and releasing it and ctrl then select Apply and OK to save it.

    In the shortcut dialog tabs, you can also elect to rename the command to 'sleep', change the icon, give the command administrative rights, and so on.
      My ComputersSystem Spec

  4.    06 Apr 2016 #4

    Thank you for the replies. I will look into AutoHotKey. Regarding the desktop shortcut method I am trying,

    It actually will allow me to map certain single keys as shortcuts (e.g, the function keys, the numeric keypad keys). The problem is that this shortcut does not persist across restarts. I thought it was because I was overriding a shortcut that Windows has reserved for its own use, which is then lost when I restart, but I also tried Ctrl-Alt-End which seems non-standard, but that also seems to not persist across restarts. Does that mean that shortcuts created in this matter in general do not persist across restarts?

      My ComputerSystem Spec

  5.    09 Apr 2016 #5

    Update-- realized the problem. Setting a function key shortcut actually does work, but I had moved the shortcut off the desktop into another folder, and so the keyboard shortcut was not getting reset after restarts. Moving it back to the shortcut allows it it to work.
      My ComputerSystem Spec

  6.    13 May 2016 #6

    To add to this Windows will also look at the shortcuts for any programs in the Start Menu. So you can have a Shortcuts folder there with all your shortcuts and they will persist across reboots. The Start Menu location is different for different versions of windows. I have Windows 10 and its in C:\Users\...\AppData\Roaming\Microsoft\Windows\Start Menu\.
      My ComputerSystem Spec


Related Threads
Win10 Keyboard Shortcuts in General Support
On Windows 7 I used a keyboard shortcut (win+shift+left/right arrow) to quickly move a window between my laptop screen and external monitor. This is no longer working for me in Win10. Is that just me (does it work for you?) or did MS take this...
App-specific keyboard shortcuts in Software and Apps
I just recently got a Windows 10 PC, and I am having a problem. While general keyboard shortcuts (like Ctrl-C and Ctrl-V) work in all applications, shortcuts specific to an application don't work. Is there a fix for this problem?
General Tips Keyboard Shortcuts in Windows 10 in Tutorials
List of Keyboard Shortcuts in Windows 10 Keyboard shortcuts are combinations of two or more keys that perform a task that would typically require a mouse or other pointing device. Keyboard shortcuts can save you time and effort as you use Windows...
Keyboard Shortcuts in General Support
I've lost all keyboard shortcuts - how can I restore them?
How to change/fix keyboard shortcuts in Performance & Maintenance
Hey there, I'm having some problems with the new Virtual Desktops keyboard shortcuts. They all work fine except the Win + CTRL + Right to move to the one on the right and the Win + CTRL + F4 to close the current one. Is there any way to fix this...
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 22:52.
Find Us