MKI_HOOKKEY_PROC (Callback)

www.CAD6.com

C++ Syntax

typedef void

(*MKI_HOOKKEY_PROC)(

 __int32 f_nWindowNum,

 UINT f_unMessage,

 __int32 f_nKey,

 __int32 f_nData );

 

This callback procedure is called once each time a key event occurs.

 

Parameters

f_nWindowNum

[__int32] Zero-based index of the drawing window that is responsible for the event. Valid range: 0 <= Value < MKI_WINDOW_MAX (standard windows) or Value = MKI_WINDOW_VIEW (view window).

f_unMessage

[UINT] Type of key event that occurred. Possible values are:

WM_KEYDOWN

WM_KEYUP

For a description of these standard key events, refer to the windows SDK documentation.

f_nKey

[__int32] Virtual key code of the key that has been pressed or released.

f_nData

[__int32] Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table:

 

BitMeaning
0-15Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user holding down the key.
16-23Specifies the scan code. The value depends on the original equipment manufacturer (OEM).
24Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if it is an extended key; otherwise, it is 0.
25-28Reserved.
29Specifies the context code.
30Specifies the previous key state.
31Specifies the transition state.

 

Comment

A hook on key events can be established and cancelled using the procedures MKI_HookKeyStart and MKI_HookKeyEnd.

 

CAD6interface 2026.0 - Copyright 2026 Malz++Kassner® GmbH