bling / fzf.el

A front-end for fzf
GNU General Public License v3.0
366 stars 50 forks source link

Map ESC to keyboard-quit for FZF window? #10

Closed jmromer closed 8 years ago

jmromer commented 8 years ago

Apologies for the noob question, but is there a way to have ESC close the FZF window, I've been trying to define something like the following:

(add-hook 'fzf-mode-hook (lambda ()
  (define-key fzf-mode-map (kbd "ESC") 'keyboard-quit))

But from the source code it doesn't look like there's anything like an FZF mode to hook into. Is that right? If so, is there something else I could hook into?

Thanks in advance!

bling commented 8 years ago

(term-char-mode) is the magic that makes everything work, however it does it by intercepting everything you type, so look into the code there to see if it provides anything.

jmromer commented 8 years ago

thanks! I appreciate it 😄

lemon0910 commented 6 years ago

sorry, I don't understand, how to map ESC to keyboard-quit