How to toggle one key with 2 functions Topic is solved
How to toggle one key with 2 functions
Hi, Im new to all of this so can someone tell me how to make a script where if I press a key (x) it does what key x is supposed to do but also switches key x's function into key y. Then when I press the same key, it does what key y is supposed to do and then switches it back to key x. SO basically I want one button to toggle between 2 functions, every other time I press it, it registers as function x and every other time as function y. Is this possible and if it is how do I do it?
Re: How to toggle one key with 2 functions Topic is solved
Code: Select all
1::(toggle := !toggle) ? funcX() : funcY()
Re: How to toggle one key with 2 functions
So where do I put the buttons to in the code if I want to toggle the key for letter x between functions x and 3swagfag wrote:Code: Select all
1::(toggle := !toggle) ? funcX() : funcY()
Re: How to toggle one key with 2 functions
Code: Select all
1::(toggle := !toggle) ? funcX() : funcY()
funcX() {
MsgBox % "Hello from X"
}
funcY() {
MsgBox % "Hello from Y"
}
Re: How to toggle one key with 2 functions
Hallo,
or do you want a Switching Remapping?
or do you want a Switching Remapping?
Code: Select all
*x::Send % !Y ? "{Blind}{x DownR}" : "{Blind}{y DownR}"
*x Up::Send % (Y := !Y) ? "{Blind}{x Up}" : "{Blind}{y Up}"
Who is online
Users browsing this forum: sharin and 50 guests