Search Unity

How to check the key I pressed

Discussion in 'Formats & External Tools' started by UnaiLz, Sep 20, 2017.

  1. UnaiLz

    UnaiLz

    Joined:
    Dec 12, 2015
    Posts:
    46
    Hi there people!

    I'm using a bluetooth controller and to configure it I want to chech wich keys I am pressing.

    I'm trying something like

    Code (CSharp):
    1. void Update ()
    2.     {
    3.         if (Input.anyKeyDown)
    4.         {
    5.             Debug.Log (Input.anyKey.ToString);
    6.         }
    7.     }
    But it doen't works.

    How can I do it?

    Thank you :)
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
  3. UnaiLz

    UnaiLz

    Joined:
    Dec 12, 2015
    Posts:
    46
    I'm working with a bluetooth controller and I think it's not working :/

    Maybe I didn't apply it in the right way, how can I do it right?