Occasionally, we can add some shortcuts to the user, no matter where the focus is. There is a way to register your listener on any set, but obviously, this is not a good practice Java's Toolkit to add a listener directly. That is the example Toolkit Toolkit = Toolkit.GetDefaultToolkit (); Toolkit.AddawteventListener (Caplistener, AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK); implement a listener: class CapListener implements AWTEventListener {public void eventDispatched (AWTEvent event) {}} This allows the