I have software that allows for toggle behavior but I want to turn it into a momentary behavior.
Is there a way to re-trigger the tab key when it has been released? (without it repeating permanently)
thanks
Ryan
Re-trigger key when released Topic is solved
-
- Posts: 7
- Joined: 13 Oct 2018, 03:14
Re: Re-trigger key when released
You mean to repeat the Tab key once after you press it?
Edit: this won't help you. Don't use this
Code: Select all
Tab::
Loop 1
Send, {Tab}
return
Last edited by Net_Wars on 13 Oct 2018, 09:42, edited 2 times in total.
Hi,
I was trying make this on my own but I'mgood only in basics not good even in basics.
Sorry for my bad English. If something is unclear I will try better next time.
I was trying make this on my own but I'm
Sorry for my bad English. If something is unclear I will try better next time.
Re: Re-trigger key when released
The code above would keep retriggering while you hold the key. This shouldn't:
Code: Select all
Tab::
Send {Tab}
KeyWait Tab
Return
Tab up::Send {Tab}
-
- Posts: 7
- Joined: 13 Oct 2018, 03:14
Re: Re-trigger key when released
Thanks Nextron I appreciate that. It works perfectly when I test it in word but I can't for the life of me work out why it doesn't work for streamlabs obs :S I've set revealing a layer to a hotkey which works when the script is off but as soon as I turn on the script it doesn't register me pressing the key at all. Going to have to look into this a bit but thanks for the code
-
- Posts: 7
- Joined: 13 Oct 2018, 03:14
Re: Re-trigger key when released
So I've been testing a bunch of things to see the issue. My program will register Tab when there's no script effecting it or when the script is simply Tab::Tab
I'm now trying to make a script that will send q 3 seconds after Tab is pressed down so it no longer relies on Tab up, that might help it work for me. But when I write:
Tab::
Send {Tab}
word sends tab but my software doesn't hear the tab being pressed. Can I do Tab::Tab and 3 seconds later send {q} somehow?
I'm now trying to make a script that will send q 3 seconds after Tab is pressed down so it no longer relies on Tab up, that might help it work for me. But when I write:
Tab::
Send {Tab}
word sends tab but my software doesn't hear the tab being pressed. Can I do Tab::Tab and 3 seconds later send {q} somehow?
Re: Re-trigger key when released
I think you need to look for the answer in the time tab is pressed down. When you use Send {Tab}, it basically sends {Tab down}{Tab up}, with the delay in between depending on the sendmode (default 'event', but possible changed to 'input', basically removing the delay). When it's in 'event' mode, the delay can be increased or decreased with SetKeyDelay. So try adding the line SetKeyDelay,100,100 as the first line of your script and see if it makes a difference.
When using Tab::Tab you're remapping both the up and down event to respectively just another up and down event, so the delay is the same as the time it takes you the press a button, which usually is longer than artificial input.
To add a delay between commands, use Sleep 3000 on a line on its own, between those commands.
When using Tab::Tab you're remapping both the up and down event to respectively just another up and down event, so the delay is the same as the time it takes you the press a button, which usually is longer than artificial input.
To add a delay between commands, use Sleep 3000 on a line on its own, between those commands.
-
- Posts: 7
- Joined: 13 Oct 2018, 03:14
Re: Re-trigger key when released
Thanks that seems to have done the trick
Hopefully it won't break my other scripts since it's a global change but I guess time will tell. I've done it as SetKeyDelay,1,1 which works so should be minimal difference
Hopefully it won't break my other scripts since it's a global change but I guess time will tell. I've done it as SetKeyDelay,1,1 which works so should be minimal difference
-
- Posts: 7
- Joined: 13 Oct 2018, 03:14
Re: Re-trigger key when released
ok so the way it behaves is that pressing it triggers a down+up and releasing it triggers a down+up. But when I hold it I want it to stay held if that's possible. To give more background I use it in a game I play (overwatch) to hold up an info screen but with the way it's behaving now the screen goes away after a millisecond and I want it to stay up for the whole duration I'm pressing the tab key for. Is this possible?
Re: Re-trigger key when released
I don't understand. Does Overwatch bind two different functions to tab? It sounds conflicting that you simultaneously want both native and customized behavior.
Can you describe how behaves (on down, on up, on next down and up) without any script applied to it?
Can you describe how behaves (on down, on up, on next down and up) without any script applied to it?
-
- Posts: 7
- Joined: 13 Oct 2018, 03:14
Re: Re-trigger key when released
ok so I want tab to control something in obs (my stream software) and also bring up the overwatch info screen as usual.
without scripts the info screen in overwatch behaves as such:
Tab down = info up
Tab up = info gone (momentary)
without scripts tab is a shotcut to toggle an video layer on the screen on/off:
Tab down = video layer toggles
Tab up = (nothing I can see happens)
The show or hide in obs can be mapped to 2 separate keys if that helps but when both assigned to tab this is how it behaves.
What I'd like is for the video layer to only appear while the overwatch info screen is up and hide when it's gone. So to achieve this I'm looking to make a macro that acts like this:
Tab down = Tab down
Tab up = Tab up, Tab down, Tab up
This way the toggle video layer should hide as I lift tab and show when I push it down. Would this be possible? Also thanks for all the help so far, I very much appreciate it
without scripts the info screen in overwatch behaves as such:
Tab down = info up
Tab up = info gone (momentary)
without scripts tab is a shotcut to toggle an video layer on the screen on/off:
Tab down = video layer toggles
Tab up = (nothing I can see happens)
The show or hide in obs can be mapped to 2 separate keys if that helps but when both assigned to tab this is how it behaves.
What I'd like is for the video layer to only appear while the overwatch info screen is up and hide when it's gone. So to achieve this I'm looking to make a macro that acts like this:
Tab down = Tab down
Tab up = Tab up, Tab down, Tab up
This way the toggle video layer should hide as I lift tab and show when I push it down. Would this be possible? Also thanks for all the help so far, I very much appreciate it
Re: Re-trigger key when released Topic is solved
Then you'd end up with this:
If that doesn't work as desired, it would be best to assign obs hide to a different key and add that key to the tab up script.
Code: Select all
Tab::
Send {Tab down}
KeyWait Tab
Return
Tab up::Send {Tab up}{Tab}
-
- Posts: 7
- Joined: 13 Oct 2018, 03:14
Re: Re-trigger key when released
That works, thanks so much It sometimes gets stuck so I'll just need to adjust wait times I think but should be good if I don't press tab a lot quickly
Who is online
Users browsing this forum: No registered users and 108 guests