# overriding certain default keymaps

**URL:** <https://discuss.codemirror.net/t/overriding-certain-default-keymaps/6181>\
**Category:** v6\
**Created:** [April 4, 2023, 8:02am UTC](https://discuss.codemirror.net/t/overriding-certain-default-keymaps/6181 "2023-04-04T08:02:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rstha](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/r/c89c15/32.png) [@rstha](https://discuss.codemirror.net/u/rstha)\
**Post date:** [April 4, 2023, 4:25pm UTC](https://discuss.codemirror.net/t/overriding-certain-default-keymaps/6181/2 "2023-04-04T16:25:43Z")

</div>

You can tweak the precedence of your keymap using `Prec` which is exported by @codemirror/state to tweak the order of execution of your key bindings. To make sure your binding runs earlier than any other bindings for the same key order you can wrap your binding in Prec.highest

```auto
import { Prec } from "@codemirror/state";

Prec.highest(
    keymap.of([
      { key: "Mod-Enter", run: Command }
    ])
  ),

```

The default key maps can be forund here:

> <https://github.com/codemirror/commands/blob/main/src/commands.ts#L897>

---

_[View the full topic](https://discuss.codemirror.net/t/overriding-certain-default-keymaps/6181)._
