Author Topic: MAC Input Issues  (Read 7430 times)

rterranova

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
MAC Input Issues
« on: May 09, 2013, 12:02:26 PM »
On MAC web player the input field does not register the delete key press or the tab key press.

I have seen a couple of post addressing this problem, and you mentioned that this is a Unity 4.x issue, but I cannot find anything on the Unity forms saying they are seeing issues.  Do you know where I can find a mention of this issue?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: MAC Input Issues
« Reply #1 on: May 10, 2013, 12:05:56 AM »
I don't have a link on hand. It is indeed a Unity issue, and if you want to be sure -- submit another bug, but don't use the word NGUI in it. Instead create a very simple stand-alone project (without NGUI) that simply listens to Input.inputString. Backspace will show up as '\b' everywhere except Mac web player.

grrava

  • Guest
Re: MAC Input Issues
« Reply #2 on: May 31, 2013, 08:43:05 AM »
Hello,

In several posts you say this is a Unity bug, however i tested this, on all platforms I receive the backspace just fine. So is it possible this is a bug in NGUI after all?

  1. string input = Input.inputString;
  2. if(Input.GetKey(KeyCode.Backspace))
  3.         Debug.LogError ("Backspace pressed");
  4. foreach(char c in input)
  5. Debug.LogError ("Received: " + (int)c);
  6.  

If I press backspace, I get "Backspace pressed" 4 times and once "Received: 8", both on mac and windows.

So the backspace does register, however, not in a NGUI input...

I'm a missing somthing perhaps?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: MAC Input Issues
« Reply #3 on: May 31, 2013, 02:03:08 PM »
This bug is in the mac web player. Unity Editor works just fine.

grrava

  • Guest
Re: MAC Input Issues
« Reply #4 on: June 02, 2013, 06:43:13 AM »
Yes I know, the results are from the MAC webplayer and the Win Webplayer...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: MAC Input Issues
« Reply #5 on: June 02, 2013, 06:24:26 PM »
From which version of Unity?

grrava

  • Guest
Re: MAC Input Issues
« Reply #6 on: June 03, 2013, 02:34:26 AM »
Unity version is pro 4.1.3, both editor and webplayers.

I found some other posts in this forum about UIInput, and found a discussion about the Input.imeCompositionMode. In the test code I provided earlier you see that I do not change the input mode, so I changed the test class:

  1. public class InputTest : MonoBehaviour {
  2.        
  3.         void Start() {
  4.                 Input.imeCompositionMode = IMECompositionMode.On;
  5.         }
  6.  
  7.         void Update () {
  8.                 string input = Input.inputString;
  9.                 if(Input.GetKey(KeyCode.Delete))
  10.                         Debug.LogError ("Delete pressed");
  11.                 if(Input.GetKey(KeyCode.Backspace))
  12.                         Debug.LogError ("Backspace pressed");
  13.                 if(Input.GetKey(KeyCode.Tab))
  14.                         Debug.LogError ("Tab pressed");
  15.                 foreach(char c in input)
  16.                         Debug.LogError ("Received: " + (int)c);
  17.         }
  18. }
  19.  

The results are these:

  • windows, firefox: Input.GetKey does receive events (however, we don't want that since the IME mode is on??) Backspace has value 8, Tab has none, Delete has none
  • mountain lion osx, chrome & firefox: Input.GetKey does not receive events (which is good), Backspace has no value, Tab has 9, Delete has none.

So, buggy Unity after all, I just missed the imeComposition thingy. I'll try to fix this and if I find a working solution I'll post it here.

Sorry for the confusion and thanks for the help.





CWolf

  • Guest
Re: MAC Input Issues
« Reply #7 on: July 26, 2013, 05:44:12 AM »
We're seeing this issue too.  I'm not sure if this has been fixed in Unity yet (as of 4.2 I've not seen it in the release notes) but did you find a work around?