Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Can't disable ime keyboard for text input

Discussion in 'Input System' started by jaykayey, Aug 24, 2022.

  1. jaykayey

    jaykayey

    Joined:
    Nov 24, 2018
    Posts:
    3
    So I tried using Unity's "Input.imeCompositionMode = IMECompositionMode.Off;" to disable the use of ime keyboard, but it still lets me type in korean characters into the text input field. I even made a custom validator to return a null character if the user types while Input.imeIsSelected is set to true. That helped a little as now it prevents any korean characters from being added after the first character. The issue is that it can't seem to stop the first korean character from appearing. Anyone encounter this issue before?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,915
    What platform and version of unity are you using? We have fixed some ime bugs recently that could be related. Can you file a bug report so we look into your issue?
     
  3. jaykayey

    jaykayey

    Joined:
    Nov 24, 2018
    Posts:
    3
    Hey Karl!

    We're trying to get this to work on PC and we're using Unity 2019.4.37f1. I'll file a bug report
     
    karl_jones likes this.
  4. jaykayey

    jaykayey

    Joined:
    Nov 24, 2018
    Posts:
    3
    Okay so I found the solution to the issue. I tried calling this line "Input.imeCompositionMode = IMECompositionMode.Off;" in Start, Awake, and OnEnable functions and they never worked. Turns out that TMP_InputField changes the imeCompositionMode value AFTER all those functions run via LateUpdate:
    upload_2022-8-26_11-10-2.png

    Unfortunately I had to also put the "Input.imeCompositionMode = IMECompositionMode.Off;" in a separate LateUpdate to reverse that change
     

    Attached Files: