Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Values For Fire Buttons and Keyboard Buttons

Discussion in 'Getting Started' started by Jeff-Goin, Jan 29, 2015.

  1. Jeff-Goin

    Jeff-Goin

    Joined:
    Jan 29, 2015
    Posts:
    11
    I've read the input manager and input entries. I know about the enumerated types for th various GetKey functions. But can't find where to see the following:

    In the input manager (see attached) there are words used to to indicate what button applies to each of the axes. "mouse 2" for example. Where can I find these words? They are not the same as what the enumerated types show. I'm guessing which is how I found "up". If it sticks, it's used.

    Hopefully there's a quick link that has just eluded my searches.

    Thanks!
     

    Attached Files:

  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
  3. Jeff-Goin

    Jeff-Goin

    Joined:
    Jan 29, 2015
    Posts:
    11
    Eric,

    Thanks. I've read that (and lord knows I've landed on it a bunch of times!) but what I want to know is what values can you put into the "Negative Button" and "Positive Button" fields. In the example it uses the word "left" and I've discovered that I can use "up" and "down" but can't find any documentation to list what acceptable values are.

    Thanks for your time,

    Jeff G.

     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Please read the entire page I linked to.

    --Eric
     
  5. Jeff-Goin

    Jeff-Goin

    Joined:
    Jan 29, 2015
    Posts:
    11
    Sometimes...

    Yup, that's what I was looking for and I'll bet I'd been to that page a half dozen times. Go figure.

    Thanks.

    Button Names
    To map a key to an axis, you have to enter the key’s name in the Positive Button or Negative Button property in the Inspector.

    The names of keys follow this convention:

    • Normal keys: “a”, “b”, “c” …
    • Number keys: “1”, “2”, “3”, …
    • Arrow keys: “up”, “down”, “left”, “right”
    • Keypad keys: “[1]”, “[2]”, “[3]”, “[+]”, “[equals]”
    • Modifier keys: “right shift”, “left shift”, “right ctrl”, “left ctrl”, “right alt”, “left alt”, “right cmd”, “left cmd”
    • Mouse Buttons: “mouse 0”, “mouse 1”, “mouse 2”, …
    • Joystick Buttons (from any joystick): “joystick button 0”, “joystick button 1”, “joystick button 2”, …
    • Joystick Buttons (from a specific joystick): “joystick 1 button 0”, “joystick 1 button 1”, “joystick 2 button 0”, …
    • Special keys: “backspace”, “tab”, “return”, “escape”, “space”, “delete”, “enter”, “insert”, “home”, “end”, “page up”, “page down”
    • Function keys: “f1”, “f2”, “f3”, …
     
    ammarajam08 likes this.