Guide: Role Toggle Button
I'm dualboxing with a Warrior / Cleric combination and I find I have several roles for my Cleric depending on the situation. I setup a Toggle Button in game that I can click to change the keymaps that the Cleric uses based on the in-game Role I switch to. For example, my Warden behaves much different than my Shaman while dual boxing.
I'm going to keep it simple and assume that I'm using 2 roles, with a DPS Cycle, and a Heal Cycle that are unique for each role. I'll be defining the Toggle Button for only the cleric, but you can easily just repeat the process for other characters.
1) Create a Keymap to story your Virtual Key Placeholders. These are the "actions" you will be performing. I simply create a Keymap called Heal Cycle and DPS Cycle that popup text "Virtual::Heal Cycle" and "Virtual::DPS Cycle". The popup text will never be displayed once everything is good. You do not need to define a hotkey for these.
2) Create the Keymap that will call the virtual functions for each virtual key you define.
A) New mapped Key. Define the name as Do Heal Cycle. Set the Hotkey. Change Hold any Keystroke Actions to Off. Define Actions -> Step 1 to do Heal Cycle in Virtual Keymap defined above.
B) New mapped key. Same as above but make it do DPS Cycle in Virtual Keymap.
3) Create a Keymap for each role and define the keys you want to use. So...
A) New Keymap called Cleric Role 1
i) Define the actual buttons you press for DPS Cycle, you do not need a hotkey.
ii) Define buttons for Heal cycle, again no hotkey needed.
B) New keymap called Cleric Role 2 and define the DPS/Heal cycles as above.
4) Create a toggle button that will call the next step's Toggle Cleric Role key.
5) Create a keymap for the Control functions. This will be what actually changes the role.
A) Create a new Keymap called Toggle Cleric Role. For Step 1 you're going to define the cleric Role 1 keys. So add new Mapped Key Virtualization Action, and then you can drag the correct functions so it looks like "DPS Cycle in Virtual Key Map is now DPS Cycle in Cleric Role 1" -> <Your Cleric Slot>. Repeat this for each function you define in the Virtual Keymap. Then Add a new step and do the same thing, but this time make it use the keys from the Role 2 you defined. I also change the text of the Toggle Button created in step 4 to the role I'm on so it displays "1" or "2".
6) As an option I always create an Initialize keymap that calls the Toggle Cleric Role key. I set this Initialize in the Character Set -> Perform this Mapped Key when Set is loaded. You can add additional initialization things to this. This will set the button to State 1 automatically.
This makes it very nice so I can have my characters do different things based on the role. For instance I have Alt+1 and Alt+2 defined as "Do Cycle 1" and "Do Cycle 2" that perform:
Do Cycle 1:
Warrior -> DPS Cycle
Cleric -> DPS Cycle
Do Cycle 2
Warrior -> DPS Cycle
Cleric -> Heal Cycle
So then I can switch between the two hotkeys. My warrior's DPS Cycle remembers what step it is on and the cleric can go right into the healing.
I'm going to keep it simple and assume that I'm using 2 roles, with a DPS Cycle, and a Heal Cycle that are unique for each role. I'll be defining the Toggle Button for only the cleric, but you can easily just repeat the process for other characters.
1) Create a Keymap to story your Virtual Key Placeholders. These are the "actions" you will be performing. I simply create a Keymap called Heal Cycle and DPS Cycle that popup text "Virtual::Heal Cycle" and "Virtual::DPS Cycle". The popup text will never be displayed once everything is good. You do not need to define a hotkey for these.
2) Create the Keymap that will call the virtual functions for each virtual key you define.
A) New mapped Key. Define the name as Do Heal Cycle. Set the Hotkey. Change Hold any Keystroke Actions to Off. Define Actions -> Step 1 to do Heal Cycle in Virtual Keymap defined above.
B) New mapped key. Same as above but make it do DPS Cycle in Virtual Keymap.
3) Create a Keymap for each role and define the keys you want to use. So...
A) New Keymap called Cleric Role 1
i) Define the actual buttons you press for DPS Cycle, you do not need a hotkey.
ii) Define buttons for Heal cycle, again no hotkey needed.
B) New keymap called Cleric Role 2 and define the DPS/Heal cycles as above.
4) Create a toggle button that will call the next step's Toggle Cleric Role key.
5) Create a keymap for the Control functions. This will be what actually changes the role.
A) Create a new Keymap called Toggle Cleric Role. For Step 1 you're going to define the cleric Role 1 keys. So add new Mapped Key Virtualization Action, and then you can drag the correct functions so it looks like "DPS Cycle in Virtual Key Map is now DPS Cycle in Cleric Role 1" -> <Your Cleric Slot>. Repeat this for each function you define in the Virtual Keymap. Then Add a new step and do the same thing, but this time make it use the keys from the Role 2 you defined. I also change the text of the Toggle Button created in step 4 to the role I'm on so it displays "1" or "2".
6) As an option I always create an Initialize keymap that calls the Toggle Cleric Role key. I set this Initialize in the Character Set -> Perform this Mapped Key when Set is loaded. You can add additional initialization things to this. This will set the button to State 1 automatically.
This makes it very nice so I can have my characters do different things based on the role. For instance I have Alt+1 and Alt+2 defined as "Do Cycle 1" and "Do Cycle 2" that perform:
Do Cycle 1:
Warrior -> DPS Cycle
Cleric -> DPS Cycle
Do Cycle 2
Warrior -> DPS Cycle
Cleric -> Heal Cycle
So then I can switch between the two hotkeys. My warrior's DPS Cycle remembers what step it is on and the cleric can go right into the healing.