Skip to content

A pause button that pauses the unpausable. Handy for video game cut scenes especially, but can be used for any application, not just games.

License

Notifications You must be signed in to change notification settings

ryanries/UniversalPauseButton

Repository files navigation

Universal Pause Button


Universal Pause Button Pause.

GitHub all releases

I like to play video games. I also have a significant other, and she often walks into the room to talk to me while I'm playing video games. I would like to pause the game so that I can give her my undivided attention while she's talking to me, but a lot of games (particularly single-player ones) have these "un-pausable" cut scenes or other areas of the game where the normal pause functionality doesn't work. This annoys both me and her, because I'm supposed to be the computer expert, and it looks like I don't even know how to pause my stupid video game. So usually what ends up happening is either I skip the cut scene and miss the story, or upset my SO by not paying attention to her as well as I should.

So that is why I wrote Universal Pause Button. It's a very simple Windows desktop app that sits in the system tray. Its icon resembles a pause button. When you hit the actual Pause key (also known as Break) on your keyboard, (you can also define your own custom pause key in the registry,) the program determines which window is currently in the foreground (i.e. your game's window,) and pauses it. No matter where you are in the game. Even in the middle of one of those pesky cutscenes that would otherwise be un-pausable. When you press the key again, the game will un-pause. You can also specify a process by name in the registry to pause and un-pause that process, regardless of whatever the foreground window may be.

I first wrote this app in 2015, but mostly forgot about it since then. But it has always been my most popular app on Github, so today in 2023 I've come back and rewritten the app from scratch, 8 years later, adding several improvements and requested features along the way.

Back in 2015, I used this app with The Witcher 3, and it worked great.

Today in 2023, I used this app with Baldur's Gate 3 and it is still working great.

However, your mileage may vary. It does not work with every app/game. "Pausing" processes is something that usually only debuggers do, and not every process will react the same way to being paused. Pausing processes may lead to race conditions among the threads of that process, but like I said, testing has been very positive for me so far. I've already gotten great value out of the program, as there are lots of cut scenes in The Witcher 3 that I don't want to skip. The main use case for this app is single player games, as pausing your multi-player game will undoubtedly just get you kicked from the session, as if your computer had just crashed or hung. So don't use it in multi-player games. It also works on applications that are not games at all.

There are some new registry settings you should be aware of:

Registry

All registry settings are in HKCU\Software\UniversalPauseButton.

Debug

Type: DWORD

Default: 0

Minimum: 0

Maximum: 1

By enabling this Debug setting, the app spawns a debug console that allows you to see all the internal messages generated by UniversalPauseButton. It is mostly intended just for use by me during debugging. But you can turn it on if you are having issues with the app and want to troubleshoot.

Debug Console

PauseKey

Type: DWORD

Default: 0x13

Minimum: 0x1

Maximum: 0xFE

This is the customizable Pause key. By default, it is 0x13, which is the virtual key code for the Pause/Break key on your keyboard. For a list of virtual key codes so that you can map this to another key, use the virtual key codes defined in the Windows documentation here: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

TrayIcon

Type: DWORD

Default: 1

Minimum: 0

Maximum: 1

If TrayIcon is enabled, which it is by default, there will be a small system tray icon that looks like a pause button. When you click that icon it will give you a dialog box asking if you want to exit the app. If you turn TrayIcon off, there will be no tray icon, no taskbar icon, no nothing. The app will be completely invisible and in the background. I added this feature because someone requested it, saying that they use a custom shell other than Explorer.exe, and since they didn't have a system tray in their shell, the app wouldn't work. Well, here you go, Mr. Alternative Shell.

ProcessNameToPause

Type: REG_SZ (String)

Default: "" (Empty string)

Minimum: n/a

Maximum: n/a

If ProcessNameToPause is defined, then the app will only pause that process by name, regardless of foreground window. E.g., notepad.exe or mycoolgame.exe. Include the .exe file extension. It expects process name, not Window text. WARNING: In case there are multiple processes with the same name, only the first instance found will be paused. Please don't try dumb things like trying to pause svchost.exe or lsass.exe or csrss.exe...

As always, please try it out, and let me know if you find any bugs or have any feature requests.

Thanks!

About

A pause button that pauses the unpausable. Handy for video game cut scenes especially, but can be used for any application, not just games.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages