Page 1 of 1

Problem with suspend mapped combinations

Posted: 25 Oct 2017, 09:55
by dsewq1LYJ
Think about follow code

Code: Select all

Esc & w::do_something()
Esc & a::do_something()
Esc & s::do_something()
Esc & d::do_something()
!w::do_something()
!a::do_something()
!s::do_something()
!d::do_something()
#IfWinActive ahk_class SUSPEND_THEM
~Esc & w::return // This line cause Esc & w send nothing, it should send char 'w'.
~Esc & a::return // This line cause Esc & a send nothing, it should send char 'a'.
~Esc & s::return // This line cause Esc & s send nothing, it should send char 's'.
~Esc & d::return // This line cause Esc & d send nothing, it should send char 'd'.
~!w::return // This line works perfectly
~!a::return // This line works perfectly
~!s::return // This line works perfectly
~!d::return // This line works perfectly
#If
It sure suspend those 4 combination.
then when I press Esc & w/a/s/d, it should send 'w/a/s/d'. but it didn't.

Why !? Am I doing something wrong !?

Re: Problem with suspend mapped combinations

Posted: 25 Oct 2017, 10:30
by Rohwedder
Hallo,
try:

Code: Select all

#IfWinActive ahk_class SUSPEND_THEM
~Esc & ~w::return
~Esc & ~a::return
~Esc & ~s::return
~Esc & ~d::return
but better:

Code: Select all

#IfWinNotActive ahk_class SUSPEND_THEM
Esc & w::do_something()
Esc & a::do_something()
Esc & s::do_something()
Esc & d::do_something()
!w::do_something()
!a::do_something()
!s::do_something()
!d::do_something()
#If

Re: Problem with suspend mapped combinations

Posted: 02 Jan 2018, 07:58
by dsewq1LYJ
Rohwedder wrote:Hallo,
try:

Code: Select all

#IfWinActive ahk_class SUSPEND_THEM
~Esc & ~w::return
~Esc & ~a::return
~Esc & ~s::return
~Esc & ~d::return
but better:

Code: Select all

#IfWinNotActive ahk_class SUSPEND_THEM
Esc & w::do_something()
Esc & a::do_something()
Esc & s::do_something()
Esc & d::do_something()
!w::do_something()
!a::do_something()
!s::do_something()
!d::do_something()
#If
The first case is so much better than second case.

Thank you so much bro :xmas: