# CFX::REMAP_RAW_KEYMAP

- **Hash:** `0x6E38C1B9`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `RemapRawKeymap`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described with examples
- **URL:** https://natives.borderlinerp.com/natives/CFX/REMAP_RAW_KEYMAP

## Signature

```c
void REMAP_RAW_KEYMAP(char* keymapName, int newRawKeyIndex);
```

## Parameters

- `keymapName` (`char*`) — the name given to the keymap in [REGISTER_RAW_KEYMAP](#\_0x49C1F6DC)
- `newRawKeyIndex` (`int`) — Index of raw key from keyboard.

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Remaps the keymap bound to `keymapName` to `newRawKeyIndex`

Virtual key codes can be found [here](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes)

## Usage

### Lua

```lua
RemapRawKeymap(keymapName, newRawKeyIndex)

-- always available, by hash
Citizen.InvokeNative(0x6e38c1b9, keymapName, newRawKeyIndex)
```

### JavaScript

```js
RemapRawKeymap(keymapName, newRawKeyIndex);

// by hash
Citizen.invokeNative('0x6e38c1b9', keymapName, newRawKeyIndex);
```

### C#

```csharp
Function.Call((Hash)0x6e38c1b9, keymapName, newRawKeyIndex);
```

## Examples

*Source: Cfx.re native reference*

```lua

function on_key_up()
	print("key no longer pressed")
end

function on_key_down()
	print("key is pressed")
end

local KEY_SPACE = 32
local canBeDisabled = false

local KEY_E = 69

RegisterRawKeymap("our_keymap", on_key_up, on_key_down, KEY_SPACE, canBeDisabled)

RemapRawKeymap("our_keymap", KEY_E)
```

## See also

- [CFX::REGISTER_RAW_KEYMAP](https://natives.borderlinerp.com/natives/CFX/REGISTER_RAW_KEYMAP.md) — Registers a keymap that will be triggered whenever rawKeyIndex is pressed or released.

*Sources: Cfx.re native reference.*
