textual icon indicating copy to clipboard operation
textual copied to clipboard

[textual][key binding] Add the possibility to pass the key event to the Action, by using a special value in the expression? i.e. `self.bind("1,2,3", "scroll_to_placeholder(${event.key})")`

Open olivierphi opened this issue 2 years ago • 2 comments

--> so the action_scroll_to_placeholder method would be able to know which of these keys were pressed :slightly_smiling_face:

olivierphi avatar May 11 '22 10:05 olivierphi

We could perhaps make the action a format string that gets called with key. So the following would work:

self.bind("1,2,3", "scroll_to_placeholder(${event.key})")

willmcgugan avatar May 11 '22 12:05 willmcgugan

After discussion, the implementation of this feature is postponed - so we can find the right balance between flexibility of the syntax and code complexity

olivierphi avatar Jun 14 '22 14:06 olivierphi

https://github.com/Textualize/textual/wiki/Sorry-we-closed-your-issue

willmcgugan avatar Oct 25 '22 09:10 willmcgugan

Did we solve your problem?

Glad we could help!

github-actions[bot] avatar Oct 25 '22 09:10 github-actions[bot]