I use the previewKeyDown() function for some controls in my project but they always get called twice for each key press. Anyone who knows how to solve this?

And is there anyway to do a global keylistener in my project?