How to: Put MCP buttons on your mouse or keyboard

free(?!) clues!

How to: Put MCP buttons on your mouse or keyboard

Postby Kannkor » 24 Mar 2014, 19:23

This is something I've meant to do for years, and never really got around to it. Most people have an extra mouse button, or keyboard button, or any combination (Control+Shift+Alt+W, for example could be used), that they would like to "give" that button some use.

In this example, I'm going to use a mouse button as an example. But you can do this exact same procedure for a keyboard button, or a combination.

First thing you need to do, is determine if Innerspace supports your device. In the console type the following:
press -keylist
This will give you a list of every key that Innerspace understands.
Depending on your mouse, you will probably see things like: Mouse1, Mouse2, Mouse3 etc. You'll want to be a little careful here, because Mouse1 is usually your regular left click!
Worth noting: Take special note these keys also: Ctrl, Alt, and Shift. I'll mention them later and how to use them if needed.

Here is where it gets a little tricky. You may not know which button, is what on your mouse. I'll get to that in just a moment.
First, if you have software for your mouse where you can pre-define a button (for example, my Mouse4 may already be set to 'B'). YOU WANT TO UNASSISGN THESE BUTTONS. How you do this? Will greatly depend on the software you are using. For me using Logitech software, it's as easy as selecting the button in the software, and choose "Unassigned".
For example:
UnassignMouseButtons.JPG
UnassignMouseButtons.JPG (20.56 KiB) Viewed 6417 times

The reason unassigning is important, is it can change the output in the next section.

On the "Load" tab of Ogrebot, you will see a new box on the left. "Button test".
ButtonTest.JPG
ButtonTest.JPG (27.18 KiB) Viewed 6417 times

Click inside this text box, and "use" your mouse button you want to test. Then look in the console.
For me, my regular "left mouse click" is:
The key you pressed was ( G600-G1 ).
That means I definitely want to avoid that key ( G600-G1 ), or it would do it every single time you left clicked!
Now press the button you WANT to assign something too. For me, the button on the side of my mouse, comes up with this:
The key you pressed was ( G600-G9 ).
That means the "button" I'm going to assign the command to, is G600-G9. Or as you may call it, the button on the side of your mouse.

Remember I told you to take note of: Ctrl, Alt, and Shift. If you're using a keyboard button and you want to use one of these modifiers, you do so by adding the modifier and an plus ( + ) sign. For example, if you wanted to use Control + Alt + W, it would look like this: ( Ctrl+Alt+W ). In my example, that would replace ( G600-G9 ).

Next, we have to determine what we want this button to do. In this example, I'm going to assign this button my MCP button of "Lets go".
How the MCP works, is every button has a specific name. This is NOT the text you visually see. It is a unique name for each button.
For now, there are two ways to find this name. Open an XML file (blah!), or we can cheat.
On the MCP, use the [X] Enable Swapping button. Then click on the button we want "Lets go", then click on a DIFFERENT button. Feel free to do an empty space. The buttons change places, however the important part is what is in the console.
In my example, I get this:
Swapping ( StaticFrame_1_Column_5_Button_5_ ) with ( StaticFrame_1_Column_4_Button_5_ )
This means the "Lets go" button's name is: StaticFrame_1_Column_5_Button_5_
And the empty button I clicked on is (not that we care): StaticFrame_1_Column_4_Button_5_

Before we go any further, if you just moved MCP buttons, make sure you move them back to their original locations.
Also worth noting: Once you know the name of a button, you can easily "guess" the other buttons around it. Each area of the MCP is named a little differently, so I recommending using this method above to find the name, then you can use logic to find any right around it. For example: StaticFrame_1_Column_4_Button_5_, if we change the "5" to a "6", it is the next button(downwards). Likewise, if we change the "4" to a "3", it moves the column (leftwards).


We have our mouse button ( G600-09 ).
We have our MCP button name ( StaticFrame_1_Column_5_Button_5_ ).
The "command" to execute an MCP button is: a_MCPCodeExecuter
Now, we need to give it a name. This name can be anything you want. I personally recommend something that makes sense to you.
For me, I use the buttonname, an underscore, and a VERY brief description.
The name I'm going to give this Mouse_MCP button is: ( G600-09_LetsGo ).

Now to put it all together:
Our actual Innerspace command is the 'Bind' command. http://www.lavishsoft.com/wiki/index.php/ISKernel:Bind_%28Command%29:
bind -press G600-09_LetsGo G600-09 a_MCPCodeExecuter StaticFrame_1_Column_5_Button_5_

To break this down:
We're setting up a ( bind ) when a key is pressed ( -press ) and giving it the name ( G600-09_LetsGo ). The key to active this is ( G600-09 ) and when it is pressed it should do ( a_MCPCodeExecuter StaticFrame_1_Column_5_Button_5_ ).

Whew!
Now, I would assume you probably don't want to have to type that into the Innerspace console every time you load EQ2. Thankfully there's a way to have it "Load" every time you load a toon. Such as... the "Load" tab in Ogrebot :)

Copy/paste the command into the Text to be executed, and press the Add button.

I've went ahead and created 4 buttons. Mine buttons do the following:
Lets go
Campspot
Joust Out
ChangeCampSpot To Me

Apparently I forgot Joust in...
Anyways! Here is how mine looks, with my 4 buttons done. (You will notice I have two other commands above it and one is disabled, it is unrelated to this exercise).
CompletedExamples.JPG


Now, to try out your buttons, you have to make sure EQ2 has "focus". The easiest way to do this, is to "Click" on the in-game chat window (you don't have to click the spot where you type, just click on the window itself. It just makes sure it has focus, instead of the "Button test" text button we were typing in before). It also makes sure if you have the console open, it does not have focus (again, EQ2 has to have focus. You CAN have the console open, then click the in-game chat window so you have the console open but EQ2 still has focus).

A few things to note:
The unique name of the MCP button ( StaticFrame_1_Column_4_Button_5_ ) for example, always means that exact button. Even if you swap it, that name is still on the same button. When you swap buttons, it doesn't actually swap the buttons, they just swap what they were doing.

These binds (hotkeys) will remain active until you close your EQ2 session down, or manually delete them. (They are NOT removed when Ogrebot is closed, but they are always cleared when the eq2 session is closed down).

Making these hotkeys effectively gives whatever hotkey you choose (in this case, mouse buttons) have TWO purposes. Their original ones (which we made unassigned) plus what we gave it. For example, lets say you used the "1" key on your keyboard, and made it campspot. When you press "1" on your keyboard, it would campspot everyone ONE press the first hotkey on the first hotbar in-game. This is why I recommend you use buttons you can unassign, so you have no conflicts.
Kannkor
 
Posts: 354
Joined: 06 Nov 2013, 11:49

Return to Guides & Strats

Who is online

Users browsing this forum: No registered users and 10 guests