# ReserveModifiersAttribute(ShortcutModifiers)

> Creates an attribute that reserves a modifier for a single shortcut.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor.ShortcutManagement](/engine/6000.7/script-reference/unityeditor/shortcutmanagement.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public ReserveModifiersAttribute(ShortcutModifiers modifiers)
```

### Parameters

**** (\[ShortcutModifiers]\(/engine/6000.7/script-reference/unityeditor/shortcutmanagement/shortcutmodifiers)): One or more modifiers to reserve.

### Examples

```csharp
using UnityEditor;
using UnityEditor.ShortcutManagement;
using UnityEngine;

public class CustomSceneViewNavigation : ScriptableSingleton<CustomSceneViewNavigation>
{
    bool moveForward;
    bool moveBack;
    bool boost;

    [ClutchShortcut("Custom Scene Navigation/Move Forward", KeyCode.KeypadMinus)]
    [ReserveModifiers(ShortcutModifiers.Shift)]
    static void MoveForward(ShortcutArguments args)
    {
        instance.moveForward = args.stage == ShortcutStage.Begin;
    }

    [ClutchShortcut("Custom Scene Navigation/Move Back", KeyCode.KeypadPlus)]
    [ReserveModifiers(ShortcutModifiers.Shift)]
    static void MoveBack(ShortcutArguments args)
    {
        instance.moveBack = args.stage == ShortcutStage.Begin;
    }

    private void OnEnable()
    {
        SceneView.duringSceneGui += DuringSceneGUI;
    }

    private void OnDisable()
    {
        SceneView.duringSceneGui -= DuringSceneGUI;
    }

    void DuringSceneGUI(SceneView view)
    {
        boost = Event.current.shift;

        var speed = boost ? 5 : 1;
        var direction = Vector3.zero;

        if (moveForward)
            direction += view.camera.transform.forward;

        if (moveBack)
            direction += -view.camera.transform.forward;

        view.pivot += direction.normalized * Time.smoothDeltaTime * speed;
    }
}
```
