some question about GLUT

I am a beginner in OpenGL program,
when I use GLUT to bulid my program ,firt my progrma is functionly, but When I bulid secondly

the keybord event message can’t handle ,why?

here is my code ,hope someone to help me

 void keybord(unsigned char  key,int x,int y)
{
	switch(key)
	{
	case 'f':
	case 'F':
		mode=GL_FLAT;
		glutPostRedisplay();
		break ;
	case 's':
	case 'S':
		mode=GL_SMOOTH;
		glutPostRedisplay();
		break;
	case 'y':
	case 'Y':
		blight=true;
		glutPostRedisplay();
		break;
	case 'n':
	case 'N':
		blight=false;
		glutPostRedisplay();
		break;
	case 27:
		exit(0);
		break;

	default:
		break;

	}

}

in mani function I have call it use glutKeyboardFunc(keybord);

This keyboard function has no error.Can you please give more information to us?–Can you copy your program here?
-Ehsan-

Don’t crosspost and don’t post a question in advanced when you know it belongs in beginners.