Forum Discussion

CamilleStanb631's avatar
CamilleStanb631
Community Member
6 years ago

Show a layer when a user presses MULTIPLE keys

Hello,

I want to show a layer when a user presses multiple keys. For example, they must hit 12 and then Enter for it to show a layer. I see how to show a layer when a user presses a key, however, I need them to press multiple keys, not just one. 

3 Replies

  • NedWhiteley's avatar
    NedWhiteley
    Community Member

    Hi Camille,

    You could assign a True/False variable to each of the number keys and then show the new layer when the user presses the Enter key, provided both the variables are True. You could also ensure the two number keys have been pressed in the right order by only changing the second variable to True if the first variable is already True.

    • CamilleStanb631's avatar
      CamilleStanb631
      Community Member

      This worked! Thank you very much. I appreciate the tip about the chronological order as well. 

    • RobertaBogany's avatar
      RobertaBogany
      Community Member

      Is there a screenshot to show what this would look like?  I need to set this up in a training module.