I don't have much knowledge on this, but I did buy a book that I haven't yet had time to read in detail, that may help.
You can use DirectInput, from DirectX. I think you need the Delphi version of DirectX headers which you can get from the JEDI group webpage. Come to think of it, the JEDI website may (or may not) give you more help.