I assume it needs to be done when this key is pressed in some form. Override the method
System.Windows.Forms.Form.OnKeyDown
and use event arguments parameter passed to this method to determine what key is pressed. Here is the problem: usually some form's child control is focused; and it grabs keyboard focus out of the form itself. Activated form rarely has a focus like a control. So, you need to preview events by the form. To do that, set the property
System.Windows.Forms.Form.KeyPreview
to
true
.
See:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.keypreview.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.aspx[
^].
Now, keep in mind that if you use this exact key you can greatly confuse your user. PgDown should be reserved for "Page down". Better pick up some more reasonable key or key combination — there are many of them on the keyboard. :-)
—SA