[Moderator's note: Topic split from #If bug maybe - Bug Reports.]
l can use shift & Alt::to define an action,but why cant the +!::do that?
Then l can define my combo with pure modifier without any problem.
[Topic split] Modifiers and custom combos
-
- Posts: 28
- Joined: 05 Aug 2014, 02:01
[Topic split] Modifiers and custom combos
Last edited by zhanglei1371 on 29 Nov 2015, 23:07, edited 1 time in total.
Re: #If bug maybe
...
What?
Oh, you mean Alt.
Just replace "shift &" with "+".
A modifier symbol isn't a modifier symbol if it's not modifying something. +!:: is Shift and literally the "!" symbol.
What?
Oh, you mean Alt.
Just replace "shift &" with "+".
A modifier symbol isn't a modifier symbol if it's not modifying something. +!:: is Shift and literally the "!" symbol.
-
- Posts: 28
- Joined: 05 Aug 2014, 02:01
Re: #If bug maybe
Well,Many many Thx lexikos! Your post solved my problem that worried me for a long time.lexikos wrote:...
Just replace "shift &" with "+".
A modifier symbol isn't a modifier symbol if it's not modifying something. +!:: is Shift and literally the "!" symbol.
long ago,I used the Lshift & L alt:: to define an action,But I fonud that it will disturb another combo that begin with + like +!g::.Now I can use +Lalt::Action1 or !Lshift::Action2 to define my hotkey.Then it won't impact other hotkey begin with shift。Now I can use more efficient and flexible Hotkey。
Thx very much for the reply and thx tmplinshi posting the theme!
-
- Posts: 28
- Joined: 05 Aug 2014, 02:01
Re: #If bug maybe
The last question:lexikos wrote:...
A modifier symbol isn't a modifier symbol if it's not modifying something. +!:: is Shift and literally the "!" symbol.
I make the code below,I want to use shift to press different times to perform deferent function.and I give it a situation:ahk_class Notepad(or other similar situation ,to avoid affect the first combo).But I found it still have a impact to the first combo.
Are there an effective method to match both combo,without affect each other? If so ,there will be the best solution and great work!
Code: Select all
~: & Shift Up::Send {=} ;the first hotkey
#IfWinActive ahk_class Notepad ;the second hotkey,actived by ahk_class notepad,but it will affect the global.
Shift::
if winc_presses > 0
{
winc_presses += 1
return
}
winc_presses = 1
SetTimer, KeyWinC, 400
return
KeyWinC:
SetTimer, KeyWinC, off
if winc_presses = 1
{
send {shift}
}
else if winc_presses = 2
{
send {down}
}
else if winc_presses > 2
{
send {right}
}
winc_presses = 0
return
#IfWinActive
Re: [Topic split] Modifiers and custom combos
Your questions are off-topic for the Bug Reports forum and the original thread in which you posted. I have split the posts into their own topic.
As for your last question, I don't get what you mean.
As for your last question, I don't get what you mean.
Re: [Topic split] Modifiers and custom combos
It seems send {shift} can't start the Shift:: lable.
@zhanglei1371 How about replace send {shift} to SetTimer, ShiftLable, -1 or GoSub, ShiftLable
@zhanglei1371 How about replace send {shift} to SetTimer, ShiftLable, -1 or GoSub, ShiftLable
Code: Select all
ShiftLable:
Shift::
...your code
return
-
- Posts: 28
- Joined: 05 Aug 2014, 02:01
Re: [Topic split] Modifiers and custom combos
Sorry for my bad expression 。I will express my problem more detailed:lexikos wrote:Your questions are off-topic for the Bug Reports forum and the original thread in which you posted. I have split the posts into their own topic.
As for your last question, I don't get what you mean.
I use this code to implement a function:when I input "(",I will press the "Shift" firstly,then I press "9" without releasing the "shift" key. After I relese the shift key without releasing the "9",then then ")" will generate automatically and the curse will move left to the middle of the two bracket. If you release the 9 firstly then release the shift finally,the ) won't appear .So the order of releasing is needed.
Code: Select all
~: & Shift Up::Send {=} ;the first hotkey
I have test many times,but failed at last.If I delete the code below,the code above will work well.But I if want to have both ,If there is α possible solution?
Thx very much for the reply!!!
Code: Select all
#IfWinActive ahk_class Notepad ;the second hotkey,actived by ahk_class notepad,but it will affect the global.
$Shift::
if winc_presses > 0
{
winc_presses += 1
return
}
winc_presses = 1
SetTimer, KeyWinC, 400
return
KeyWinC:
SetTimer, KeyWinC, off
if winc_presses = 1
{
send {shift}
}
else if winc_presses = 2
{
send {down}
}
else if winc_presses > 2
{
send {right}
}
winc_presses = 0
return
#IfWinActive
-
- Posts: 28
- Joined: 05 Aug 2014, 02:01
Re: [Topic split] Modifiers and custom combos
Hi,everyone,is there a possible solution for this puzzle?
What I want is to get a confirmation。
if so ,I will give up it.
What I want is to get a confirmation。
if so ,I will give up it.
Who is online
Users browsing this forum: No registered users and 227 guests