# FunctionKey

> Determines whether the current key press is a function key.

## Definition

* **Type:** Field
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
FunctionKey = 64
```

### Remarks

Function keys include the arrow keys, backspace, page up/down, as well as most non-printable keys.

Additional Resources: [Event.functionKey](/engine/6000.7/script-reference/unityengine/event/functionkey.md).

### Examples

```csharp
using UnityEngine;
using UnityEngine.UIElements;

[RequireComponent(typeof(UIDocument))]
public class Example : MonoBehaviour
{
    // Detects if a function Key was pressed. If a
    // function key was pressed, prints its key code.

    void OnEnable()
    {
        var textField = new TextField();
        textField.RegisterCallback<KeyDownEvent>(e =>
        {
            if ((e.modifiers & EventModifiers.FunctionKey) != 0)
            {
                Debug.Log("Pressed: " + e.keyCode);
            }
        }, TrickleDown.TrickleDown);
        GetComponent<UIDocument>().rootVisualElement.Add(textField);
    }
}
```
