added field class, handle key presses