I tried it the other way around but it did not work. It was like this:
Code:
if rising_edge(clk) then
Scan_Dav_Sync(0) <= Scan_Dav;
Scan_Dav_Sync(1) <= Scan_Dav_Sync(0);
Previous_Scan_Dav <= Scan_Dav_Sync(1);
if (Previous_Scan_Dav = '0') and (Scan_Dav_Sync(1) = '1') then
-- do the shifting here
end if;
end if;
EDIT: Also, I want to wait till someone presses Enter to scroll the text. So until enter is pressed, the text is to shift by one digit only when a new scancode is arrived.