I don’t know about other keys but in a leopard macbook (previous generation) the keys 123 (under the f1f2f3 keys) and ‘w’ are not working.
only asd and arrow keys are working.
in a ingame inputbox they are working… nice.
It’s a Unity bug, any workaround?
There is any known bug list somewhere?
Well, maybe you are right… who bother if the player can’t do fancy things like controlling the game… he can always look at the demo,right?!
Update:
I have now both ‘z’ and ‘w’ key as positive axe. And I’m getting 123 keys with keydown event.
Hoping this works on all keyboard localization under leopard.
UT can you confirm that?
FYI, I tested on a MacBook Pro running OS10.5.5 and get the same results as you get using an iMac running OS 10.4. So I’m not sure what’s going on in your case or whether this has something to do with a MacBook versus a MacBook Pro. But at any rate I’m not sure it’s a generic issue in Unity overall. If anyone else runs across this thread please give the code above a try in a simple new project, what results do you get? I’ll put out a call for testing help with the guys in Copenhagen too, we’ll see what results they get on Tiger and/or with a MacBook.
I don’t have a Windows machine handy here with me to test on at the moment so that too will have to be offered by my colleagues at company HQ. What code are you using to test on Windows? Is that part of an executable or web player content? If web player, what browser(s) and version(s) were you testing? What flavor(s) of Windows did you test on? I just want to get a handle on how/when/where you’re testing on Windows so we can match our testing and results appropriately.
The forums are growing and an incredible rate and it’s getting tougher to stay on top of everything so we not be as immediately responsive to all issues as folks are used to. When that happens, instead of offering thoughts like the above simply ping one of us directly (I’m your best point of contact) and we’ll get someone in there to lend a hand. I know I shared this information with you in particular in another thread but I’m citing it here as well in case others read this thread and not the other.
Do note that we are starting to staff up in order get ahead of the curve with forum traffic. Please see Sam’s post in Announcements about hiring on a new QA/support person, and then also know that we recently hired on full-time sales person (starts in a week or two when he relocates to SF) which will free me up for more forum patrol duty.
And now I’ve heard from one of my colleagues who tested with Unity 2.1 on a MacBook running OS 10.4.11 and got the same results as I did and as you did on the iMac with OS 10.4. So I’m still not sure why your MacBook with OS 10.5 is behaving differently but hopefully the data is helping somewhat.
character 1 keycode Alpha1
character 2 keycode Alpha2
character 3 keycode Alpha3
character w keycode W
Windows XP Pro SP2 IE7 FF3 Windows Vista Home Premium IE7 FF3
character keycode Alpha1
character 1 keycode 0
character keycode Alpha2
character 2 keycode 0
character keycode Alpha3
character 3 keycode 0
character keycode W
character w keycode 0
My Vista computer acts a little strange though in IE7. The Input.inputString never gets input and the cube does not move. But it is registering the events and typing out the correct character and keycode data.
I thought it may be related, but it doesn’t look like it is.
I think the bug is related to non-US macbook keyboard with leopard.
I have tested it with a deployed application “.app”.
Another keyboard bug I found in osx (but I don’t remember if it was with leopard or tiger): if you keep pressed a key (‘w’) then press the ctrl or fn key and release the key (‘w’) you get a keyup event without the keycode.
I don’t know if it’s related but the application was build in tiger and deployed in leopard.
About windows version, I have tested it in a parallels vm xp and in a “real pc” windows 2000, with the same error.
Did you try selecting a different keyboard layout?
IIRC there are two for each language on laptops: A generic one and another one specifically for the MacBook.
I’m using a Microsoft USB keyboard with my Mac and get a choice between the default swiss-german layout and a microsoft swiss-german layout. The second one maps the labels correctly to the function while the first maps the default osx shortcuts.
Anyway, I noticed some applications behave strangely depending on which layout I have selected. Like FinalCut not registering a lot of keys with the generic layout and other applications with the microsoft one.
Also, there might be additional strangeness with some local keyboard layouts. For example, with the swiss-german layout the number pad’s dot doesn’t worky correctly with osx’s calculator app. It always makes a comma and all calculations return an error. I guess it’s either a bug in the keyboard layout or the calculator app.
No and this is not the point: if a user dowload the game to test it and he can’t play probably he trash the application without testing it with different layouts.
I’ll publish a small app this night to test the keyboard, something like Proton’s one but only with keyup/down events because the TextField was working even in my mac and probably it use the inputString method.
Same problem.
Today I have bought the new MacBook pro 15 with 10.5.5 under italian setup
If i run Island demo on the web the w key translate the camera in the right way.
Inside Unity with Island demo the w key doesn’t work.
If I change the key the “vertical” input runs right. At the moment I have only a problem with the w key.
using System;
using System.Collections;
using UnityEngine;
class testKeys:MonoBehaviour
{
Queue q = new Queue();
GUILayoutOption[] op = null;
void OnGUI()
{
if (Event.current.type.Equals(EventType.KeyDown))
{
q.Enqueue(string.Format("KeyDown character {0} keycode {1}", Event.current.character.ToString(), Event.current.keyCode));
}
if (Event.current.type.Equals(EventType.KeyUp ))
{
q.Enqueue(string.Format("KeyUp character {0} keycode {1}", Event.current.character.ToString(), Event.current.keyCode));
}
while (q.Count > 18)
q.Dequeue();
GUILayout.BeginArea(new Rect(50, 10, 500, 580));
foreach (string t in q)
GUILayout.Label(t,op );
GUILayout.EndArea();
}
}
The webplayer is working in tiger and leopard safari (‘control’ key keydown keyup missing)
In a deployed application
Leopard macbook
KeyDown character 1 keycode Ampersand
KeyUp character 1 keycode Ampersand
KeyDown character 2 keycode DoubleQuote
KeyUp character 2 keycode DoubleQuote
KeyDown character 3 keycode Quote
KeyUp character 3 keycode Quote
KeyDown character w keycode Z
KeyUp character w keycode Z
keydown keyup ‘control’ key event missing
-Tiger
KeyDown character 1 keycode Alpha1
KeyUp character 1 keycode Alpha1
KeyDown character 2 keycode Alpha2
KeyUp character 2 keycode Alpha2
KeyDown character 3 keycode Alpha3
KeyUp character 3 keycode Alpha3
KeyDown character w keycode W
KeyUp character w keycode W
keydown keyup ‘control’ key event missing
Windows XP
KeyDown character keycode Alpha1
KeyDown character 1 keycode 0
KeyUp character keycode Alpha1
KeyDown character keycode Alpha2
KeyDown character 2 keycode 0
KeyUp character keycode Alpha2
KeyDown character keycode Alpha3
KeyDown character 3 keycode 0
KeyUp character keycode Alpha3
KeyDown character keycode W
KeyDown character w keycode 0
KeyUp character keycode W
KeyDown character keycode LeftControl
KeyUp character keycode LeftControl
I have the same problem with my Macbook Pro. (italian keyboard)
-In Unity 2.5 W and Z are swapped in the editor functions (like i had a QZERTY keybard):
if in the key editor preferences i press W i see written Z…
but if i change names in the project when i press W i see correctly W
Example in FPS command editor to go forward i have to press Z
-if i build a webplayer example all works correctly
-In Unity iPhone editor is all ok.
I am experiencing the same issue here, and alas, I have an italian Macbook Pro as well.
Just to recap:
I have an Unity project with a vertical axis defined in the controls, with these keys:
Negative button: down
Positive button: up
Alt Negative button: s
Alt Positive button: w When I am working inside the editor, if I press ‘W’ I see the pivot button flipping from ‘Pivot’ to ‘Center’, instead of selecting the translation gizmo. ‘Q’, ‘E’ and ‘R’ work.
Likewise, if I play the game hitting Cmd+P, the ‘W’ doesn’t work and I have to press ‘Z’ to move.
Basically, ‘W’ acts as if it was a ‘Z’, as if I were using the old italian keyboard layout, the QZERTY.
If I build the game and play it, everything works fine.
Just to clarify, I am NOT using the QZERTY layout. I have made a test with the other italian keyboard enabled, I also tried to switch back and forth between keyboard layouts while the game was running, I restarted Unity after re-selecting the correct layout, nothing changes.
It’s like as if Unity switches to using the QZERTY layout in the background without even telling the system.
Thank you if you’re going to look into this issue, it’s very annoying.
I have the problems looks quite the same. WASD not working unde Mac OS Lion
Input.GetKey(“u”)/Input.GetKey(KeyCode.U) and similar characters not catched, but getkey (“8”), getkey(“up”) catched very nice. Looks like some problem with character coding or layouts.
More strange, that it sometimes work! And on another day (after reboot) - not.
It’s annoing me.