Or you can go yet another step further and get slick, and use it's keyboard function, which names all the keys right out.
it looks sorta like:
and its mouse code looks like:
and you can use
for mouse coordinates.
That's also how LWJGL does it.
That code was inherited from LWJGL, not built into Slick.
Also, Slick is being phased out, as it seems to not be dev'd for anymore. It seems to be that people who are using it in their existing projects are staying with it, but starting a new project with it at this point in time doesn't sound to be the best of ideas.