Author Topic: Bypass voice attack and disable keyboard when in a second application  (Read 13049 times)

Dreadnaught2005

  • Guest
I just need a little help. I play elite dangerous and i have multiple monitors running. One for the game and one for utility programs like edtoolbox etc. What id like to be able to is bypass/disable the key board when a new application is selected. Ie chrome for surfing or ed toolbox. And then when i reselect elite by either clicking the window or moving the joystick(i have a script(joyfocus)in ahk that refocus is on elite if i touch my hotas) would then re enable the keyboard for use?

Is this something i can setup? Would this be in a future update?
Please help
Thanks

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #1 on: August 16, 2016, 06:21:52 AM »
You can Enable Auto Profile Switching, and have VA switch to a profile for each window automatically. It's pretty easy to do. Just look up Enable Auto Profile Switching in the VA manual. I think you should be able to figure it out from there. It's a nice feature.


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #2 on: August 16, 2016, 10:54:48 AM »
As iceblast said, you can switch to another profile. Should you still want to run some of the commands in your profile, you can use this command instead:
Code: [Select]
Start Loop While : [{EXP:1=1}] Equals '1'
    Begin Text Compare : [{EXP:'{ACTIVEWINDOWTITLE}' LIKE 'Untitled - Notepad' And {STATE_SHORTCUTS} = 0}] Equals '1'
        Enable Hotkeys
    Else If Text Compare : [{EXP:'{ACTIVEWINDOWTITLE}' NOT LIKE 'Untitled - Notepad' And {STATE_SHORTCUTS} = 1}] Equals '1'
        Disable Hotkeys
    End Condition
    Pause 1 second
End Loop
Start it when the profile does, and it will disable keyboard shortcuts when the window loses focus, while still allowing voice and button commands to run.
You'll want to replace "Untitled - Notepad" with the window title of Elite Dangerous.

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #3 on: August 16, 2016, 02:12:20 PM »
i want to import your code to my profile, Im still new at voice attack and this code is still throwing me for a loop i have no idea where to start.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #4 on: August 16, 2016, 02:29:01 PM »
You can't import from text, you'd have to recreate the command yourself. However, I've exported and attached it.

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #5 on: August 16, 2016, 04:11:38 PM »
thanks for the profile i have loaded and imported the command in to my profile and it doesnt seem to work. i leave the client window and its still trying to send keyts to the game.

Start Loop While : [{EXP:1=1}] Equals '1'
    Begin Text Compare : [{EXP:'{ACTIVEWINDOWTITLE}' LIKE "Elite - Dangerous (CLIENT)' And {STATE_SHORTCUTS} = 0}] Equals '1'
        Enable Hotkeys
    Else If Text Compare : [{EXP:'{ACTIVEWINDOWTITLE}' NOT LIKE 'Elite - Dangerous (CLIENT)' And {STATE_SHORTCUTS} = 1}] Equals '1'
        Disable Hotkeys
    End Condition
    Pause 1 second
End Loop


Am i Missing something?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #6 on: August 16, 2016, 04:16:54 PM »
Did you start the command? If so, does the keyboard shortcut icon have a red cross over it(It'll say the shortcuts are disabled in the log as well)?

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #7 on: August 16, 2016, 04:45:45 PM »
i imported the command to my profile i edited it and the closed out so the command would run.
then i open the browser(chrome) to see but the red cross isnt there and when i try to type in to google it misses the keys that are bound.

I still have to click it to disable it. Am i missing something in the settings?

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #8 on: August 16, 2016, 04:57:31 PM »
can you make the loop Auto Start?

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #9 on: August 16, 2016, 05:54:34 PM »
I was trying to keep it simple, by using just the built in Auto Profile Switching. I know it appears to have issues for me, but it might be something on my computer blinding VA to the switches, others might not have that problem.

I'm attaching a picture of what it would look like.

When you switch to Google Chrome, it loads another profile. Now, you can copy your main profile, and just rename it. It will have all your commands as before, but as soon as it does the switch to load the profile, it executes the command, Turn Off Keyboard. Of course, you have to make the command first, before you can choose it to be loaded, when the new profile starts.

Jeez, OK. Instead of putting just *Google Chrome, you can put all the other window titles to look for as well, that you don't want hot keys for. Like this.

*Google Chrome;Edtoolbox;So on;and so on

When it see's any of those, it will switch to this new profile and execute Turn of Keyboard command.

On your Elite Dangerous screen. Make sure you turn Hoy Keys back on.

Elite*

Execute Turn on Keyboard command. You have to make it first.


With Pfeil's way, just put that command to load when you start the profile. That will auto start the loop.

That's 2 different ways to do it. For me, I use Pfeil's way, because it should work every time, but the other way I showed you, may also work for you every time, and it's easier to understand, and adjust by yourself as needed.

If you still have problems, come back, and will see what we can do.



« Last Edit: August 16, 2016, 06:03:52 PM by iceblast »

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #10 on: August 16, 2016, 06:46:29 PM »
the pic you added is old my VA doesnt show thoes otions, Also im am not versed enough to make a profile and create commands.
this is the profile that im using
http://forum.hcsvoicepacks.com/forum/elite-dangerous-discussion/6398-v2-0-multi-crew-profile?_=1471386986797

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #11 on: August 16, 2016, 07:45:05 PM »
That pic is current, and because you think it's old, explains why none of this is working for you.

Attaching another picture.

You go to edit your profile, and to the right of the title name, is a box, with a check mark. Click on it, it will open the Profile Options screen that was in the picture from before.

Apparently, you didn't check the Voice Attack manual about Enable Auto Profile Switching. Make sure you enable that first, otherwise the Profile Option screen won't have any effect.

The problem with using someone else's Profile for something like Elite Dangerous is, it's just to big for someone that's new to Voice Attack, because you don't know what all the commands do, or what they could do. Elite Dangerous by it's self can be overwhelming to learn how to control, then you drop a huge unknown VA Profile into as well. I understand why you want to turn off Keyboard Hot Keys now. You must be triggering all kinds of commands in VA while trying to surf the net, or whatever else.

You would be better off, starting your own profile, and slowly building your own E:D profile. You can copy commands from that E:D profile to yours, as you get use to everything. Eventually, you'll have a profile for the game, that you know what ever key does, instead of being frustrated that your knowledge is lacking.

A simple thing you could do, is just make a voice command that turns off and on keyboard hot keys. Then you don't need to bother with the more advance things. Just say, turn off hot keys, and done, Turn on Hot Keys and done.

VA is incredible simple to use, there are Youtube videos, that are just a couple mins long, that will walk you through, how to make commands. You'll be making tons of commands on your own a minute after watching it. Don't make it harder then it is.

Here's the link for the Voice Attack's manual. http://www.voiceattack.com/VoiceAttackHelp.pdf

You'll be surprised just how helpful it can be.
« Last Edit: August 16, 2016, 07:48:14 PM by iceblast »

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #12 on: August 16, 2016, 08:33:08 PM »
basically i was looking for a simple command that i could add to the big file or a small profile to import to that profile that just turns off keyboard when elite is not targeted. i did reaserch and found that that profile works well and ive rebound all the keys to my key bind(i figured that out). everything else works great except for the fact that i have to keep turning the keyboard off when i want to go to any other program.  ill do what it takes to get this done im just new

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #13 on: August 16, 2016, 08:35:57 PM »
and reenable keyboard when elite is reselected(either by the mouse or the joyfocus script)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #14 on: August 16, 2016, 09:10:16 PM »
You could just add a blank profile and set it as the default when auto switching.  Sorry if this has already been suggested...  Still working from my phone...  Everything is like a peephole view and I'm on a limited time budget :)

Your Elite profile would have Elite* in tha auto switch box as ice blast suggested.
In the empty profile, just put a single asterisk to indicate it's the default.

Again... Can't test as I am away, but it seems like it would work.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #15 on: August 16, 2016, 09:14:13 PM »
Here, import this into your profile.

Once you start Voice Attack, just trigger this command.

Right now, I have the keys set to trigger the command to this:

Ctrl+ALT+Shift+L

Was trying to make it a hot key you might not have bound already, but you can change it to something easier.

Just remember to hit that when you start VA, and it will do the rest. As you learn how to use VA, you can make it a more automatic process. But right now, you just want the problem to go away somehow.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #16 on: August 16, 2016, 11:10:35 PM »
Sorry, just realize the trigger command is: Ctrl+ALT+Shift+Win+L  All Left keys as well.

I was testing out the command to make sure it worked, and that's when I noticed. I had original set the keys like that, and then removed the Win key, but somehow, it ended up back in it.

Also remember, you can't turn the command on, if you have Hot Keys already turned off.

Let us know, if this does the trick or not.

Dreadnaught2005

  • Guest
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #17 on: August 16, 2016, 11:20:28 PM »
got it all setup works great! just dropped it in and it worked.

Now my joyfocus script isnt working, is there any way to make a command to refocus to elite upon moving anypart of my joysitck or throttle?

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Re: Bypass voice attack and disable keyboard when in a second application
« Reply #18 on: August 17, 2016, 03:27:57 AM »
If you ALT+TAB back to Elite, it should be the active window, and turn on hot key again. But it sounds like you don't want to touch the keyboard.

Well, the only easy way I know to do that is this.

I don't have a joystick to test this with.

Find the Light switch in the profile, and double click it. See attached Pic Lights.

And just Check Send this command to.

Check the round hole, and type Elite* in the empty box.

Now, all you have to do, is hit the button on your joystick, that turns your lights on and off. When you do that, it will make Elite Dangerous the active window, at least it should anyway.

You can pick any joystick button to do this with. Or all of them. All it's doing is sending the command directly to Elite, and that's what its suppose to do anyway, but like this, it should change focus to Elite.

I hope this works, I tested with the keyboard, but I don't have joystick. Should work. Let me know.