Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Thom Denick · Apr 17, 2011 at 03:27 AM · inputmackeyboardshift

On Mac "left shift" and "right shift" trigger both Keys

I have noticed on my current Mac builds that if I bind "left shift" or "right shift" Unity behaves as if I have hit both shift keys whenever either is hit. I'm using the smaller Mac keyboard.

Specifically, if I put in this code:

if (Input.GetKeyDown(KeyCode.LeftShift)) { Debug.Log("Left Shift"); }

 if (Input.GetKeyDown(KeyCode.RightShift)) {
     Debug.Log("Right Shift");
 }       

Unity console will return both "Left Shift" and "Right Shift" each time the key is pressed. This also happens if I specifically bind the "left shift" and "right shift" keys to an input in the Input Manager.

If I build this same project to PC, the shift keys are correctly differentiated.

Anyone have an idea of a workaround for this? I'm working on a pinball game and it's fairly universal that you use the two shift keys for the flippers.

EDIT: Well, I just got an e-mail back from Unity QA and they say this is working as designed since Mac doesn't send different commands for each key. I beg to differ since I've seen games that support both keys. However this might be a limitation based on how Unity polls for keys.

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Thom Denick · Apr 17, 2011 at 09:18 PM 0
Share

I submitted a bug to FogBugz, it is ID: 398952

avatar image Thom Denick · Apr 18, 2011 at 08:08 PM 0
Share

Interestingly, Unity does distinguish between the two shifts correctly outside of gameplay in the Input Configuration menu prior to the game's launch via the $$anonymous$$ac Builder. This is clearly an actual bug with the Unity Editor and $$anonymous$$ac Player - I wrote back to the QA $$anonymous$$m.

avatar image Thom Denick · Apr 21, 2011 at 04:08 AM 0
Share

Unity QA got back to me, I sent a sample project; assurances this will be addressed.

avatar image Thom Denick · Oct 10, 2011 at 06:16 PM 0
Share

Unity QA let me know this is an anticipated fix for 3.5. A bit late for my game, but hopefully it will come soon.

avatar image Thom Denick · May 05, 2012 at 08:47 PM 0
Share

Confirmed the bug is fixed in 3.5

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Graham-Dunnett · Sep 26, 2011 at 05:47 PM

This bug will be fixed as part of the 3.5 release. It will not be fixed in Safari 3 and Firefox 3, but only in later browsers.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Thom Denick · Oct 10, 2011 at 06:17 PM 0
Share

Hi Graham, do you know if it's possible to get early access to 3.5? $$anonymous$$y game is co$$anonymous$$g out soon.

avatar image Thom Denick · May 05, 2012 at 08:46 PM 0
Share

Confirmed the bug is fixed in 3.5

avatar image
0

Answer by Joshua · Apr 17, 2011 at 03:30 AM

If what you say is true I don't think there would be a simple workaround. Best thng I could advice is filing a bug report. It must be (I naively think) an easy bug to quash, seeing how the keys obviously give the machine different input signals. Strange.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eric5h5 · Apr 17, 2011 at 04:09 AM 0
Share

Especially since it used to work properly in a previous version, although it's possible OS upgrades might have some effect.

avatar image
0

Answer by Mortennobel · Apr 17, 2011 at 08:26 AM

DaveA has similar issues:

http://answers.unity3d.com/questions/51293/mac-keys-not-showing-up-or-very-strangely

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DaveA · Apr 18, 2011 at 03:37 AM 0
Share

That and more. Bug report submitted

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Issues with Input.inputString 2 Answers

Mac Keys not showing up, or very strangely... 2 Answers

How to make floating mobile keyboard in mobile game ? 0 Answers

Android Hardware Keyboard 0 Answers

Mac xbox controller detect trigger input 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges