As mentioned by others, you can of course not look for bindings in maps that haven't been loaded yet (due to autoloading for example). There are however a few heuristics which can help you find known keymaps:
- all known minor mode maps are stored in
minor-mode-map-alist
, regardless of whether the minor mode is active or not;
- by convention, the vast majority of mode maps have names ending in "-mode-map".
Following this latter heuristic, one can devise the following command, which looks for a given key binding in all keymaps found in the obarray with names ending in "-mode-map". The results are displayed in a buffer.
Try loading as many packages as you can before you use it, so that more keymaps can be examined.
(require 's)
(defun list-known-bindings (key)
(interactive "kList known bindings for key: ")
(with-current-buffer (get-buffer-create "*known bindings*")
(erase-buffer)
(mapatoms (lambda (sym)
(when (or (eq sym 'global-map)
(and (boundp sym)
(symbol-value sym)
(s-ends-with-p "-mode-map" (symbol-name sym))
(keymapp (symbol-value sym))))
(let ((binding (lookup-key (symbol-value sym) key t)))
(when (and binding
(not (numberp binding)))
(insert (format "%-40s `%s'\n"
(format "`%s'" sym)
(if (keymapp binding)
"KEYMAP"
binding))))))))
(sort-lines nil (point-min) (point-max))
(goto-char (point-min))
(insert
(format "Known bindings for key: %s\n\n" (key-description key))
(format "%-40s %s" "Map" "Binding\n")
(s-repeat 40 "-") " " (s-repeat 30 "-") "\n")
(display-buffer (current-buffer))))