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

Touch keyboard is not shown for text components on a screen touch

    Details

    • Subcomponent:
    • Resolved In Build:
      b29
    • OS:
      windows_8, windows_10

      Backports

        Description

        FULL PRODUCT VERSION :
        JDK 10, JDK 9, JDK 8, JDK 7, JDK 6

        ADDITIONAL OS VERSION INFORMATION :
        MS Windows 10 OS, MS Windows 8.1 OS

        A DESCRIPTION OF THE PROBLEM :
        Touch keyboard which is specific to MS Windows 10, MS Windows 8.1, MS Windows 8 OSes is not automatically shown, when a user touches Swing or AWT text components with text editing functionality, while other native applications provide automatic showing of the touch keyboard, for example MS Edge, Firefox browsers.

        Screenshots:
        1. Correct behaviour - An example of the touch keyboard shown on a touch of URL editing field (address bar) in MS Edge 40 browser on MS Windows 10 OS is demonstrated on the attached screenshot "TouchKeyboardShownInEdgeOnWin10.jpg".
        2. Incorrect behaviour – Not showing of the touch keyboard on a touch of "javax.swing.JTextField" component in JDK 9 b149 on MS Windows 10 OS is demonstrated on the attached screenshot "TouchKeyboardNotShownInJDK9b149OnWin10.jpg".

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Make sure that Windows 8 or later is installed on the host.
        2. Make sure that a display with the touch screen is connected to the host.
         
           OR
         
        If the touch screen is absent, make sure that all keyboards can be disconnected from the host. Please note that a notebook cannot be used for this purpose, because at least one keyboard is connected to it always.

        3. Go to "Windows -> Settings -> Devices -> Typing -> Touch keyboard" and turn on the option "Automatically show the touch keyboard in windowed apps when there's no keyboard attached to your device".

        4. Compile and run the test case attached as "TouchKeyboardAutoShowTest.java" file.
        5. If the display with touch screen is present, touch any Swing or AWT text component shown in the window of the test case, otherwise, disconnect all keyboards from the host and click into any Swing or AWT text component in the test case window. The issue is reproduced, if no touch keyboard is shown.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED - When you touch any text input area such as JTextField or JTextArea, a touch keyboard should pop up.
        ACTUAL - The touch keyboard doesn't show up as expected.
        1. TouchKeyboardAutoShowTest.java
          11 kB
          Anton Litvinov
        2. W10.xlsx
          281 kB
          Andrew Wang
        1. TouchKeyboardNotShownInJDK9b149OnWin10.jpg
          184 kB
        2. TouchKeyboardShownInEdgeOnWin10.jpg
          177 kB

          Issue Links

            Activity

            Hide
            arusakov Andrey Rusakov (Inactive) added a comment -
            Native applications support check.

            Firefox 47: Screen keyboard not working
            Firefox 50: Screen keyboard works fine
            Chrome 54, 55: Screen keyboard not working
            cmd,powershell: Screen keyboard not working
            notepad and gui: Screen keyboard works fine
            Java 8u111: Screen keyboard not working for all text inputs.
            Everything works fine if keyboard is set to be always visible.
            Show
            arusakov Andrey Rusakov (Inactive) added a comment - Native applications support check. Firefox 47: Screen keyboard not working Firefox 50: Screen keyboard works fine Chrome 54, 55: Screen keyboard not working cmd,powershell: Screen keyboard not working notepad and gui: Screen keyboard works fine Java 8u111: Screen keyboard not working for all text inputs. Everything works fine if keyboard is set to be always visible.
            Hide
            alitvinov Anton Litvinov added a comment -
            Three following files were attached to the bug record:
            1. "TouchKeyboardAutoShowTest.java" - the compilable test case.
            2. "TouchKeyboardShownInEdgeOnWin10.jpg" - screenshot demonstrating the correct behaviour.
            3. "TouchKeyboardNotShownInJDK9b149OnWin10.jpg" - screenshot demonstrating the issue in JDK 9 b149.
            Show
            alitvinov Anton Litvinov added a comment - Three following files were attached to the bug record: 1. "TouchKeyboardAutoShowTest.java" - the compilable test case. 2. "TouchKeyboardShownInEdgeOnWin10.jpg" - screenshot demonstrating the correct behaviour. 3. "TouchKeyboardNotShownInJDK9b149OnWin10.jpg" - screenshot demonstrating the issue in JDK 9 b149.
            Hide
            alitvinov Anton Litvinov added a comment -
            On 12/19/2016 the environment with the emulated touch screen was created. The touch screen was emulated by means of "Windows Simulator" tool from MS Visual Studio 2015 on MS Windows 10 Professional 64-bit OS. The issue could not be reproduced in Edge, IE 11, Firefox 50.1.0 browsers. Was able to reproduce the issue with JDK 9 b149, JDK 8u112 b15, JDK 7u121 b15, JDK 6u131 b14.

            During the research of this issue it was defined that:
            1) By default, Windows 8 touch keyboard does not appear automatically, when focus is placed on an edit control in a desktop program.
            2) To activate the touch keyboard from the desktop application the following 2 approaches can be used.

            2.1) Approach #1. To use Windows COM object implementing the interface "IInputPanelConfiguration" with its method "EnableFocusTracking()".
            - Documentation on the interface: https://msdn.microsoft.com/en-us/library/windows/desktop/jj126267(v=vs.85).aspx
            - Article on usage of the interface: https://blogs.msdn.microsoft.com/oldnewthing/20150601-00/?p=45481/

            Conclusion about the approach:
            - This approach is not acceptable, because according to Win32 API documentation, the interface does not work in Windows 10. Also this approach is not applicable completely for lightweight UI components - Swing components.

            2.2) Approach #2. To launch the system application "TabTip.exe" which implements the touch keyboard and is located in the directory "C:\Program Files\Common Files\Microsoft Shared\Ink". Starting this application leads to raising of the touch keyboard. This approach is often reported by third-party software producers as the applied solution for this issue, also this approach was implemented in Firefox browser for resolution of the identical issue.
            - Microsoft documentation which mentions "TabTip.exe" application and states that starting this process is a possible way of invocation of the Text Input Panel, also known as the touch keyboard.
                URL: https://msdn.microsoft.com/en-us/library/windows/desktop/ms701746(v=vs.85).aspx
            - Article written by the Intel developer which presents a sample application, which implements this approach.
                URL: https://software.intel.com/en-us/blogs/2013/06/11/touch-keyboard-access-for-windows-8-desktop-apps

            Conclusion about the approach:
            - This approach looks as the only possible solution for addition of support of automatic showing of the touch keyboard on touches of both heavyweight AWT and lightweight Swing text components. However, the solution has to also implement processing of system window messages related to the touch input, for example "WM_TOUCH" message.
            Show
            alitvinov Anton Litvinov added a comment - On 12/19/2016 the environment with the emulated touch screen was created. The touch screen was emulated by means of "Windows Simulator" tool from MS Visual Studio 2015 on MS Windows 10 Professional 64-bit OS. The issue could not be reproduced in Edge, IE 11, Firefox 50.1.0 browsers. Was able to reproduce the issue with JDK 9 b149, JDK 8u112 b15, JDK 7u121 b15, JDK 6u131 b14. During the research of this issue it was defined that: 1) By default, Windows 8 touch keyboard does not appear automatically, when focus is placed on an edit control in a desktop program. 2) To activate the touch keyboard from the desktop application the following 2 approaches can be used. 2.1) Approach #1. To use Windows COM object implementing the interface "IInputPanelConfiguration" with its method "EnableFocusTracking()". - Documentation on the interface: https://msdn.microsoft.com/en-us/library/windows/desktop/jj126267(v=vs.85).aspx - Article on usage of the interface: https://blogs.msdn.microsoft.com/oldnewthing/20150601-00/?p=45481/ Conclusion about the approach: - This approach is not acceptable, because according to Win32 API documentation, the interface does not work in Windows 10. Also this approach is not applicable completely for lightweight UI components - Swing components. 2.2) Approach #2. To launch the system application "TabTip.exe" which implements the touch keyboard and is located in the directory "C:\Program Files\Common Files\Microsoft Shared\Ink". Starting this application leads to raising of the touch keyboard. This approach is often reported by third-party software producers as the applied solution for this issue, also this approach was implemented in Firefox browser for resolution of the identical issue. - Microsoft documentation which mentions "TabTip.exe" application and states that starting this process is a possible way of invocation of the Text Input Panel, also known as the touch keyboard.     URL: https://msdn.microsoft.com/en-us/library/windows/desktop/ms701746(v=vs.85).aspx - Article written by the Intel developer which presents a sample application, which implements this approach.     URL: https://software.intel.com/en-us/blogs/2013/06/11/touch-keyboard-access-for-windows-8-desktop-apps Conclusion about the approach: - This approach looks as the only possible solution for addition of support of automatic showing of the touch keyboard on touches of both heavyweight AWT and lightweight Swing text components. However, the solution has to also implement processing of system window messages related to the touch input, for example "WM_TOUCH" message.
            Show
            alitvinov Anton Litvinov added a comment - Review thread: http://mail.openjdk.java.net/pipermail/awt-dev/2017-August/012966.html
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk10/client/rev/3b244a98d5ab
            User: alitvinov
            Date: 2017-10-11 14:57:01 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk10/client/rev/3b244a98d5ab User: alitvinov Date: 2017-10-11 14:57:01 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk10/master/rev/3b244a98d5ab
            User: prr
            Date: 2017-10-19 18:50:32 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk10/master/rev/3b244a98d5ab User: prr Date: 2017-10-19 18:50:32 +0000

              People

              • Assignee:
                alitvinov Anton Litvinov
                Reporter:
                shadowbug Shadow Bug
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: