OnKeyDown

3D Graph

Function Group
OnKeyDown() Functions    Prev page: OnDblClickNext page: OnKeyPress    
Function Declared in:
NiGraph3DEvents.h

'Declaration' icon -- Shortcut to top of page. Declaration

void OnKeyDown(
    short FAR* KeyCode,
    short Shift);

'Description' icon -- Shortcut to top of page. Description

Generated when you press a key while the control has the input focus.

Shortcut to top of page. Parameters

short FAR* KeyCode

Specifies the virtual-key code of the given key.

short Shift

Contains the state of the SHIFT, CTRL, and ALT keys, which can be any combination of the CNiGraph3D::ShiftKeys enumeration values. The following list includes valid enumeration values.

  • CNiGraph3D::ShiftKey - the user pressed the SHIFT key.
  • CNiGraph3D::CtrlKey - the user pressed the CTRL key.
  • CNiGraph3D::AltKey - the user pressed the ALT key.

'See Also' icon -- Shortcut to top of page. See Also

Shortcut to top of page. Example

void OnKeyDown(short FAR* KeyCode, short Shift) {
   // Check for the Alt-Shift-D key.
   if ((*KeyCode == 68) && (Shift == CNiGraph3D::ShiftKey | CNiGraph3D::AltKey)) {
       // Your event code here.
   }
}