Hotkey not working twice
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 5
- Joined: Sun Nov 17, 2019 5:27 pm
Hotkey not working twice
I have a hotkey SH+CTRL+Down.
It works fine the first time, but when I do not release SH+CTRL and press Down again, the hotkey does not work.
For it to work I have to release SH+CTRL and then again press SH+CTRL+Down.
Is it a bug? How to make it work?
It works fine the first time, but when I do not release SH+CTRL and press Down again, the hotkey does not work.
For it to work I have to release SH+CTRL and then again press SH+CTRL+Down.
Is it a bug? How to make it work?
- Dorian (MJT support)
- Automation Wizard
- Posts: 1417
- Joined: Sun Nov 03, 2002 3:19 am
Re: Hotkey not working twice
I just experimented with this and SHIFT + CTRL isn't an option for HotKeys. CTRL + SHIFT is.
However, as long as CTRL/SHIFT are held down at the same time as Down is pressed, this should work just fine. I was able to execute a macro multiple times whichever of the two I held down first.
Does the same issue arise if you use a different key combination? Could there be a clash with another application trying to reserve that key combination?
However, as long as CTRL/SHIFT are held down at the same time as Down is pressed, this should work just fine. I was able to execute a macro multiple times whichever of the two I held down first.
Does the same issue arise if you use a different key combination? Could there be a clash with another application trying to reserve that key combination?
-
- Newbie
- Posts: 5
- Joined: Sun Nov 17, 2019 5:27 pm
Re: Hotkey not working twice
This is my code:
Let>SK_DELAY=10
Press LCtrl
Press LShift
Press Right
Press Right
Press Right
It is for selecting 3 words in a text editor.
Hotkey is: Ctrl + Shift + Down
I press on keybord Ctrl+Shift and keep them pressed, then when I first hit Down it works, but when I hit the Down key a second time (while still holding down Ctrl+Shift, without realeasing them), the macro is not executed, instead the cursor moves down.
Let>SK_DELAY=10
Press LCtrl
Press LShift
Press Right
Press Right
Press Right
It is for selecting 3 words in a text editor.
Hotkey is: Ctrl + Shift + Down
I press on keybord Ctrl+Shift and keep them pressed, then when I first hit Down it works, but when I hit the Down key a second time (while still holding down Ctrl+Shift, without realeasing them), the macro is not executed, instead the cursor moves down.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1417
- Joined: Sun Nov 03, 2002 3:19 am
Re: Hotkey not working twice
I see. I think the problem is your script is pressing CTRL and SHIFT but not releasing them. Then they're still pressed and you're having trouble subsequently using the hotkey.
Try this instead :
Try this instead :
Code: Select all
press ctrl
press shift
press right *3
release shift
release ctrl
-
- Newbie
- Posts: 5
- Joined: Sun Nov 17, 2019 5:27 pm
Re: Hotkey not working twice
Nope, not working. That was what I had the first time, and removed release commnads because I thought that they caused the problem.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1417
- Joined: Sun Nov 03, 2002 3:19 am
Re: Hotkey not working twice
Here it is working : https://1drv.ms/v/s!Ao3gpMOkYdfwlagRJfR ... w?e=Ho828J
-
- Newbie
- Posts: 5
- Joined: Sun Nov 17, 2019 5:27 pm
Re: Hotkey not working twice
You are not doing it the way I specified. You are moving the cursor between the two commands and cancel the selection. Please do it twice as I specified (no clicking and no releasing of Ctrl and Shift between hitting Down key two times). The result should be 6 words selected.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1417
- Joined: Sun Nov 03, 2002 3:19 am
Re: Hotkey not working twice
https://1drv.ms/v/s!Ao3gpMOkYdfwlagSEpv ... Q?e=ImUgYx
The thing with this is though, you can run this hotkey multiple times in a row, but you do have to release the keys inbetween - otherwise you're not performing the hotkey sequence you set. CTRL_SHIFT_DOWN...release...CTRL_SHIFT_DOWN...release...CTRL_SHIFT_DOWN...release... Or... SHIFT_CTRL_DOWN...release...SHIFT_CTRL_DOWN...release...SHIFT_CTRL_DOWN...release...SHIFT_CTRL_DOWN...release...
So it seems the hotkey is only working once because you're only actually using it once. Subsequent times you're not pressing the entire hotkey sequence.
The thing with this is though, you can run this hotkey multiple times in a row, but you do have to release the keys inbetween - otherwise you're not performing the hotkey sequence you set. CTRL_SHIFT_DOWN...release...CTRL_SHIFT_DOWN...release...CTRL_SHIFT_DOWN...release... Or... SHIFT_CTRL_DOWN...release...SHIFT_CTRL_DOWN...release...SHIFT_CTRL_DOWN...release...SHIFT_CTRL_DOWN...release...
So it seems the hotkey is only working once because you're only actually using it once. Subsequent times you're not pressing the entire hotkey sequence.
-
- Newbie
- Posts: 5
- Joined: Sun Nov 17, 2019 5:27 pm
Re: Hotkey not working twice
OK, so we at last agree on the behaviour part.
Yet I would disagree with "you're only actually using it once", as the MS hotkey behaviour seems inconsistent with any other Windows hotkey behaviour.
Let's take the Ctrl + V shortcut, you can press and hold Ctrl and then hit V several times, each time triggering pasting operation. You do not need to release Ctrl for the operation to be triggered.
Therefore I would say this is a bug that should be corrected.
Yet I would disagree with "you're only actually using it once", as the MS hotkey behaviour seems inconsistent with any other Windows hotkey behaviour.
Let's take the Ctrl + V shortcut, you can press and hold Ctrl and then hit V several times, each time triggering pasting operation. You do not need to release Ctrl for the operation to be triggered.
Therefore I would say this is a bug that should be corrected.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1417
- Joined: Sun Nov 03, 2002 3:19 am
Re: Hotkey not working twice
This is not a bug.