Search Unity

Question Rebinding action with combination of multiple buttons

Discussion in 'Input System' started by michailBreachGG, Feb 9, 2023.

  1. michailBreachGG

    michailBreachGG

    Joined:
    Mar 14, 2022
    Posts:
    2
    Hi guys,

    I'm looking for an advice on how to make multiple button rebinding during runtime? Particularly on the part where user have to press and hold one button and then press another button.

    For single rebinding I'm using PerformInteractiveRebinding which has OnApplyBinding method which is invoked after single key is pressed. Problem that it doesn't wait for another key to be pressed. So I wonder is there a way to tell interactive rebind operation to wait for another key? Or should I go with some another approach?

    Thank you.
     
  2. rdjadu

    rdjadu

    Joined:
    May 9, 2022
    Posts:
    116
    Kicking modifiers (or any "prefix" keys) out of potential matches and saving them separately is one way. Somewhat outlined it here.
     
    michailBreachGG likes this.