Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for getting currently focussed/hovered emoji #444

Open
rugk opened this issue Jul 18, 2020 · 0 comments
Open

API for getting currently focussed/hovered emoji #444

rugk opened this issue Jul 18, 2020 · 0 comments

Comments

@rugk
Copy link

rugk commented Jul 18, 2020

Split idea from #431 (comment)

TL;DR is: An API for getting the currently focussed/hovered emoji, especially if #431 is merged, would be really useful to adjust/react on more things.


Use case
I have a use case, where I'd like more shortcuts to trigger something in the picker/with the selected emoji. In my case Ctrl+C should e.g. trigger a copy to clipboard.

Currently
As all methods we can use to get the selected/chosen emoji currently are reactive (i.e. as an dev outside the lib you only get the emoji if something happens as as a result of a click or so) this is hard to implement.

What we want
A active method that could just return the currently focused emoji could be very helpful for that. (Note this use case barely existed before, because if you click an emoji you get the reaction.)
So e.g. a getCurrentlyFocussedEmoji that likely is used internally in a similar way, may be very useful here.

Or… of course… you just expose the current keypress handler. However, IMHO, that would be less flexible as an API, because you are then – yet again – limited to key presses only.

Edit: Don't know whether that may also return if an emoji is only hovered hmm… maybe it can do both, possibly in two separate functions. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants