Author Topic: Hook Plugin  (Read 3302 times)

0 Members and 1 Guest are viewing this topic.

TonyBirt

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 1
    • View Profile
Hook Plugin
« on: August 23, 2018, 10:08:50 PM »
Apologies for the question, I have basic experience in VC but can't seem to figure out the hook plugin (I am missing something)?.  What I am trying to achieve is to turn vc.on with the press of a key combination.

Under plugins I click on hook and add my key combination under specific keys and tick hook enabled.  From there how do I attach the hook into the command tree action, listen?

Thanks
Tony

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hook Plugin
« Reply #1 on: August 23, 2018, 10:28:24 PM »
Once you've configured the hook plugin correctly and save your options, it should generate events when the keys are pressed.

Do you know how to use events in VoxCommando?

They show up in the history window and you can essentially just drag them onto an existing command in the tree editor to have the event trigger that command.

If an event is not showing up in the history window then you probably did not configure the hook plugin correctly.

TonyBirt

  • Jr. Member
  • **
  • Posts: 7
  • Karma: 1
    • View Profile
Re: Hook Plugin
« Reply #2 on: August 23, 2018, 11:02:14 PM »
Great thanks jitterjames, got it working :)

ReneZal

  • Newbie
  • *
  • Posts: 1
  • Karma: -1
    • View Profile
Re: Hook Plugin
« Reply #3 on: February 12, 2019, 09:52:03 AM »
Is there anywhere a tutorial on how to configure the hook plugin correctly. I guess I'm missing something since the events aren't showing up in the history window.
These are the best insulated hunting boots I found.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hook Plugin
« Reply #4 on: February 12, 2019, 10:36:40 AM »
For what? Mouse or keyboard? Specific keys, or all keys?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hook Plugin
« Reply #5 on: February 12, 2019, 12:51:14 PM »
This is the simplest way to get it working for the keyboard.  See the attached image.  Remember to save your settings.

Then you will see all keyboard events in your history window.

Note that on the main VC menu "show all events" should be checked, which it is by default.

Aniv_D

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 10
    • View Profile
Re: Hook Plugin
« Reply #6 on: January 05, 2020, 04:57:08 PM »
Hello, James.
at the moment, the plugin generates keyboard events such as Hook.D and Hook.D.Up
I have a big request to make it generate events with the same name
as the Hook.Keyboard.D and Hook.Keyboard.D.Up or at least Hook.Key.D and Hook.Key.D.Up
this would make it very easy for me (and hopefully others users) life when it would be necessary to intercept events only from the keyboard.
This would allow the Hook event mask to be used Hook.Keyboard.* or Hook.Key.* to filter from the Hook.Mouse.*
PS. about the events of Hook.Keys I know,  but in my case it's interesting to Hook.D and Hook.D.Up, etc.
I hope You will think about the offer :) Thanks

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hook Plugin
« Reply #7 on: January 05, 2020, 06:00:09 PM »
Yes, I can probably add this option without too much difficulty.

But it sounds like you want to have one event that captures all keyboard events and then does some logic or whatever in this case.  So it sounds like maybe you could get the same effect by using the hook setting "Gen Payload Events" instead of using "Gen Named Events". Try it and let me know if this works for you.  If it works, it is more efficient than using an event with a (*) wildcard.

Aniv_D

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 10
    • View Profile
Re: Hook Plugin
« Reply #8 on: January 06, 2020, 03:53:19 AM »
Yes, this can solve some problems, although it will generate too many events (especially if used in conjunction "Gen Payload Events" and "Gen Named Events"), which will make it difficult to read the logs.
But still, if in the future you decide to update the names of plugin events, then my suggestion is to rename:

Hook.D -> Hook.Keyboard.D.Down (or Hook.Key.D.Down)
Hook.D.Up - > Hook.Keyboard.D.Up (or Hook.Key.D.Up)
Hook.Keys -> Hook.Keys.Down

This could (I think) have more control when using an event with a (*) wildcard. But if not, it's nothing to worry about :)
« Last Edit: January 06, 2020, 04:00:04 AM by Aniv_D »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Hook Plugin
« Reply #9 on: January 06, 2020, 02:25:22 PM »
The problem is that I can't just change the event names or it will break the configurations for anyone using Hook when they upgrade to the new version.

So I need to find a way to add new options to adjust event name layout, while leaving the default settings so that event names will remain the same as in the older version for other users.

It sounds easy but it isn't.  :bonk