I want to test out a few alternative keybinding setups but I’m not sure what the simplest/most effective way to do that is.
I would like to have it so that instead of C-d
being forward delete ("delete-char
" which is what it is by default), whenever I hold down C-d
I can use the left (kbd <left>
?) and right (kbd <right>
?) arrow keys to delete backwards and forwards.
I can can’t even get unsetting C-d
to work:
When I put (global-set-key (kbd "C-d") 'nil)
in my init.el
and eval-last-sexp
, C-d
seems to actually be disabled.
But if I save-buffer
and close emacs, when I open a new instance, C-d
is back to being a forward delete.
Once I get past that problem, the next problem is figuring out how to even express "while C-d
is pressed,
<left>
and <right>
arrow keys trigger delete-backwards-char
and delete-char
and if either are held down they will repeatedly call their functions"
in the init file in elisp.
If I can get this resolved the proper way, I can apply the solution to repurpose other default keybindings, but at this point I can't imagine solving this single case without some real guidance.