KeyDown event doesnt trigger with Shift. Other Keys Work

114 Views Asked by At

I´ve got multiple buttons that need to be accessed through KeyDown events in a Windows Form.

I´ve set up some of them without any problems, but when setting the KeyCode to Keys.LShift it just doesn´t fire. (just changing LShift to C works like a charm)

As im able to write this in capital letters I´m certain that my keyboard works fine

Is the Shift key handled differently in any way?

this is my setup:

        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {

            if (e.KeyCode ==Keys.LShiftKey)
            {
                //code doesnt fire
            }

             if (e.KeyCode == Keys.Q)
            {
                //works without problem
            }
        }

Edit: Meant LShiftKey

0

There are 0 best solutions below