Keydown listener for UI

Is there a way to setup a Listener which catches Key Down events in the whole UI?

I have found only Helptopics for a Textfield so far. I would like to use a barccode scanner with my vaadin application. A barcode scanner is just like a keyboard, which emulates a pressed key.