ArcObjects Library Reference  (SystemUI)    

ITool.OnKeyUp Method

Occurs when a key on the keyboard is released when this tool is active.

[Visual Basic 6.0]
Sub OnKeyUp(
    ByVal keyCode As Long, _
    ByVal shift As Long _
)
[Visual Basic .NET]
Public Sub OnKeyUp ( _
    ByVal keyCode As Integer, _
    ByVal shift As Integer _
)
[C#]
public void OnKeyUp (
    int keyCode,
    int shift
);
[Java]
public void onKeyUp (
    int keyCode,
    int shift
)
throws
    IOException,
    AutomationException
[C++]
HRESULT OnKeyUp(
  long keyCode,
  long shift
);
[C++]

Parameters

keyCode [in]

  keyCode is a parameter of type long

shift [in]

  shift is a parameter of type long

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

keyCode specifies which key on the keyboard was released.

Shift indicates whether the Shift key, Ctrl key, or Alt key was pressed when the mouse button was pressed. 0 for no keys pressed. 1 for Shift key pressed. 2 for Ctrl key pressed. 4 for Alt key pressed. If both the Shift key and the Ctrl key were pressed, Shift would be 3. If all three keys were pressed, Shift would be 7.

Remarks

When implementing ITool to create a custom tool, write the code that performs the action when a key on the keyboard is released when this tool is the active tool in the OnKeyUp method.

[Visual Basic 6.0]

Private Sub ITool_OnKeyUp(ByVal keyCode As Long, ByVal Shift As Long)
  ' Add some code to do some action when a keyboard button is released.
  ' This example changes the statusbar message.
  ' m_pApp is set in ICommand_OnCreate.
  m_pApp.StatusBar.Message(0) = "ITool_OnKeyUp"
End Sub

See Also

ITool Interface

Example

ITool Example

 


Feedback Send feedback on this page