Skip to content

Conversation

bruno-rino
Copy link
Contributor

Pressing the Return key on a table or tree should be semantically identical to double clicking. This PR aims to do that, by invoking on_activate, just like double clicking does.

On GTK, this is the default behaviour, so nothing to do there.

There's a small snag when multiple_select is enabled.
Currently, on_activate has an argument: the row/node that was double clicked.
When pressing Return when multiple rows are selected, there isn't a single row that should be activated. I chose to not invoke the event in this case.

I placed the code that helps handling this on the core widgets: the _selection_single method. This way it can be shared across implementations.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@johnzhou721
Copy link
Contributor

Winforms failure is unrelated. c.f. the latest run on #3769

@mhsmith
Copy link
Member

mhsmith commented Sep 29, 2025

I've restarted CI; if it passes and you think the PR is ready for review, please post a comment.

@bruno-rino bruno-rino marked this pull request as ready for review October 2, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants