In my script if I turn on caps lock all the keys of the keyboard does another thing instead of typing keys, for example:
Code: Select all
#If CapsLockIsPressed()
1::GoToDesktop(1)
2::GoToDesktop(2)
3::GoToDesktop(3)
4::GoToDesktop(4)
p::OpenControlPanel()
...
#If
What im trying to do:
With caps lock on I want to press "n" and enter in some kind of "new mode"
Then if I press "f" I want to make a new folder, or if I press "t" a new tab, and so on
So I would press "nf" do do a new folder, and "nt" to do a new tab
So:
Code: Select all
SetCapsLockState, on
global new_mode := false
#If CapsLockIsPressed()
n::
new_mode := true
return
#If
#If new_mode
f::CreateNewFolder()
t::OpenNewTab()
any_other_key_that_is not_f_or_n::new_mode := false ; <=== how I archive this?
#If
But if I press any other key that is not "f" or "t" I want to exit the "new mode"
For example if I do "nz" I want it to exit the "new mode"
How I do that?
Thanks!