Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Key press events

Key press events are generated by keypad use, and are sent to the event handler as EVT_KEY.

When a key is released, the event EVT_KEY_RELEASE is sent to the event handler. An application can determine if a key is being held by receiving notification that the EVT_KEY event is sent, then waiting for the EVT_KEY_RELEASE event. Along with pressing and releasing keys, applications can also respond when a key is pressed and held.

  • EVT_KEY is the standard key press event. It is used to receive the action of pressing and releasing a key.
  • EVT_KEY_PRESS is a response to a key press event. It is used to receive only the press (down) action of the key.
  • EVT_KEY_RELEASE is the response to a key being released. It assumes the key press event has occurred.

Key press parameters include the following:

  • wParam indicates which key was pressed.
  • dwParam contains the bit modifier flags.

See AEEVCodes.h for more information.

The following is a description of a key press events sequence.

  1. EVT_KEY_PRESS is sent when a key is pressed.
  2. When a key is held, multiple EVT_KEY events are sent.
  3. When a key is released, EVT_KEY is sent first, then EVT_KEY_RELEASE.

The clear key sets wParam equal to AVK_CLR, to move to the previous screen.