# AAX GetModifiers 12.5 Win

**URL:** <https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795>\
**Category:** General JUCE discussion\
**Created:** [May 22, 2016, 9:56am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795 "2016-05-22T09:56:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [May 22, 2016, 9:56am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/1 "2016-05-22T09:56:30Z")

</div>

Can anyone else with Pro Tools 12.5 on Windows verify that the Option/Alt modifier isn’t getting returned correctly in Component::mouseDown() which I believe should get the mods correctly using the AAX GetModifiers().

Thanks,

Rail

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [May 22, 2016, 4:55pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/2 "2016-05-22T16:55:33Z")

</div>

Yup was able to re-produce this. It also seems that when using Ctrl+Shift, JUCE only detects Shift. I’ll attempt a fix tomorrow.

Also,… and I should probably know this,… is it somehow possible to debug ProTools AAX plug-ins on Windows. Protools always closes complaining about an attached debugger. Debugging works on Mac.

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [May 22, 2016, 8:37pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/3 "2016-05-22T20:37:34Z")

</div>

Thanks Fabian,

Check out the Avid dev thread titled: Ensuring correct modifier-click behavior in Pro Tools

I’ll check the 12.4 Dev build/Debugger and get back to you.

Cheers,

Rail

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [May 23, 2016, 11:58am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/4 "2016-05-23T11:58:05Z")

</div>

> [@fabian](#):
>
> Also,… and I should probably know this,… is it somehow possible to debug ProTools AAX plug-ins on Windows. Protools always closes complaining about an attached debugger. Debugging works on Mac.

I just tested with PT 12.4 Dev and quit while attached… and it quit cleanly. I’ll send you a PM with my debug options.

I was able to debug and step through my plug-in’s code. Make sure the plug-in matches the code in the debugger and all the symbols have been loaded.

Rail

---

<div class="post-metadata">

**Author:** ![ckhf](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@ckhf](https://forum.juce.com/u/ckhf)\
**Post date:** [May 23, 2016, 12:09pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/5 "2016-05-23T12:09:29Z")

</div>

> [@fabian](#):
>
> Also,… and I should probably know this,… is it somehow possible to debug ProTools AAX plug-ins on Windows. Protools always closes complaining about an attached debugger.

You can’t start PT from Visual Studio directly but it should be possible to run PT Dev and attach the debugger. There’s also a digioptions setting to show a popup before the plugins are loaded in case you need to debug the plugin initialisation.

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [May 23, 2016, 2:46pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/6 "2016-05-23T14:46:57Z")

</div>

> [@ckhf](#):
>
> You can’t start PT from Visual Studio directly but it should be possible to run PT Dev and attach the debugger.

Thanks, that was it!

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [May 23, 2016, 5:53pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/7 "2016-05-23T17:53:08Z")

</div>

OK. Please try the develop branch for a fix.

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [May 23, 2016, 7:25pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/8 "2016-05-23T19:25:18Z")

</div>

Hi Fabian,

Since I’m stuck on 4.0 until the MultiBus/AudioProcessorGraph is fixed… I merged this into my local copy of JUCE and it tests great.

The only caveat for Alt+click on a slider (or similar) – the plug-in must be clicked on first to get focus before it’ll respond to the Alt-click to reset a slider (or similar) to default.

Thanks!!

Rail

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [May 23, 2016, 7:34pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/9 "2016-05-23T19:34:41Z")

</div>

Hmm that’s strange. I’ll have a look. Also, please know, that multibus fixes are in the works so you’ll soon be able to update.

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [August 1, 2017, 9:53pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/10 "2017-08-01T21:53:22Z")

</div>

These seem broken in 12.8 on Windows 10 🙄

Rail

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [August 2, 2017, 8:01am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/11 "2017-08-02T08:01:06Z")

</div>

Oh no not again… the AAX modifier key madness is really the single worst aspect about the AAX SDK. I’ll investigate.

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [August 2, 2017, 8:11am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/12 "2017-08-02T08:11:51Z")

</div>

[![](https://dl.dropboxusercontent.com/s/klnb7br51d7at4a/cat_a_mole.gif?dl=0) ](https://dl.dropboxusercontent.com/s/klnb7br51d7at4a/cat_a_mole.gif?dl=0)

Rail

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [August 2, 2017, 12:01pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/13 "2017-08-02T12:01:44Z")

</div>

So the modifier keys still seem to work for me in 12.8. You are talking about the focus issue, right?

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [August 2, 2017, 1:26pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/14 "2017-08-02T13:26:37Z")

</div>

If it’s the focus issue that you are talking about: are you sure that non-JUCE plug-ins can correctly register the modifier keys when clicking on them when they are not focused? JUCE is correctly calling `AAX_IViewContainer::GetModifiers` but it simply returns zero on the first click.

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [August 2, 2017, 5:51pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/15 "2017-08-02T17:51:43Z")

</div>

No, I have a custom ComboBox in my plug-in and in the parent component:

```
 void COutputComponent::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
 {
     if (comboBoxThatHasChanged == m_pOutputMenu)
         {
         ModifierKeys mods = ModifierKeys::getCurrentModifiers();

         : 

         if (mods.isAltDown())
           {
           // In PT 12.8 on Windows 10 I'm not getting here

           CPlayerAudioProcessor* pProcessor = m_pParent->getAudioProcessor();
                
           if (pProcessor != nullptr)
                 pProcessor->setAllOutputs (m_szOutput);
           }
         : 
         }
 }

```

I debugged and on mouse move when you check the modifiers it’s not picking up the Alt key reliably… I’ll keep digging. (The VST works fine on the same system).

Thanks,

Rail

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [August 4, 2017, 10:48am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/16 "2017-08-04T10:48:18Z")

</div>

OK I’m really stumped on this one: in doesn’t seem to be specific to AAX. If you run the standalone version of the plug-in, I get the same result on Windows. The modifiers are not picked up correctly in mouseMove events.

In JUCE the modifiers only get updated when the system sends us key down and key up events. However, since some change in Windows 10, the key down event (`WM_KEYDOWN`) for modifiers is only sent once the modifier is released (?!?). It is then immediately followed by a key up event. For some reason, when running the plug-in as a VST, everything seems to work correctly.

Has anybody seen this before and can point me to some workaround. It turns out that it’s also really hard to google.

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [August 4, 2017, 11:10am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/17 "2017-08-04T11:10:27Z")

</div>

Hi Fabian,

I’m just putting out another fire related to Waves plug-ins… I had to modify the JUCE VST scanner code to deal with a single (out-dated) WaveShell bundle crashing causing all the rest of the Waves plug-ins to be ignored… but that’s another issue and I’m almost done with the patch.

I’ll look into this later today.

Thanks for looking into it.

Rail

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [August 4, 2017, 11:28pm UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/18 "2017-08-04T23:28:46Z")

</div>

So I took the Plug-in demo and added a ComboBox to it and it’s detecting the Alt key and other mod combos I use okay in the comboBoxChanged() callback in Standalone.

I see the same behavior as you do where the system only send the plug-in the ALT key on key up… but if you click a mouse button while you have a modifier depressed… then it works… which is fine for my use.

I’ll now try and build the demo as an AAX and test it.

The answer to the Key Down issue may be answered using LowLevelKeyboardProc ?

[https://msdn.microsoft.com/en-us/library/windows/desktop/ms644985(v=vs.85).aspx](https://msdn.microsoft.com/en-us/library/windows/desktop/ms644985(v=vs.85).aspx)

Thanks,

Rail

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [August 5, 2017, 9:00am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/20 "2017-08-05T09:00:11Z")

</div>

So in the AAX using

```
 ModifierKeys::getCurrentModifiers()

```

in the comboBoxChanged() callback doesn’t work… but if I check the mods in the actual ComboBox derived class’ mouseDown() and mouseUp() using the MouseEvent mods variable the mod state is correct… so I’ve just created a few boolean class variables to get the mods’ state(s) in the comboBoxChanged() and that’s working on all platforms.

Thanks,

Rail

---

<div class="post-metadata">

**Author:** ![railjonrogut](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/railjonrogut/32/505_2.png) [@railjonrogut](https://forum.juce.com/u/railjonrogut)\
**Post date:** [August 7, 2017, 11:17am UTC](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795/21 "2017-08-07T11:17:10Z")

</div>

> [@fabian](#):
>
> If it’s the focus issue that you are talking about: are you sure that non-JUCE plug-ins can correctly register the modifier keys when clicking on them when they are not focused? JUCE is correctly calling AAX\_IViewContainer::GetModifiers but it simply returns zero on the first click.

So I did a comparison between my plug-in and Waves C6 and the stock PT EQ…

[![](https://us1.discourse-cdn.com/flex026/uploads/juce/original/3X/1/4/144e4464c3c73a91e9944960ab141a83716429f4.jpeg "JUCE ALT CLICK") ](https://www.youtube.com/watch?v=sdgNVBI40Kk)

The non-JUCE plug-ins respond immediately to an Alt+click, where with my plug-in I have to Alt+click twice (once to get focus and then to reset).

Rail

[Next page](https://forum.juce.com/t/aax-getmodifiers-12-5-win/17795.md?page=2)
