question: private void restoreFromKeypress ( final KeyEvent keyEvent , final int keyNumber ) { if ( keyEvent . isAltDown ( ) ) { final int arrayIndex = ( keyNumber > 0 ? keyNumber : MAX_RECENT_MESSAGES ) - 1 ; if ( arrayIndex < recentMessages . size ( ) ) { displayMessage ( recentMessages . get ( arrayIndex ) ) ; } keyEvent . consume ( ) ; } }
target:  Restores message from the key event.