2

In order to adjust the behavior of my custom keyboard shortcuts I'd like to determine whether or not the current input focus is within the minibuffer. (The buffer seems to be called something like *Minibuf-1*.)

Drew
  • 77,472
  • 10
  • 114
  • 243
dmw64
  • 177
  • 6

1 Answers1

3

You're looking to know whether the minibuffer window is selected, and so has the input focus. Use predicate minibuffer-window-active-p. C-h f says:

minibuffer-window-active-p is a compiled Lisp function in window.el.

(minibuffer-window-active-p WINDOW)

Return t if WINDOW is the currently active minibuffer window.

Drew
  • 77,472
  • 10
  • 114
  • 243