Gets and identifies key presses in delphi.