Try to re-encode the input in the terminal

* hydra.el (hydra--handle-nonhead): Update. Most interesting sequences
  start with [27 91] or [27 79]. It's hard to do it for all of them.

Re #90
master
Oleh Krehel 11 years ago
parent 4dde4f7fc3
commit 3fce2bd1cd
  1. 13
      hydra.el

@ -683,7 +683,18 @@ NAME, BODY and HEADS are parameters to `defhydra'."
(interactive) (interactive)
,(cond ,(cond
((memq body-color '(amaranth teal)) ((memq body-color '(amaranth teal))
'(message "An amaranth Hydra can only exit through a blue head")) '(let ((k (or (lookup-key
input-decode-map
(vconcat [27 91]
(this-command-keys-vector)))
(lookup-key
input-decode-map
(vconcat [27 79]
(this-command-keys-vector)))))
f)
(if (and k (setq f (lookup-key test/keymap k)))
(funcall f)
(message "An amaranth Hydra can only exit through a blue head"))))
(t (t
'(hydra-pink-fallback))) '(hydra-pink-fallback)))
(hydra-set-transient-map hydra-curr-map t) (hydra-set-transient-map hydra-curr-map t)

Loading…
Cancel
Save