Create 'Shortcut' In C#

I don’t remember what its called but I remember doing it somewhere.

I want to set a ‘shortcut’ for specific code so I dont have to type it out every time I need it.

Ex: string dbug = Debug.Log();

or: string gkdown = Input.GetKeyDown;

with the gkdown i could do if(gkdown(keycode.W){//Code}

It’s called teamplates or snippets.
In MonoDevelop, you’ll find it under Text Editor / Code Templates in the Preferences.

you mean delegates.

System.Action<string> dbug = Debug.Log;
System.Action<KeyCode> gkdown = Input.GetKeyDown;

@hexagonius

I get an error for the KeyCode one and don’t know what it means

A method or delegate ‘bool UnityEngine.Input.GetKeyDown(UnityEngine.KeyCode)’ return type does not match delegate ‘void System.Action(UnityEngine.KeyCode)’ return type

@UnityCoach

I didn’t see anything like what hexagonius said in the code templates

Edit: Or do you mean to create my own snippet thing?