iced icon indicating copy to clipboard operation
iced copied to clipboard

feat: add an on_key_press method to TextInput

Open tsuza opened this issue 1 year ago • 0 comments

Currently, the only way to listen for key presses involves setting up a subscription, which introduces some tedious boilerplate code: subscribe to the event, store the text input's ID, verify if it's focused, and so on.

Adding a method to TextInput just simplifies it.

An example use case for this would be terminal-like text inputs, where you're scrolling through the input history with the up & down arrows.

tsuza avatar Oct 18 '24 23:10 tsuza