Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
tushev authored Apr 16, 2022
1 parent b24d6fa commit 51ca576
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
![GitHub](https://img.shields.io/github/license/tushev/presssleepkey) ![C#](https://img.shields.io/badge/language-C%23-green) ![.NET 6](https://img.shields.io/badge/runtime-.NET%206-blueviolet)


The story of this app is very simple: I had a keyboard with dedicated **Sleep** key, that I used for turning my display off. Not locking, just shutting down the display.
After a while, I replaced my keyboard with a newer one, with lots of cool features, and programmable keys (CORSAIR K55 RGB PRO XT).
The story of this app is very simple: I had a keyboard with dedicated **Sleep** key, that I used for turning my display off. Not locking, just shutting down the display.<br>
After a while, I replaced my keyboard with a newer one, with lots of cool features, and programmable keys (CORSAIR K55 RGB PRO XT).<br>
However, it turned out that it is not possible to make one of the keys function like dedicated **Sleep** key.

This program sends (WM_SYSCOMMAND)[https://docs.microsoft.com/en-us/windows/win32/menurc/wm-syscommand] WinAPI message with `SC_MONITORPOWER, 2` params.
This program sends [WM_SYSCOMMAND](https://docs.microsoft.com/en-us/windows/win32/menurc/wm-syscommand) WinAPI message with `SC_MONITORPOWER, 2` params.
This message shuts the display off.

Normally, Windows should turn the monitor on if the user moves the mouse or presses any key.
Expand Down

0 comments on commit 51ca576

Please sign in to comment.