Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8079801

java.awt.Window 'control-shift-F1' shortcut should be configurable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u45
    • client-libs
    • x86_64
    • windows_7

      A DESCRIPTION OF THE REQUEST :
      In java/awt/Window.java there is a hook in the function 'preProcessKeyEvent()' that prints all the child components to System.out every time the 'Ctrl+Shift+F1' keyboard combination is pressed. This hard-coded short-cut is quite annoying for an application that uses Ctrl+Shift+F1 as a common short-cut - the console output fills up with component dumps. This is especially noticeable when performing automated GUI testing that uses the short-cut frequently.

      I would suggest that either:

      a) It is turned off by default, and can be turned on via a system property (eg, java.awt.debug=true)

      b) It is turned on by default, but can be turned off via a system property

      c) It uses java.util.logging framework so that it can be disabled by configuration

      d) It is removed completely

      It seems that having a hard-coded shortcut that prints debugging information to System.out is not something that Java/JRE typically does - feels a little out of character.


      JUSTIFICATION :
      In java/awt/Window.java there is a hook in the function 'preProcessKeyEvent()' that prints all the child components to System.out every time the 'Ctrl+Shift+F1' keyboard combination is pressed. This hard-coded short-cut is quite annoying for an application that uses Ctrl+Shift+F1 as a common short-cut - the console output fills up with component dumps. This is especially noticeable when performing automated GUI testing that uses the short-cut frequently.

      It also seems that having a hard-coded shortcut that prints debugging information to System.out is not something that Java/JRE typically does - it seems a little out of character.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expect that this would only be enabled via some type of debug setting or logging configuration.
      ACTUAL -
      There is no way to prevent the component dump from printing to System.out when the key combination is pressed.

      ---------- BEGIN SOURCE ----------
      N/A. Can't write a test that asserts System.out.

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None found

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: