Skip to content

Instantly share code, notes, and snippets.

@baba-s
Created March 20, 2024 04:26
Show Gist options
  • Save baba-s/0de5ce4905cd9553fc53dd24695ece89 to your computer and use it in GitHub Desktop.
Save baba-s/0de5ce4905cd9553fc53dd24695ece89 to your computer and use it in GitHub Desktop.
using UnityEditor;
using UnityEditor.ShortcutManagement;
using UnityEngine;
namespace Kogane.Internal
{
internal static class UndoRedoShortcuts
{
[Shortcut( "Kogane/Undo Redo Shortcuts/Undo", KeyCode.Mouse3 )]
private static void PerformUndo()
{
Undo.PerformUndo();
}
[Shortcut( "Kogane/Undo Redo Shortcuts/Redo", KeyCode.Mouse4 )]
private static void PerformRedo()
{
Undo.PerformRedo();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment