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

Only delete duplicate if it duplicates both combo and action #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jbrecht
Copy link

@jbrecht jbrecht commented Nov 24, 2015

Duplicate deletion introduced in a3b4b4c is over-eager, and will reduce 'duplicates' when we bind different callbacks to, say, keyup vs. keydown actions for the same combo

@chieffancypants
Copy link
Owner

Are there valid use-cases where different callbacks are used for different actions?

@jbrecht
Copy link
Author

jbrecht commented Mar 10, 2016

Yes, that's why I had to create this. As I said in the description, you may want to bind to both keyup and keydown for the same key. In our particular case, for example, when you use our drawing tool and hold down the shift key it constrains what the tool does (e.g. the rectangle tool only draws squares if shift is down) and so I need to detect when shift is pressed down and also detect when it was released. Moreover the existence of 'action' as a config field strongly implies you ought to be able to create action-specific bindings and expect them to work

@evanbeard
Copy link

+1 - have the same need to bind both keyup and keydown

@DioNNiS
Copy link

DioNNiS commented May 23, 2016

+1

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.

4 participants