Sound on imput text

hi
i’m making a game.
I’m trying make it when you enter each letter of your name(at the start),
I want it to make a small cha-chink for each lettrer.

here’s my code so far.

if Key.isDown()
{

if (Number(Key.getCode())> 0) 

            {

Smack.Play()	
		
} 

}