1

I use C-h instead of backspace, and it does not work in helm's minibuffer, however it works in normal minibuffer.

The related section from my init.el

(global-unset-key (kbd "<backspace>"))
(global-unset-key (kbd "C-h"))
(global-set-key (kbd "C-h") 'delete-backward-char)
(global-unset-key (kbd "<f1>"))
(global-set-key (kbd "<f1>") help-map)
(global-unset-key (kbd "M-h"))
(global-set-key (kbd "s-h") 'mark-paragraph)
(global-set-key (kbd "M-h") 'backward-kill-word)
atevm
  • 928
  • 7
  • 16
  • 1
    See http://emacs.stackexchange.com/q/5486/2355. – Constantine Feb 05 '16 at 16:24
  • @Constantine Thanks I made it work by your clue, but I was not able to rebind helm-find-files-C-h-map to anything, because it does not exist. – atevm Feb 05 '16 at 17:09
  • Huh. Well, `helm-find-files-C-h-map` did exist back then. I may need to update that answer. Could you please submit an answer explaining *how* **you** made it work and accept it so that this question is not considered "unanswered"? Thanks! – Constantine Feb 05 '16 at 17:40
  • @Constantine well I only added (define-key helm-map (kbd "C-h") nil) to my config, it works, but I could not find the function for which it was bound, and maybe it is something important. update: I greped helm source repository on my machine, I update the question with the result. – atevm Feb 05 '16 at 17:55
  • `(lookup-key helm-map (kbd "C-h"))` tells me that `C-h` is bound to a keymap. The only thing useful in this keymap is `helm-help` (`C-h m`). – Constantine Feb 05 '16 at 18:01
  • 1
    @Constantine I wrote an answer instead of updating the question. Thanks you helped a lot. – atevm Feb 05 '16 at 18:12

1 Answers1

1

Thanks to Constantine I solved the problem, the only difference that newer helm use C-h C-d for the helm-enable-or-switch-to-debug function. So it still can be unbound as Constantine advised.

(define-key helm-map (kbd "C-h") nil)

if somebody really needs that function, it should be rebound to some other keys:

(define-key helm-map (kbd "s-w")  'helm-enable-or-switch-to-debug)

I used grep to find this out.

➜  helm git:(master) grep -Rn "C-h"                  
README.md:165:Once you are in the helm session (of `helm-M-x` or any one else) you can hit either `C-h m` or
README.md:168:Sometime `C-c ?` is not available, in this case you will see in mode-line `C-h m` instead of `C-c ?`.
README.md:273:- `helm-apropos`: Description of functions, variables, etc... Use it instead of Most `C-h` commands.
helm-files.el:758:                       "C-h m: Help, \\[universal-argument]: Insert output at point")
helm.el:238:    (define-key map (kbd "C-h C-d")    'undefined)
helm.el:239:    (define-key map (kbd "C-h C-d")    'helm-enable-or-switch-to-debug)
helm.el:242:    (define-key map (kbd "C-h C-h")    'undefined)
helm.el:243:    (define-key map (kbd "C-h h")      'undefined)
helm.el:817:C-h m\t\tRun this generic help for helm.
emacs-helm.sh:77:;; You will find embeded help for most helm commands with \`C-h m'.\n\
atevm
  • 928
  • 7
  • 16