# Custom REPL keymap does not work

**URL:** https://discourse.julialang.org/t/custom-repl-keymap-does-not-work/123546
**Category:** General Usage
**Tags:** package
**Created:** [December 6, 2024, 4:24pm UTC](https://discourse.julialang.org/t/custom-repl-keymap-does-not-work/123546 "2024-12-06T16:24:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sixzero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sixzero/32/28737_2.png) [@Sixzero](https://discourse.julialang.org/u/Sixzero)
#### Post date: [December 6, 2024, 4:24pm UTC](https://discourse.julialang.org/t/custom-repl-keymap-does-not-work/123546/1 "2024-12-06T16:24:01Z")

</div>

I’m trying to create a custom REPL mode with custom keybindings.

Here’s an MVP that demonstrates this issue with `prints`:

```julia
using REPL
using ReplMaker
using REPL.LineEdit: MIState

# Simple parser that echoes input
parser(input) = println("You entered: ", input)

# Create custom keymap with Ctrl+E binding
custom_keymap = Dict{Any,Any}(
    # Ctrl+E
    '\x05' => (s::MIState, o...) -> begin
        println("Ctrl+E pressed!") # This doesn't print!
        return :ignore
    end
)

# Initialize custom REPL mode
repl = Base.active_repl
initrepl(
    parser;
    prompt_text="DEMO> ",
    prompt_color=:blue,
    start_key=')',
    mode_name=:demo,
    valid_input_checker=Returns(true),
    keymap=custom_keymap,
)

```

**Expected behavior:**

- When Ctrl+E is pressed, “Ctrl+E pressed!” should be printed

**Actual behavior:**

- Nothing is printed when Ctrl+E is pressed

**Pkgs:**

- Julia: 1.11.2
- ReplMaker: 0.2.7

Any ideas why the keymap is not working? What am I missing here?

---

<div class="post-metadata">

### Author: ![Sixzero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sixzero/32/28737_2.png) [@Sixzero](https://discourse.julialang.org/u/Sixzero)
#### Post date: [December 6, 2024, 4:25pm UTC](https://discourse.julialang.org/t/custom-repl-keymap-does-not-work/123546/2 "2024-12-06T16:25:42Z")

</div>

Tried with this:  
`keymap=REPL.LineEdit.keymap([custom\_keymap, default\_keymap, escape\_defaults]), ̇

Tried not just CTRL + E but other keys, and seemingly not working. 🤔
