---
title: Core Keyboard Functions
slug: gpc/gpc-scripting-core-keyboard-functions
description: Here is the list of Core Keyboard Functions.
icon: ◽
docTags: 
createdAt: 2021-12-08T18:05:11.000Z
---

| Function       | Description                                                                |
| -------------- | -------------------------------------------------------------------------- |
| get\_keyboard  | Checks if a chosen keyboard key is held down                               |
| get\_modifiers | Checks if a chosen keyboard modifier is held down (ALT, SHIFT, CTRL, etc.) |

# get\_keyboard

`get_keyboard` checks to see if a chosen keyboard key is pressed

:::CodeblockTabs
GPC

```apex
main {
if(get_keyboard(KEY_A)){
    combo_run(jump);
    }
}

combo jump {
    wait(20);
    set_val(XB1_A, 100);
    wait(20);
}
```
:::

🔴 **Syntax**

:::BlockQuote
get\_keyboard( \<key\_constant> );
:::

⚪&#x20;**Parameters**

\<key\_constant> : any defined keyboard constant.

🔵&#x20;**Returns**

Nothing

# get\_modifiers

`get_modifiers` Checks if a chosen keyboard modifier is held down (ALT, SHIFT, CTRL, etc.)

:::CodeblockTabs
GPC

```apex
if (get_modifiers(MOD_LCTRL | MOD_LALT) == MOD_LCTRL | MOD_LALT) { /* Both Left Alt and Left Ctrl are pressed */ }
```
:::

🔴 **Syntax**

:::BlockQuote
get\_modifiers( \<variable> , \<bit\_index> );
:::

⚪&#x20;**Parameters**

\<variable> : any defined variable.
\<bit\_index> : index point of the bit to IF held

🔵&#x20;**Returns**

Nothing

