modified keyscan code - release testing