FAQ  •  Register  •  Login

Fixed - Adding a toggle for a specifc Key Map

Moderator: MiRai

<<

Shadowandlight

Posts: 157

Joined: Sun Apr 07, 2013 1:40 am

Post Sat Dec 06, 2014 1:10 am

Fixed - Adding a toggle for a specifc Key Map

Fixed, I guess restarting innerspace solved it...

I have a (long) list of mapped keys that I am using for rollovers inside VFX windows (called EVE Rollover w/ Saftey). The Saftey toggle is what I am trying to figure out.

In order to prevent me from accidentally tripping them, I am trying to get a toggle mapped key working, using "ctrl" as the saftey switch.

However it wont work. What it ends up doing is tripping the 1st mapped key in the keymap, instead of allowing my mouse to do so when entering / exiting the vfx boxes.

Hopefully I am making sense....

Heres the current Mapped Key inside the Keymap "EVE Rollover w/ Saftey"

Code:
<?xml version="1.0" encoding="utf-8"?>
<Box xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ObjectType>ISBoxer_Toolkit.Configs.KeyMaps.MappedKey</ObjectType>
  <SerializedObject>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;MappedKey xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;Name&gt;Toggle Rollovers&lt;/Name&gt;
  &lt;Description&gt;Generated by Mapped Key Wizard with 'Key Map Toggler'&lt;/Description&gt;
  &lt;Hold&gt;
    &lt;Value&gt;false&lt;/Value&gt;
  &lt;/Hold&gt;
  &lt;UseFTLModifiers&gt;
    &lt;Value&gt;false&lt;/Value&gt;
  &lt;/UseFTLModifiers&gt;
  &lt;SendNextClickBlockLocal&gt;false&lt;/SendNextClickBlockLocal&gt;
  &lt;ManualLoad&gt;false&lt;/ManualLoad&gt;
  &lt;ResetTimer&gt;0.1&lt;/ResetTimer&gt;
  &lt;ResetType&gt;Never&lt;/ResetType&gt;
  &lt;Mode&gt;OnPressAndRelease&lt;/Mode&gt;
  &lt;Steps&gt;
    &lt;Step&gt;
      &lt;Stick&gt;0&lt;/Stick&gt;
      &lt;Stop&gt;false&lt;/Stop&gt;
      &lt;Stump&gt;false&lt;/Stump&gt;
      &lt;Disabled&gt;false&lt;/Disabled&gt;
      &lt;Actions&gt;
        &lt;MappedKeyAction xsi:type="KeyMapAction"&gt;
          &lt;Target&gt;all&lt;/Target&gt;
          &lt;Value&gt;On&lt;/Value&gt;
          &lt;KeyMapString&gt;Eve Rollover w/ Saftey&lt;/KeyMapString&gt;
        &lt;/MappedKeyAction&gt;
        &lt;MappedKeyAction xsi:type="PopupTextAction"&gt;
          &lt;Target&gt;self&lt;/Target&gt;
          &lt;Text&gt;Rollover ON&lt;/Text&gt;
          &lt;DurationMS&gt;500&lt;/DurationMS&gt;
          &lt;FadeDurationMS&gt;500&lt;/FadeDurationMS&gt;
          &lt;Red&gt;255&lt;/Red&gt;
          &lt;Green&gt;255&lt;/Green&gt;
          &lt;Blue&gt;255&lt;/Blue&gt;
        &lt;/MappedKeyAction&gt;
        &lt;MappedKeyAction xsi:type="MappedKeyStepAction"&gt;
          &lt;Target&gt;all other&lt;/Target&gt;
          &lt;MappedKey&gt;
            &lt;KeyMapString&gt;Eve Rollover w/ Saftey&lt;/KeyMapString&gt;
            &lt;MappedKeyString&gt;Toggle Rollovers&lt;/MappedKeyString&gt;
          &lt;/MappedKey&gt;
          &lt;Action&gt;Add&lt;/Action&gt;
          &lt;Value&gt;-1&lt;/Value&gt;
        &lt;/MappedKeyAction&gt;
      &lt;/Actions&gt;
    &lt;/Step&gt;
    &lt;Step&gt;
      &lt;Stick&gt;0&lt;/Stick&gt;
      &lt;Stop&gt;false&lt;/Stop&gt;
      &lt;Stump&gt;false&lt;/Stump&gt;
      &lt;Disabled&gt;false&lt;/Disabled&gt;
      &lt;Actions&gt;
        &lt;MappedKeyAction xsi:type="KeyMapAction"&gt;
          &lt;Target&gt;all&lt;/Target&gt;
          &lt;Value&gt;Off&lt;/Value&gt;
          &lt;KeyMapString&gt;Eve Rollover w/ Saftey&lt;/KeyMapString&gt;
        &lt;/MappedKeyAction&gt;
        &lt;MappedKeyAction xsi:type="PopupTextAction"&gt;
          &lt;Target&gt;self&lt;/Target&gt;
          &lt;Text&gt;Rollover OFF&lt;/Text&gt;
          &lt;DurationMS&gt;500&lt;/DurationMS&gt;
          &lt;FadeDurationMS&gt;500&lt;/FadeDurationMS&gt;
          &lt;Red&gt;255&lt;/Red&gt;
          &lt;Green&gt;255&lt;/Green&gt;
          &lt;Blue&gt;255&lt;/Blue&gt;
        &lt;/MappedKeyAction&gt;
        &lt;MappedKeyAction xsi:type="MappedKeyStepAction"&gt;
          &lt;Target&gt;all other&lt;/Target&gt;
          &lt;MappedKey&gt;
            &lt;KeyMapString&gt;Eve Rollover w/ Saftey&lt;/KeyMapString&gt;
            &lt;MappedKeyString&gt;Toggle Rollovers&lt;/MappedKeyString&gt;
          &lt;/MappedKey&gt;
          &lt;Action&gt;Sync&lt;/Action&gt;
          &lt;Value&gt;1&lt;/Value&gt;
        &lt;/MappedKeyAction&gt;
      &lt;/Actions&gt;
    &lt;/Step&gt;
  &lt;/Steps&gt;
&lt;/MappedKey&gt;</SerializedObject>
</Box>
<<

Golgalath

Posts: 4

Joined: Tue Dec 02, 2014 2:02 pm

Post Mon Dec 08, 2014 5:10 am

Re: Fixed - Adding a toggle for a specifc Key Map

It makes enough sense to point in the right direction (I think, I'm just starting to get into more complicated maps myself).

Given your current setup this is how I'd do it.

1) On rollover action is a do mapped key action pointing to existing mapped keys (EVE rollover /w saftey). Do this for seperating out the steps to change setups easier.

2) Set step one on all these keys to disabled on startup, so now when you do your rollover it point to effectively empty keys of nothing.

3) Create a mapped key (hotkey ctrl if thats what you want, or whatever hotkey you desire) with 2 steps. Set this to activate on press AND release.

4) Step 1 of this toggle key is a set of mapped key step state action (or something like that under mapped key actions). this lets you enable/disable the steps on your EVE rollovers /w saftey. So this hotkey will have a whole list of enable step 1 or mapped key blah actions for each of your current mapped keys (set one up the copy the action, then paste the action back in, change the key it points too is the quickest way)

5) Step 2 of this toggle you can copy and paste the first step and change all the mapped key step state actions to disable.

So now default is rollovers point to empty keys. Pressing ctrl enables the actions in these empty keys whilst it is held, the release triggers step 2 and switches the steps all back off.

Hope that helps, and makes a little sense.

Gol
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4591

Joined: Sat Feb 15, 2014 11:14 am

Location: In the dining room, with the lead pipe.

Post Mon Dec 08, 2014 10:44 am

Re: Fixed - Adding a toggle for a specifc Key Map

Just thought I'd add what I told Shadowandlight on IRC.

1. Create a Key Map, and put all the Rollover mapped keys in it.
2. Don't assign this Key Map to the characters/character set.
3. Create another mapped key to enable/disable the Key Map with a Key Map State Action. You only really need to load this Key Map on self (depending on the toggle type), but it may be easier to do all as you can put other mapped keys in there that you only want active at the time too. This should be a 2 step mapped key with Step 1 enabling the Key Map, Step 2 disabling it. Set it to execute on "press OR release". The hot key you select is the toggle key, and the Key Map will only be enabled while this is held down.
4. Add the Rollover mapped keys to the "Do Mapped Key on Enter/Exit" of the video FX regions.

The point of this is so you don't end up with 100 mapped keys set to disabled on startup, and then need a massive master mapped key to enable them all. Instead you just have a group of mapped keys in a Key Map, which are not assigned to your character set until you load the Key Map by pressing a key. No need to manage their state individually as it is all managed as a group.

Notes on the configuration that was built and had a few niggly issues.

  • Don't put the toggle mapped key in the same Key Map as you are trying to enabled/disable? Put it in Non-combat or something.
  • You probably want all your Rollover mapped keys to be "Execute a step when the Hot Key is: pressed", so they execute when the mouse enters the VideoFX region rather than when the mouse exits. If they are set to "released", then they will only execute when you exit the VideoFX. If they are "press OR release", then 1 step on enter and 1 step on exit.
  • You can set the default "execute a step when" setting for the Key Map by selecting the Key Map name at the top of the lower left pane. This will only affect Mapped Keys in that Key Map which are using the default value. This normally shows like "released (Default)". If you have specifically set a value then they will continue to use that.
  • The Mapped Key Wizard Key Map Toggler will add a couple of extra steps to try and synchronise the toggle key state across all your clients if you don't choose the execute on "press OR release". So if you then edit it later to be a "press OR release" type toggle so you can get the "only while I hold this key down toggle" behaviour, then you should probably remove the sync state actions. Same goes the other way, if you do choose the "press OR release" during the wizard, but later want a set and forget type toggle (e.g. Key Maps enable/disable), then you will probably want to add some Mapped Key Step Actions to sync the current step across all the clients.
    

Return to Key Maps

Who is online

Users browsing this forum: No registered users and 0 guests

cron