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 Jean-Fabre · Nov 03, 2010 at 07:26 AM · windowskeyboardkey

on windows player or standalone, numerical keys is a mess

-- EDIT

I was wrong, it behaves the same on mac and windows, I got confused because the "@" sign is on a different location on my mac than on my windows,

Hi,

As my app went into QA ( in my mind... :) ) , I just realized there is something very wrong with key inputs on Windows. Note that on mac everything is fine...

I have a gui Text field, when the user is entering text I keep getting the getKeyDown events in other scripts.

Input.GetKeyDown("3")

Why is the behavior different on windows and on Mac. It seems logical on mac that when the user is entering text in a gui text field key events are not dispatched. But I could settle if at least the behavior was consistent throughout platforms...

Now it gets worse...

if the user is using shift to input another character ( for example shift 2 is "@" on some keyboards) then I still get the getKeyDown events for "2" which is wrong, the user has really typed "@"...

I am missing a point? if the user wants to type "@", surely this is not "2" or is there a mix between the keyboard layout and the actual keys?

There is a mix up between the physical location of the character and the actual character ( don't know how to express it better.. sorry).

Do you have the same problems?!? I tested on two different windows machine ( both xp tho...) and it's consistent.

How do you then trap what the user has type properly? how to trap a physical key on one side and then how to trap the actual character the user has typed?

It's too bad I wanted to release today, everything else is perfectly working without a glitch.

Thanks for your help,

Jean

Comment
Add comment
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

1 Reply

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

Answer by Mike 3 · Nov 03, 2010 at 08:58 AM

It's the same on mac too, and it's intended behaviour

Quick example - Imagine shift for run, 2 for swap to rifle in a combat game. You wouldn't want 2 to stop working when you press shift, and is probably true for most of the games out there in fact

Either way - if you want to test for @ instead of 2, try parsing Input.inputString instead, that'll give you the actual characters dependent on shift being held and the localization

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 Jean-Fabre · Nov 03, 2010 at 09:58 AM 0
Share

Ok, I see, on my mac the @ sign is somewhere else on the keayboard hence I wrongly stated that it was behaving differently. and thanks for the redirection to Input.inputString, I know understand where I was wrong.

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

No one has followed this question yet.

Related Questions

Microsoft Surface Touch screen keyboard 2 Answers

How to stop the 'Hand Tool' from automatically selecting itself? 0 Answers

How to disable CTRL key interference on Windows? 0 Answers

Trap the Windows Key 1 Answer

How to get the "Command" hold down on Mac OS? 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