Author Topic: Toggle between two different keys with button  (Read 1455 times)

paul

  • Newbie
  • *
  • Posts: 16
Toggle between two different keys with button
« on: April 05, 2020, 05:31:27 AM »
I would like a button press to switch between two different keys so;

i push the button and the key 'f' is pushed
if i push the button again '1' is pushed
then i push the button again the key 'f' is pushed etc..

How can I do this?

Thanks for any help

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Toggle between two different keys with button
« Reply #1 on: April 05, 2020, 10:23:36 AM »
That can be done using something like
Code: [Select]
Begin Boolean Compare : [useSecondKey] Does Not Equal True
    Press F key and hold for 0,06 seconds and release
    Set Boolean [useSecondKey] to True
Else
    Press 1 key and hold for 0,06 seconds and release
    Set Boolean [useSecondKey] to False
End Condition

Make sure to check the "Evaluate 'Not Set' as false" option.