What do you mean by "alternating"?
That term usualy mean a toggle like action. If that's the case, do you have any keyboard shortcut manager active? Check it's settings, maybe you set some action to those keys.
Do you mean that you get an "Y" when you press the "Z", and a "Z" when you press the "Y"?
Usualy, the Z is the leftmost letter of the bottom row or the second leftmost top row letter on an AZERTY keyboard, and the Y is on the top row next to the T on both QWERTY and AZERTY.
The keycaps may have been interverted. Remove them and replace them in the correct positions.
Check your keyboard layout. It could be set to Dvorak or some national configuration to be used with some other alphabet. Set it back to the correct configuration. You access that from the controll pannel.
Electro, August 2012