Platforms to show: All Mac Windows Linux Cross-Platform
MediaKeysMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Media Keys | MBS MacFrameworks Plugin | 11.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
First written to catch play, fast and rewind keys from Apple keyboards.
Later extended to also catch other keys.
Still not all keys are available on all keyboards.
Please have only instance of this class running your application.
- event receivedMediaKeyEvent(e as NSEventMBS, keyCode as Integer, keyFlags as Integer, keyState as Integer, keyRepeat as Integer)
- property Keys(keyCode as Integer) as Integer
- 3 methods
- method Constructor
- method startWatchingMediaKeys
- method stopWatchingMediaKeys
- 28 constants
Key Constants
Constant | Value | Description |
---|---|---|
kMediaKeyBrightnessDown | 3 | Example |
kMediaKeyBrightnessUp | 2 | Example |
kMediaKeyCapsLock | 4 |
Caps Lock Example |
kMediaKeyContrastDown | 12 | Example |
kMediaKeyContrastUp | 11 | Example |
kMediaKeyDownArrow | 9 | Example |
kMediaKeyEject | 14 |
Eject key Example |
kMediaKeyFast | 19 |
Fast key. On by default. Example |
kMediaKeyHelp | 5 | Example |
kMediaKeyIlluminationDown | 22 | Example |
kMediaKeyIlluminationToggle | 23 | Example |
kMediaKeyIlluminationUp | 21 | Example |
kMediaKeyLaunchPanel | 13 | Example |
kMediaKeyMute | 7 |
Sound Mute Example |
kMediaKeyNext | 17 | Example |
kMediaKeyNumLock | 10 |
Num Lock key Example |
kMediaKeyPlay | 16 |
Play key. On by default. Example |
kMediaKeyPower | 6 |
Power Key Example |
kMediaKeyPrevious | 18 |
Previous key Example |
kMediaKeyRewind | 20 |
Rewind Key. On by default. Example |
kMediaKeySoundDown | 1 |
Sound down Example |
kMediaKeySoundUp | 0 |
Sound up Example |
kMediaKeyUpArrow | 8 | Example |
kMediaKeyVideoMirror | 15 | Example |
Mode Constants
Constant | Value | Description |
---|---|---|
kModeBlock | 1 |
Block the event. |
kModeEventAndBlock | 2 |
Call the receivedMediaKeyEvent event and block the event. |
kModeEventAndPass | 3 |
Call the receivedMediaKeyEvent event and pass the event to other applications. |
kModePass | 0 |
Pass event to other applications. |
This class has no sub classes.
Some examples using this class:
Blog Entries
- MBS Real Studio Plugins, version 11.2pr12
- MBS Real Studio Plugins, version 11.2pr11
- MBS Real Studio Plugins, version 11.2pr9
- MBS Real Studio Plugins, version 11.2pr9
The items on this page are in the following plugins: MBS MacFrameworks Plugin.