lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Shortcut to set input = currently selected output item

Open 0ion9 opened this issue 9 years ago • 2 comments

(command would be analogous to Tab Copy the selected item to the input field. command found in dmenu.)

This is useful when input is complex or when you want to make a selection but then refine it by further typing.

For example, I have an eagerly-completing tmsu tagging script for lighthouse -- I type tag fragments and the script matches them to the best candidate tag name, and also shows other candidates. Currently, selecting other candidates with up/down arrows is not very useful, as you then have to press Enter to finalize the selection, which terminates Lighthouse rather than allowing you to continue refining your selection.

I can probably work up an implementation of this pretty easily. I see we are already using Tab and Shift+Tab -- could we bind this to Control-Tab, or would something else be better?

(Interestingly, Control+Tab currently causes the same behaviour as Tab, even though there is no case for Control+Tab listed in lighthouse.c:process_key_stroke(); is that a bug?)

0ion9 avatar Sep 17 '15 01:09 0ion9

an alternative to tab complete from selections would be the ability for the script to provide specific tab completes. for example "light" might be a valid query where the first result would be something that turns on the keyboard light, but [tab] might complete to "lighthouse." I'd imagine this would be shown as suggested text like this (note dave is the suggestion but Dave is the first result)

suggested text

emgram769 avatar Sep 30 '15 20:09 emgram769

control + tab is likely a bug

emgram769 avatar Sep 30 '15 20:09 emgram769