TrueTypeFont trueTypeFont = new TrueTypeFont(font, false);
int code;
do{
Display.update();
trueTypeFont.drawString(10, 18, "Press a KEY for " + place, 1, -1);
trueTypeFont.drawString(10, 34, "Last assign was " + Keyboard.getKeyName(lastkey), 1, -1);
trueTypeFont.drawString(10, 50, "Press ESC or close to cancel", 1, -1);
Keyboard.next();
if(Display.isCloseRequested() || Keyboard.getEventKey() == Keyboard.KEY_ESCAPE)
code = lastkey;