> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionIso11783OPOnKeyActivation

[Open topic with navigation](../../../../../../CANoeDEFamily.htm#Topics/CAPLFunctions/ISO11783/ISONodeLayer/Functions/CAPLfunctionIso11783OPOnKeyActivation.md)

**CAPL Functions** » [ISO11783](../../CAPLfunctionsISO11783Overview.md) » [ISO11783 Node Layer](../CAPLfunctionsISONLOverview.md) » Iso11783OPOnKeyActivation

# Iso11783OPOnKeyActivation (Callback)

[Valid for](../../../../Shared/FeatureAvailability.md):  CANoe DE • CANoe4SW DE

## Function Syntax

```plaintext theme={null}
void Iso11783OPOnKeyActivation( dword ecuHandle, 
 dword objectID, dword parentID, dword keyCode, dword activation );
```

## Description

The function is called by the node layer, if the user presses a soft key or button.

## Parameters

* **ecuHandle**: Handle of the ECU
* **objectID**: Object ID of a soft key or button object
* **parentID**: Object ID of the mask object
* **keyCode**: Code of the soft key or button
* **activation**: Activation code
  * 0: Key is release
  * 1: Key is pressed
  * 2: Key is held
  * 3: Press is canceled

## Return Values

—

## Example

```plaintext theme={null}
void Iso11783OPOnKeyActivation( dword handle, dword object ID, dword parentID, dword keyCode, 
 dword activation )
{
  if (activation == 1) {
    switch(keyCode) {
      case 1: DoSometing1(); break;
      case 2: DoSometing2(); break;
    }
  }
}
```
