Is there a function to take a single character from the keyboard?

Using a LibreOffice form containing a listbox, I can easily set up an event on the listbox to call a Basic macro when a key is released. However there does not seem to be any way for this macro to find out which key was pressed.

Hi - You can do:

Sub InfoKey(oEvent)

dim sMsg as string

with oEvent
	sMsg = "Modifiers: " & .Modifiers & chr(13)
	sMsg = sMsg & "KeyCode: " & .KeyCode & chr(13)
	sMsg = sMsg & "KeyChar: " & .KeyChar & chr(13)
	sMsg = sMsg & "KeyFunc: " & .KeyFunc
end with

msgbox sMsg

End Sub

See API info.