Microsoft's Windows 8, Windows 10 and Windows 11, and Apple's macOS have options for this.
In Microsoft's Windows 8, Windows 10, and Windows 11, as well as in Apple's macOS, there are options available for configuring this feature.