Skip to content

WIP: KeyBinding: Flexible equality#278

Closed
gselzer wants to merge 2 commits intopyapp-kit:mainfrom
gselzer:kb-equality
Closed

WIP: KeyBinding: Flexible equality#278
gselzer wants to merge 2 commits intopyapp-kit:mainfrom
gselzer:kb-equality

Conversation

@gselzer
Copy link
Copy Markdown

@gselzer gselzer commented Apr 10, 2026

Hi!

I was experimenting with this repo over in scenex for its key bindings model, and I was finding it tedious to check key binding equality. For example, if I want to know whether the left arrow was pressed, it'd be nice to say "kb == KeyCode.LeftArrow`, but that does not work as is. Was wondering whether a syntax like the following would be problematic?

Of course, if we like more "magical" equality checks, there are probably more things to do. Other equality checks, hashing checks, etc.

@gselzer
Copy link
Copy Markdown
Author

gselzer commented Apr 10, 2026

Ooh, interesting, now I'm reading #108. Maybe this wasn't the best approach, let me take another stab when I next get a chance 😅

@gselzer gselzer closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant