HotKey.SetFileMakerWindowOnly
-----------------------------

Set whether to only run the hotkey when a FileMaker document window is frontmost.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [HotKey](component_HotKey.md) | [16.0](newinversion160.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "HotKey.SetFileMakerWindowOnly"; HotKeyRef; Value ) 

**MBS**( **"HotKey.SetFileMakerWindowOnly";** /\* Set whether to only run the hotkey when a FileMaker document window is frontmost. \*/  
**$HotKeyRef**; /\* The reference value for the hotkey as returned by [HotKey.Register](HotKeyRegister.md) function.e.g. $hotkey \*/   
**$Value**) /\* The new setting.  
Pass 1 or 0.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| HotKeyRef | The reference value for the hotkey as returned by [HotKey.Register](HotKeyRegister.md) function. | $hotkey |
| Value | The new setting.   Pass 1 or 0. | 1 |

### Result

Returns OK or error.

### Description

Set whether to only run the hotkey when a FileMaker document window is frontmost.  
Especially if you have data viewer or debugger frontmost, the hotkey will not trigger, if this setting is activated.  
### Examples

Only run hotkey when FileMaker document is active:

 Set Variable \[ $r ; Value: MBS ("HotKey.SetFileMakerWindowOnly"; $HotKey ; 1) \]  
### See also

- [HotKey.GetFileMakerWindowOnly](HotKeyGetFileMakerWindowOnly.md)
- [HotKey.Register](HotKeyRegister.md)

### Release notes

- **Version 16.0**
    - Added [HotKey.SetFileMakerWindowOnly](https://www.mbsplugins.eu/HotKeySetFileMakerWindowOnly.shtml) and [HotKey.GetFileMakerWindowOnly](https://www.mbsplugins.eu/HotKeyGetFileMakerWindowOnly.shtml) functions to only run hotkey when a FileMaker document window is frontmost.

### Blog Entries

- [MBS FileMaker Plugin 16.0 News](https://www.mbsplugins.de/archive/2026-01-20/MBS_FileMaker_Plugin_160_News/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 16.0pr5](https://www.mbsplugins.de/archive/2026-01-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2026, Seite 9](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)
- [Ausgabe 1/2026, Seite 10](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)

This function is free to use.

Created 24th December 2025 , last changed 24th December 2025

  
[HotKey.SetEvaluate](HotKeySetEvaluate.md) - [HotKey.SetIgnoreOnModal](HotKeySetIgnoreOnModal.md)

[HTML Version](HotKeySetFileMakerWindowOnly.shtml)