Questions around input and text

I’m making game GUI system, got some questios:
1.For user define control keys, how can I display the defined key names? The getCurrentlyPressedKeys() works fine but I got only int numbers to display.

2.Display game message within a box, I have to break line when message longer than the box. I think I can do this with count letter number until I found that not every letter the same width. How can I get real width of a paragraph, or there are a better way to make text break line?

you can’t.

How about display messages in game screen like debug info in Blender? Can I do this? I saw many people making MMOG here, and this is networkgames must have.