avy icon indicating copy to clipboard operation
avy copied to clipboard

Feasibility of modeless usage?

Open bard opened this issue 5 years ago • 0 comments

I think of avy's default interaction as "modal" in the vi sense:

  1. press a key combination (associated to e.g. avy-goto-word-1)
  2. release key combination
  3. a different input mode is entered
  4. press a modifier-less key (e.g. e)
  5. some processing is done (words beginning with e are highlighted)
  6. press another modifier-less key (e.g. a)
  7. some more processing is done (e.g. cursor moves to "e.g.")
  8. editor returns to the previous input mode

I looked at the unused AltGr key on my keyboard and wondered, would an Emacs-style modeless interaction be possible?

  1. press a modifier key
  2. don't release it
  3. press e
  4. words beginning with e are highlighted
  5. press a
  6. cursor moves to "e.g."
  7. release modifier

My hunch is no, because Emacs will wait for a key sequence to be complete before doing any processing; unless we "fake" it by creating key bindings for all possible combinations in advance. But maybe I'm wrong?

bard avatar Jul 25 '20 09:07 bard