 <p>From <a href="https://docs.oracle.com/javase/8/docs/api/java/awt/KeyEventDispatcher.html" rel="nofollow">the documentation for <code>dispatchKeyEvent</code></a>:</p> <blockquote> <p>Return <code>true</code> if the KeyboardFocusManager should take no further action with regard to the KeyEvent; <code>false</code> otherwise</p> </blockquote> <p>Also you can directly consume the event in your <code>dispatchKeyEvent</code> implementation when no further processing of the event is required.</p> <pre><code>e.consume(); </code></pre> <p>Suggestion of @MadProgrammer is also important. Using of global event processing possibilities is the last choice.</p>