Adaug proiectul Unity

This commit is contained in:
2026-11-01 23:39:55 +02:00
parent cb14d9d37d
commit 863eac8f2c
23463 changed files with 5412601 additions and 0 deletions
@@ -0,0 +1,29 @@
using System.Runtime.InteropServices;
using UnityEngine;
namespace Unity.CodeEditor
{
internal static class Keyboard
{
internal static bool IsKeyPressed(Event e, KeyCode keyCode)
{
if (e == null)
return false;
return e.type == EventType.KeyDown
&& e.keyCode == keyCode;
}
internal static bool IsControlOrCommandKeyPressed(Event e)
{
if (e == null)
return false;
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
return e.type == EventType.KeyDown && e.command;
return e.type == EventType.KeyDown && e.control;
}
}
}