What Do I Do If Characters Cannot Be Entered or Deleted in the Text Box, and the Background Reports the "java.lang.RuntimeException: java.awt.event.KeyEvent" Error?

Symptom

When a user uses a Windows device to remotely connect to MindStudio on a Linux device through another Windows device, characters cannot be entered or deleted in the text box, and the background reports the "java.lang.RuntimeException: java.awt.event.KeyEvent" error.

Figure 1 Error example

Fault Analysis

Keyboard mapping exists between Windows remote connection and X11 forwarding. If the mapping is incorrect, keyboard inputs cannot be correctly identified.

Solution

  1. Run the following commands to install the X11 dependency based on the Linux OS type:
    • Ubuntu:
      apt-get install -y xterm xorg x11-apps libxtst-dev libxext-dev libxrender-dev
    • CentOS:
      yum install -y xorg-x11-apps xterm libXext libXtst libXrender
  2. Configure the X11 option on MobaXterm.
    1. Run the localectl command in Linux to view the keyboard configuration of the device. Information similar to the following is displayed:
      System Locale: LANG=en_US.UTF-8
      LANGUAGE=en_US:en
      VC Keymap: n/a
      X11 Layout: cn
      X11 Model: pc105
    2. On the MobaXterm page, choose Settings > Configuration from the menu bar. In the displayed MobaXTerm configuration window, click the X11 tab, deselect Unix-compatible Keyboard, and set Keyboard to the X11 Layout value obtained in 2.a. For details, see Figure 2.
      Figure 2 X11 configuration window
    3. Click OK to complete the configuration and restart MindStudio.