# Possible MBS Plugin idea: Intercept menu actions

**URL:** <https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683>\
**Category:** MBS Plugins\
**Tags:** security\
**Created:** [January 16, 2020, 11:59am UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683 "2020-01-16T11:59:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [January 16, 2020, 11:59am UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/1 "2020-01-16T11:59:56Z")

</div>

a few days ago I added a feature for a client to disable contextual menu for Mac and Windows.  
Yesterday I had an idea and now I'd like to ask whether the fine developers here could tell me whether this is a good idea:

When FileMaker shows a menu, the MBS Plugin could put itself between FileMaker and the OS and catch the notification about the menu actions. So when you choose a menu command, our plugin would get to do something first before the menu action is sent to FileMaker app itself.

We could filter menu commands by ID, e.g. you could define that menu command 50281 (exports to excel) is blocked in addition to the FileMaker security checks.  
Or we run even an evaluate for a menu action and see if it returns 1 before blocking, so you could decide on some global variables.

What do you think?

As I didn't try yet to build this, it is not known how much effort it would need and whether it'll work. As usual the feature would only be installed if you call a function.

---

<div class="post-metadata">

**Author:** ![Torsten](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/torsten/32/1574_2.png) [@Torsten](https://the.fmsoup.org/u/Torsten)\
**Post date:** [January 16, 2020, 12:36pm UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/2 "2020-01-16T12:36:07Z")

</div>

What comes to my mind is catching in adverted ESC action on MacBoks with Touch Bar. Under Windows, certain modifier keys are ignored by FM and no action is triggered. Not sure if this is within the scope of your question.

---

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [January 16, 2020, 12:48pm UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/3 "2020-01-16T12:48:01Z")

</div>

We already have a preferences on MacOS to replace ESC with option-ESC for the Touch Bar MacBooks when using internal keyboard. This avoids the unintentional dialog closures.

---

<div class="post-metadata">

**Author:** ![EfficientBizz](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/efficientbizz/32/252_2.png) [@EfficientBizz](https://the.fmsoup.org/u/EfficientBizz)\
**Post date:** [January 16, 2020, 1:51pm UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/4 "2020-01-16T13:51:52Z")

</div>

as we know, with macOS, it's still possible with right mouse click on the upper window frame, to configure/activate, toolbar and so give access to task such as create/delete record.  
As with your "Ruberband-Function", it would be nice to securely shut this off.  
 ![Bildschirmfoto 2020-01-16 um 14.50.52](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/1X/adb4a0c63b506b6d0c98e5f18304c467ff4d52d5.png)

---

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [January 16, 2020, 2:13pm UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/5 "2020-01-16T14:13:28Z")

</div>

We have [Window.ConfigureToolbarMenu](https://www.mbsplugins.eu/WindowConfigureToolbarMenu.shtml) function already for that!

---

<div class="post-metadata">

**Author:** ![Bobino](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bobino/32/194_2.png) [@Bobino](https://the.fmsoup.org/u/Bobino)\
**Post date:** [January 16, 2020, 5:00pm UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/6 "2020-01-16T17:00:49Z")

</div>

**A few questions:**

- how is this different than what can be achieved with custom menus?
- would the same interception work if the user summons the menu item via a keyboard shortcut (a standard one, one defined via MacOS, one defined via custom menus)?
- could it also be done for menu items created with custom menus?
- would a custom menu item "based on existing command" also inherit this MBS customization?

**How I see this at this time (it could evolve)**

- I fail to see what this achieves that cannot already be achieved with custom menus (aside from the next point)
- FileMaker won't let us customize some menu items with custom menus, so it could be used for that, but it sounds like a lot of effort for a use case that I do not come across often.

---

<div class="post-metadata">

**Author:** ![MonkeybreadSoftware](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/monkeybreadsoftware/32/361_2.png) [@MonkeybreadSoftware](https://the.fmsoup.org/u/MonkeybreadSoftware)\
**Post date:** [January 16, 2020, 6:00pm UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/7 "2020-01-16T18:00:24Z")

</div>

This was an idea we had. As I didn't implement it, I have no idea whether it would intercept keyboard shortcuts.

The plugin would block a menu command even if the user gets around custom menus.

---

<div class="post-metadata">

**Author:** ![EfficientBizz](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/efficientbizz/32/252_2.png) [@EfficientBizz](https://the.fmsoup.org/u/EfficientBizz)\
**Post date:** [January 16, 2020, 6:51pm UTC](https://the.fmsoup.org/t/possible-mbs-plugin-idea-intercept-menu-actions/683/8 "2020-01-16T18:51:13Z")

</div>

How could I miss this!  
Just fixed a longtime annoyance.  
If you find, by any chance, my dedicated FM Bug Report I sent in a couple of Years ago, feel free to add this work around:

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# purpose: fix Claris' lazy attitude to fix bugs with MBS-Functions

# description: disable Toolbar config at all costs

# Author: MBS

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# 

Set Variable [$r ; Value: MBS( "[Window.ConfigureToolbarMenu](http://www.mbsplugins.eu/WindowConfigureToolbarMenu.shtml)" ; 1 ) ]
