0

I wrote a little program that uses the PrtSc key as a replacement for pressing / clicking the middle mouse key. My program uses the GetAsyncKeyState API function to scan the PrtSc. It works fine.

The problem is that the original functionality of PrtSc continues to work also. So, as long as PrtSc is pressed, screenshots of the desktop are being made. After a brief moment, this leads to some hickups and delays in my screen repainting. So I would like to turn off the 'screenshot function' of PrtSc.

I tried this method of adding a registry key to change the scan code. disable the printscreen keyboard option from windows But this makes the PrtSc key pretty much 'disappear' for Windows. In the sense that GetAsyncKeyState also does not see the keypresses anymore. Does anybody know of a way to 'detach' the screenshot functionality from PrtSc, but in such a way that pressing PrtSc still generates keycodes ...?

Ray Johnson
  • 97
  • 1
  • 9

1 Answers1

0

I have a work-around for now. Still interested in the answer to my question though...

Work-arounds (two):

  1. I am using the Tab key instead of the PrtSc key in my program. Not entirely happy with this, since it messes with the Tab action when entering text.

  2. Using key remapping in AutoHotkey (that I was already using) I remap the Tab key to Middle Mouse Button, but only for the program for which I need this:

#IfWinActive "My CAD software"

*Tab::MButton

#IfWinActive

Ray Johnson
  • 97
  • 1
  • 9