> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HasHotKey Method of the Commands Object

> HasHotKey method of the Commands Object in ABBYY FineReader Engine Visual Components on Windows — This method allows you to find out whether the hot key is used by some command.

This method allows you to find out whether the hot key is used by some command. You can use this method to check availability of a hot key before [registering a custom command](/fine-reader/engine/visual-components-reference/supplementary-objects/commands/registerusercommand-method).

## Syntax

### C++

```cpp theme={null}
HRESULT HasHotKey(
  int           HotKey,
  VARIANT_BOOL* Result
);
```

### C\#

```csharp theme={null}
bool HasHotKey( int HotKey );
```

### Visual Basic .NET

```vb theme={null}
Function HasHotKey(HotKey As Integer) As Boolean
```

## Parameters

HotKey

\[in] Specifies the hot key which should be checked. The parameter has the same format as the returned value (LRESULT) of the Windows [SendMessage](http://msdn.microsoft.com/en-us/library/ms644950\(VS.85\).aspx) function for the [HKM\_GETHOTKEY](http://msdn.microsoft.com/en-us/library/windows/desktop/bb775235\(v=vs.85\).aspx) message sent. To obtain the hot key value in this format, you should pack the virtual key code of the hot key to the low-order byte of the value, and the key modifier that specifies the keys that define a hot key combination to the high-order byte.

Result

\[out, retval] Specifies whether the hot key is used by some command. If the value is TRUE, some command uses this hot key, and you cannot use the hot key for another command.

## Return values

This method has no specific return values. It returns [the standard return values of the ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[Commands](/fine-reader/engine/visual-components-reference/supplementary-objects/commands)
