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

Virtual Keyboard location and scaling is wrong on multiple monitors with mixed resolution

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      openJFX 15.0.2
      java 11.0.9

      A DESCRIPTION OF THE PROBLEM :
      When using the virtual keyboard on a multi-monitor system which has monitors of mixed resolutions the keyboard is displayed in the wrong location. It appears that calculations for the location and scale are relying on the traits of the primary display only, and not accounting for the display on which the stage is actually located.

      This happens on All OSes based on my testing (windows 10, ubuntu 18 and 20) with the latest updates

      It should be noted that supplying the virtual keyboard type of `native` as an argument still results in the javafx virtual keyboard, so this keyboard is the only option in most cases. There also isn't any way for me to adjust this location in a meaningful way due to the closed nature of this class (FXVK)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      You need a setup with multiple monitors, my configuration has monitors of different resolutions/DPIs. (16in macbook pro retina, a 1440, and a 1080 monitor)
      Create a javafx application with a text field and enable the javafx virtual keyboard. move the stage around to different displays toggling the focus of the text field on each one and observe that the keyboard doesn't appear in the correct location and the correct scale.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The javafx virtual keyboard should appear anchored to the bottom of the screen the stage is on. Moving the stage to a new screen or simply around on the screen should result in the keyboard remaining anchored to the bottom of the screen the stage is on. If the stage moves to a new screen the virtual keyboard should move to that screen.
      ACTUAL -
      The keyboard location is calculated (incorrectly) in relation to the stages current position, then never updates, meaning it follows the stage around on a single monitor. If you have multiple (mixed resolution) screens and move the stage off of the primary screen the keyboard should anchor itself with the correct scaling to the target screen

      CUSTOMER SUBMITTED WORKAROUND :
      There is no workaround due to the closed nature of the FXVK implementation.

      FREQUENCY : always


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

              Created:
              Updated: