I'm doing an input system to my game with DX8. I use DInput to check if a key has been pressed:

If data(xi).lOfs And data(xi).lData = bDown Then
g_TypedLetter = data(xi).lOfs
End If

Then my app checks what key was pressed:
Select Case g_TypedLetter
Case DIK_A
newChar = "a"
Case DIK_B
newChar = "b"
Case DIK_C
newChar = "c"
Case DIK_D
newChar = "d"
etc..

How can be the conversion from long -> string be optimized?
And how should be shift+alt keys handled? I can already do uppercase letters with caps lock and both shift buttons, but how to get other symbols (e.g. "(", "{") out of the keyboard?