# How to bind to the hotkey ctrl + backspace in the REPL?

**URL:** <https://discourse.julialang.org/t/how-to-bind-to-the-hotkey-ctrl-backspace-in-the-repl/74836>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [January 18, 2022, 10:18pm UTC](https://discourse.julialang.org/t/how-to-bind-to-the-hotkey-ctrl-backspace-in-the-repl/74836 "2022-01-18T22:18:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akriegman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/akriegman/32/30573_2.png) [@akriegman](https://discourse.julialang.org/u/akriegman)\
**Post date:** [January 18, 2022, 10:18pm UTC](https://discourse.julialang.org/t/how-to-bind-to-the-hotkey-ctrl-backspace-in-the-repl/74836/1 "2022-01-18T22:18:54Z")

</div>

Following the directions in the documentation, I added the following into my `startup.jl` in order to make `ctrl + backspace` delete the previous word and `ctrl + delete` delete the next word:

```julia
using REPL
using REPL.LineEdit

const mykeys = Dict{Any,Any}(
  "^H" => (s, o...) -> LineEdit.edit_delete_prev_word(s),
  "^[[3;5~" => (s, o...) -> LineEdit.edit_delete_next_word(s),
)

function customize_keys(repl)
    repl.interface = REPL.setup_interface(repl; extra_repl_keymap = mykeys)
end

atreplinit(customize_keys)

```

This worked, but had the unfortunate side effect that `backspace` without `ctrl` also deletes a full word. Is there a way that I can map an action to `ctrl + backspace` without also mapping it to `backspace`? I tried `"^\b"`, but that gave me `InexactError: trunc(UInt32, -56)`. Any ideas?
