keyPressed是键被按下,KeyReleased是键被弹起,这两个都是更底层一些的事件。 KeyTypede是指有字符被输入,比如按住shift,再按A键,如果当时Caps Lock不亮,就产生一个输入大写A的事件。 JavaDoc的KeyEvent类的说明中有详细的描述: KEY_TYPED public static final int KEY_TYPED The "key typed" event. This event is generated when a character is entered. In the simplest case, it is produced by a single key press. Often, however, characters are produced by series of key presses, and the mapping from key pressed events to key typed events may be many-to-one or many-to-many. See Also: Constant Field Values -------------------------------------------------------------------------------- KEY_PRESSED public static final int KEY_PRESSED The "key pressed" event. This event is generated when a key is pushed down. See Also: Constant Field Values -------------------------------------------------------------------------------- KEY_RELEASED public static final int KEY_RELEASED The "key released" event. This event is generated when a key is let up. See Also: Constant Field Values --------------------------------------------------------------------------------