Created On:  30 January 2013

Problem:

Is it possible to trap if a function key has been pressed while the user is on a Windows Form?

Resolution:

Yes, it is possible to trap function key values by using the KeyDown event on the form.

Example:

    method-id Form1_KeyDown final private.
    procedure division using by value sender as object e as type System.Windows.Forms.KeyEventArgs.
          if e::KeyCode = type Keys::F1
              invoke type MessageBox::Show("F1 was pressed")
             set e::Handled to true
          end-if 
   end method.