Start Modifier Key


#1

How do you detect if the user is holding down the start key? Protools uses this for some shortcuts and I want to be able to detect it’s pushed …


#2

I’m new to JUCE so apologies if this isn’t what you’re looking for. It should work in C++ Windows programs though.

GetKeyState can be used to tell you if a “virtual key” is being pressed.

When you say start key, do you mean the “Windows key”? If so, there are apparently two you’ll have to check:

  • VK_LWIN (0x5B) - Left Windows key (Natural keyboard)
  • VK_RWIN (0x5C) - Right Windows key (Natural keyboard)

Hope that helps!

Shane


#3

This might well be what I need :slight_smile:


#4

Jules - is there a reason the windows specific modifier keys arent’ available in ModifierKeys? You’ve got to deal with some platform specifics there anyway …


#5

A good question imho! The PT automation dialog specifically asks for a Windows Key modifier to be implemented (further, the PT specific key strokes, different for Mac and Win, should block click propagation at Component level).


#6

In Pro Tools you have to rely on the modifier keys passed by GetViewContainer()->GetModifiers() as Pro Tools won’t pass the Windows key to plugins (as far as I remember).