Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plugins and Accept User Keyboard Input

Featured Replies

Hello, is there a way to get keys pressed? I would like to have two "keybinds", to my plugin if it is at all possible?

18 minutes ago, Apexx said:

Hello, is there a way to get keys pressed? I would like to have two "keybinds", to my plugin if it is at all possible?

Can you explain a little more on what you mean?

If you're asking if it's possible to Press a Keybind from a Plugin , the answer is yes. If your question is: Is it possible to click a WoW macro by using a Keybind from a plugin, then answer is yes :).

  • Author

I would like to have the ability to add or remove the nearest WoW game object to the collections list for my WRadar plugin using hotkeys, like "Shift+Insert" and "Shift+Delete".

  • Author

I just keep getting the following in log

Quote

[D] 13:26:25 - [Keyboard Hook] Couldn’t register the hot key.

 

  • Author

I looked into the code and it seems you had used your own form events handling. I am using the WRobot's settings window from inside the class itself.
I don't think the InputHook catches anything while the game window has focus. I guess I am trying to catch the even from WRobot directly.

19 minutes ago, Apexx said:

I looked into the code and it seems you had used your own form events handling. I am using the WRobot's settings window from inside the class itself.
I don't think the InputHook catches anything while the game window has focus. I guess I am trying to catch the even from WRobot directly.

I initially implemented it, because sometimes i had a bug from WRobot's keyboard class which didn't hooked my keys, dunno if it's fully working now.

  • Author

Yeah I cannot get WRobot's keyboard class to work either. Seen the examples throughout the forums though.

public class Main : IPlugin
{
	private Wradar.InputHook.KeyboardHook _hook;
	private Keys _keyAdd = Keys.None;
	private Keys _keyRemove = Keys.None;
	
	public void Initialize()
	{
		_keyAdd = Keys.F5;
		_keyRemove = Keys.F6;
		_hook = new Wradar.InputHook.KeyboardHook(true);	// Strange it doesn't work with this set as Global
		_hook.KeyDown += HookOnKeyDown;
		
		_isLaunched = true;
	}

	private void HookOnKeyDown(Keys key, bool shift, bool ctrl, bool alt)
    {
        Logging.WriteDebug("key = " + key);

        if (key == _keyAdd)
        {
            try
            {
                Logging.WriteDebug("Would you like to add ____ object to the collections list?");
            }
            catch (Exception ex)
            {
                Logging.WriteError("HookOnKeyDown _keyAdd Error:\n" + ex);
            }
        }
        else if(key == _keyRemove)
        {
            try
            {
                Logging.WriteDebug("Would you like to remove ____ object from the collections list?");
            }
            catch (Exception ex)
            {
                Logging.WriteError("HookOnKeyDown _keyRemove Error:\n" + ex);
            }
        }
    }
	
	public void Dispose()
    {
        try
        {
            if (_hook != null)
            {
                _hook.KeyDown -= HookOnKeyDown;
                _hook.Dispose();
            }
        }
        catch { }
        _isLaunched = false;
    }
}

 

  • Author

Would it be easier to create a small addon for WoW directly that communicates with the plugin? I don't have much knowledge  integrated an addon with WRobot. How would one get/set variables from WRobot plugin data to an addon?

  • Author

Yeah I don't think KeyboardHook is working. I have tried using Target framework .NET Framework 4.5 as well as other later versions and it still cannot register hot key.
I also tried many different variations of hot key combinations.

readonly KeyboardHook _hookKeybinding = new KeyboardHook();

public InitMethod()
{
   _hookKeybinding.KeyPressed += (object sender, KeyPressedEventArgs e) =>
   {
      Logging.Write("Key was pressed!");
   };

   _hookKeybinding.RegisterHotKey(ModifierKeys.Shift, Keys.Insert);
}

Something like this is not working for you?

  • Author
13 minutes ago, Avvi said:

Just to be sure, did you call the InitMethod() from your Plugin Initializer?

Yes, I did.

Just now, Apexx said:

No errors, just the same [Keyboard Hook] Couldn’t register the hot key.

Oh damn i had the same problems y.y thats why i switched over to lua ingame detection. This will be a part for Driodz.

  • Author

Yeah I don't know. I somewhat give up on it for now. People will just have to pause/stop the bot and go to Plugin Settings to add/remove items from the collections list for now. Thanks though, @iMod

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.