0

i have a keyboard(CHERRY KC 1000), it has some multimedia keys like calculator, mail, browser and a powersaving/hibernating key (it depends which setting is made in energysaving settings in windows.

Now i want to write a small app to bring some multimedia keys back. My earlier keyboard had mltimedia keys like next track, stop and mute. I can control this and detect all keys except the powersaving key in the right upper corner of the keyboard. How to call a method when this key is pressed. The key event is set to "do nothing" in Powersaving/Energy settings. Is it possible to detect that the key is pressed when "do nothing" is set? I can't find a solution in the web for that.

Cezary88
  • 23
  • 6
  • The power saving key puts the pc to sleep right ? – Christopher H. Apr 04 '18 at 14:46
  • yes that's right – Cezary88 Apr 04 '18 at 14:56
  • i want to disable the sleep function, and call another command instead of sleep, e.g. mute/unmute – Cezary88 Apr 04 '18 at 14:57
  • I don't think it is possible ... Even if you look into windows setting , you'll see an option called `Choose what the shutdown button does` .... the shutdown button is located in the cpu right ? so , i dunnow if it's even possible to detect the `powerSaving` key....And one thing : There are no powerSaving button in standard/general keyborads.So,i guess your powerSaving button calls a few more buttons buttons/keys/functions which puts the pc to sleep....If you can somehow detect that(use some screen recorders which shows which button was pressed-it doesn't make sense but give it a try).. – Christopher H. Apr 04 '18 at 15:11
  • I tried a global keyboard hook (https://stackoverflow.com/questions/604410/global-keyboard-capture-in-c-sharp-application). Unfortunately the sleep button does not get captured. On the other side: In the list of virtual key codes there is a sleep-key (https://msdn.microsoft.com/de-de/library/windows/desktop/dd375731%28v=vs.85%29.aspx). I just don't know how to handle them. Maybe it helps someone. – C4d Apr 04 '18 at 15:40

0 Answers0