Input.GetKeyDown not working in windows build

I am trying to cycle through parameters in a material to change textures and emission settings in my app. When I test the build in unity it all works great, but when I build the .EXE file the W and E key inputs do no work at all. I am new to coding so this is completely stumping me. Here is my code…

{

public ParticleSystem particleLauncher; 
public Texture[] albedoTextures;
public Texture[] emissionTextures;

Material main_Material;
private int emitToggle = 0;

private int index = 0;
private int indexE = 0;

void Awake()
{
   
}

void Start()
{
   main_Material = GetComponent<Renderer>().material;
}

void ResetIndex()
{
    index = 0;
}

void ResetIndexE()
{
    indexE = 0;
}

 void Update()
{

    if (Input.GetButton("Fire1"))
    {
        particleLauncher.Emit(1);
    }

    if (Input.GetKeyDown(KeyCode.Q))
    {
            if (index < albedoTextures.Length)
        {
            index += 1;
        
            main_Material.SetTexture("_MainTex", albedoTextures[index]);    
        }
        else if (index == albedoTextures.Length)
        {
            ResetIndex();
        }
        else
        {
            index = 0;
        }
    }

    if (Input.GetKeyDown(KeyCode.W))
    {  

        if (indexE < emissionTextures.Length)
        {
            indexE += 1;
            Debug.Log(emissionTextures[indexE]);
            main_Material.SetTexture("_EmissionMap", emissionTextures[indexE]);
         
        }
        else if (indexE == emissionTextures.Length)
        {
            ResetIndexE();
        }
        else
        {
            indexE = 0;
        }

    }

    if (Input.GetKeyDown(KeyCode.E))
    {

        if (emitToggle == 0)
        {
            main_Material.EnableKeyword("_EMISSION");
            emitToggle = 1;
        }
        else if (emitToggle == 1)
        {
            main_Material.DisableKeyword("_EMISSION");
            emitToggle = 0;
        }           
    }

}

}

I figured it out. One thing I forgot to mention is that its the emission at runtime I am trying to get working. Well Unity has a very weird quirk where it will not compile _EMISSION by default.

Taken from this unity answers link Emission at run time works in Editor, but not in build - Questions & Answers - Unity Discussions

When you build a standalone player however, Unity will only compile the shaders that are referenced by objects in your scene. So in case you don’t already have emissive materials in your scene (not set at runtime), your code will call for a shader that hasn’t been compiled.

This should usually be circumvented through the use of ShaderVariantCollection, but that did not work in our case. What we did was to add a simple cube to the scene with an emissive material. This caused the compiler to deliver the needed shader for the standalone player.

I did this and it worked.