Pressing Two Buttons to execute one function

Announcements, questions
Post Reply
BradyBrother100
Posts: 13
Joined: 03 May 2019, 01:17

Pressing Two Buttons to execute one function

Post by BradyBrother100 » 29 Sep 2021, 00:49

Hi,
I am trying to make a Spanish Numpad for the special characters. All of the lowercase letters work fine but I want to make the Enter Key act as a shift key so when I press Enter and NUM9, it outputs a capital á. The code below, I thought would work, doesn't.
Button 13 is Enter and Button 101 is NUM9 which earlier in the code presses á. How could I get this concept to work?


elseif (button == 13 and button == 101) then lmc_send_keys ("%({NUM0}{NUM1}{NUM9}{NUM3})")


Thanks,
Brady

admin
Site Admin
Posts: 725
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Pressing Two Buttons to execute one function

Post by admin » 29 Sep 2021, 08:15

One variable can't have 2 values - as you test in your condition.
You would need some flag to set on enter down and test it later
Petr Medek
LUAmacros author

Post Reply