STK X Send comments on this topic.
KeyUp Event (AgUiAxGfxAnalysisCntrl)
See Also  Example
KeyCode
A key code such as System.Windows.Forms.Keys.F1 (the F1 key) or System.Windows.Forms.Keys.Home (the HOME key) in Visual Basic .NET).
Shift
An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. The Shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT are pressed, the value of Shift is 6.
Windows






Windows & Linux

Description

Occurs when the user releases a key while the control has the focus.

Syntax

[Visual Basic .NET]
Public Event KeyUp( _
   ByRef KeyCode As Integer, _
   ByVal Shift As Integer _
)

[C#]
public void KeyUp(
ref int KeyCode,
int Shift
);

[Managed C++]
public: void KeyUp(
int ^ KeyCode,
int Shift
);

[Java]
public  keyUp(
ppInteger KeyCode,
ppInteger Shift
);

[Unmanaged C++]
public: HRESULT KeyUp(
int * KeyCode,
int Shift
);

Parameters

KeyCode
A key code such as System.Windows.Forms.Keys.F1 (the F1 key) or System.Windows.Forms.Keys.Home (the HOME key) in Visual Basic .NET).
Shift
An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. The Shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT are pressed, the value of Shift is 6.

Remarks

Although the KeyUp events can apply to most keys, it is most often used for:

  • Extended character keys such as function keys.
  • Navigation keys.
  • Combinations of keys with standard keyboard modifiers.
  • Distinguishing between the numeric keypad and regular number keys.

KeyUp is not invoked for the TAB key.

KeyUp interpret the uppercase and lowercase of each character by means of two arguments: KeyCode, which indicates the physical key (thus returning A and a as the same key) and Shift, which indicates the state of shift+key and therefore returns either A or a.

If you need to test for the Shift argument, you can use the AgEShiftValues constants which define the bits within the argument. The constants act as bit masks that you can use to test for any combination of keys.

 

In VB.NET the KeyUp event is shown as  "xxxxxxxx_KeyUpEvent" in the IDE.

Example

[Visual Basic .NET] Copy Code
Private Sub AxAgUiAxGfxAnalysisCntrl1_KeyUpEvent( _
                            ByVal sender As Object, _
                            ByVal e As AxAGI.STKX.IAgUiAxGfxAnalysisCntrlEvents_KeyDownEvent) _
                  Handles AxAgUiAxGfxAnalysisCntrl1.KeyUpEvent

    If (e.keyCode = System.Windows.Forms.Keys.A) And ((e.shift And AGI.STKX.AgEShiftValues.eCtrlPressed) > 0)
        ' CTRL-a is released!
        ...
    End If

End Sub

See Also

© 2017 Analytical Graphics, Inc. All Rights Reserved.

STK 11.2.1 Programming Interface