--- Quote Start ---
Not sure what you really want to hear - if you have a testbench then you should be able to debug the circuit yourself as you have access to all the waveforms in the simulation.
I will comment that the key presses hold the state machine In the state - and not change the state - is that what you intended?
--- Quote End ---
--------------------------------------------
Thanks Tricky for all your help, i have tried to implement your comment by the having the kery presses to hold the state machine in the same state but i produced a whole lot more latches again.
I am struggling to see how i can get the code working properly. The funny thing about the wave form of the test bench in the previous case was that it gives only a few states of the code "00" and "10"
I will continue to see how i can breakthrough this rock, your comments are still very much welcomed