Altera DE1 Board Read KEY?
1) Fix the IF logic as Makjenko says.

2) "&amp;" isn't the AND operator. It's combining elements into a vector. If KEY(0) and KEY(1) were both '1', you'd get an A value of "11", not 1.  In fact, that code shouldn't compile. Make A, B, and C std_logic instead of std_logic_vector, and assign them as:

A &lt;= KEY(0) and KEY(1);


Then you can use:

if (A = '1') then


OR, leave as is and compare A with "11", etc.

3) What uses D?  If you had code like that with nothing using D...  the entire code section would be optimized away as not doing anything useful. Create an OUT signal in the port map, and assign D to it. Then, make sure to assign that to a pin somewhere.

4) I also don't think you have the right stuff in the sensitivity list. While it should be true that if KEY changes A,B, and C do...  I wouldn't trust a synthesis tool to do the right thing there.  Put (A,B,C) in the sensitivity list.

5) Make sure of the polarity of the KEY inputs. Can you get things to work if you only use one key press? A key press may be "0"... I know most of mine are.

Oh, and as Majenko says definitely indent your code.