Is there a Windows 7 keyboard shortcut to change the desktop background?

11

5

With all of the new keyboard shortcuts added to Windows 7, I was wondering if a shortcut had been added to change the Desktop Background when the theme was setup to work as a slide show.

I want to execute the Next desktop background command which a user is prompted for when right clicking a desktop that has been setup for a slide show.

ahsteele

Posted 2009-11-17T21:48:28.533

Reputation: 1 730

Answers

17

Not that I know, but it can be fixed with an AutoHotkey script. For instance, this will use Win+n to go to the next desktop background:

#n::                             ; use the Windows+n hotkey
WinActivate, ahk_class Progman   ; activate the Desktop
MouseGetPos, xpos, ypos          ; get current mouse position
Click 0,0                        ; click in the corner of the desktop, to unselect any selected icon
Send +{F10}                      ; send Shift+F10, the shortcut for right-click
Send n                           ; send "n", the key for "next desktop background"
Click %xpos%, %ypos%, 0          ; put the mouse back at its previous position
return                           ; done!

The "n" in Send n is only valid for an English Windows 7 (Next desktop background). You'll have to change it if your Windows 7 is not in English to match the underlined key.

Snark

Posted 2009-11-17T21:48:28.533

Reputation: 30 147

Note: if your menu contains multiple entries responding to "N", you'll need to use Send n the appropriate number of times, followed by Send {Enter} to activate the menu entry. – George Marian – 2016-09-14T16:56:41.280

The menu entry is only shown when your settings result in slideshow mode (i.e. multiple image files selected), and then in German "_N_ächster Desktophintergrund" conflicts with "Neu" (New..) - see comment above. Actually I was looking for a way to toggle the background image to a solid color in order to "turn if off", but now that is a slideshow of a photo and a 1px image that Windows changes automatically every 24 hrs (there is no "never" option)... – handle – 2017-04-03T10:51:04.823

Too bad Microsoft didn't add a shortcut out of the box but I am happy you turned me onto AuthoHotKey. – ahsteele – 2009-11-18T05:38:39.917

Unrelated to this thread what's the markdown you used for hte Win + n to make it look like keys? – ahsteele – 2009-11-18T05:40:10.317

<kbd> </kbd> :-) – Snark – 2009-11-18T06:12:46.727

I was not a believer at first. Each day now I'm more convinced that there is always a way with autohotkey. – Malabarba – 2009-11-21T14:05:13.227

8

I found a much easier way to change your desktop background:

  1. Go to your desktop (Windows Key+D)
  2. Press "menu"key on keyboard (opening the same menu as mouse right button menu) + "n" key...

Result is the same - 2 buttons, desktop changed.

vladec

Posted 2009-11-17T21:48:28.533

Reputation: 81

if multiple entries respond to the 'n'-key you have to activate with <Enter> – Yolgie – 2015-09-11T12:18:46.063

@GiacomoLacava SHIFT+F10 acts as Menu key. – handle – 2017-04-03T10:54:58.413

good suggestion, but there is no Menu key in many modern keyboards (especially laptops). – Giacomo Lacava – 2012-04-28T22:01:32.667

1

WinActivate, ahk_class Progman

doesn't seem to work if Microsoft Visual Studio is running maximized, a real shame. Other than that it works fine.


Edit: the following works fine, but flashes the desktop. Pros and cons to all I guess.

#n::                             ; Use the Windows+n hotkey
Send #d                          ; Switch to the Desktop
MouseGetPos, xpos, ypos          ; Get current mouse position
Click 0,0                        ; Click in the corner of the desktop, to unselect any selected icon
Send +{F10}                      ; Send Shift+F10, the shortcut for right-click
Send n                           ; Send "n", the key for "next desktop background"
Click %xpos%, %ypos%, 0          ; Put the mouse back at its previous position
Send #d                          ; Switch away from the Desktop again
return                           ; Done!

Joris

Posted 2009-11-17T21:48:28.533

Reputation: 11

0

I found the second version of the script ran best. Because the window key+d command toggles between the window and the desktop if you are already in the desktop it may switch away from the desktop first instead of switching to it. The following works better for this reason :-)

#n::                             ; use the Windows+n hotkey
Send #m                          ; minimize all open windows
MouseGetPos, xpos, ypos          ; get current mouse position
Click 0,0                        ; click in the corner of the desktop, to unselect any selected icon
Send +{F10}                      ; send Shift+F10, the shortcut for right-click
Send n                           ; send "n", the key for "next desktop background"
Click %xpos%, %ypos%, 0          ; put the mouse back at its previous position
Send #+m                         ; undo minimize
return                           ; done!

jono

Posted 2009-11-17T21:48:28.533

Reputation: 1

0

I think this only works if you have your desktop icons showing. If you don't, Shift-F10 doesn't bring up the right click menu.

Edit: Well, I didn't install AutoHotKey, but someone at www.technixupdate.com/keyboard-shortcut-or-hotkey-to-switch-to-next-windows-7-desktop-wallpaper/ compiled it and it works with or without desktop icons showing. I just thought it wouldn't work as when I have my icons hid, the "Application" key and Shift-F10 both do not work. So, don't listen to me, it will probably work...

Scott

Posted 2009-11-17T21:48:28.533

Reputation:

Menu key / SHIFT+F10 does bring up the menu, but only when desktop is focused (Windows+D) already (I have icons hidden). – handle – 2017-04-03T10:57:20.623