-
Notifications
You must be signed in to change notification settings - Fork 418
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
Keyboard handlers can't be overridden #226
Labels
Comments
Makes sense. What about implementing a mode-aware keyboard that re-uses the existing one or another one, based on the selected mode? |
+1 |
We should add priorities (known from other event-based APIs in our system). |
barmac
added a commit
that referenced
this issue
Oct 22, 2018
* use KeyboardEvent.key value by default * allow to register KeyboardEvent listeners for specified keys * allow to use priority for KeyboardEvents * default listeners will use key values instead of keyCode * preserve previous way of registering listeners There are three ways to register a listener now using keyboard.addListener: 1. Pass key or array of keys, then priority and the callback 2. Pass key or array of keys, then callback (default priority will be used) 3. Pass sole callback for global keyboard listener (lower priority than the latter) Closes #226
barmac
added a commit
that referenced
this issue
Oct 22, 2018
* use KeyboardEvent.key by default as keyCode is deprecated * allow to register KeyboardEvent listeners for specified keys * allow to use priority for KeyboardEvents * default listeners will use key values instead of keyCode * preserve previous way of registering listeners There are three ways to register a listener now using keyboard.addListener: 1. Pass key or array of keys, then priority and the callback 2. Pass key or array of keys, then callback (default priority will be used) 3. Pass sole callback for global keyboard listener (lower priority than the latter) Closes #226
barmac
added a commit
that referenced
this issue
Oct 22, 2018
* use KeyboardEvent.key by default as keyCode is deprecated * allow to register KeyboardEvent listeners for specified keys * allow to use priority for KeyboardEvents * default listeners will use key values instead of keyCode * preserve previous way of registering listeners There are three ways to register a listener now using keyboard.addListener: 1. Pass key or array of keys, then priority and the callback 2. Pass key or array of keys, then callback (default priority will be used) 3. Pass sole callback for global keyboard listener (lower priority than the latter) Closes #226
barmac
added a commit
that referenced
this issue
Oct 23, 2018
* use KeyboardEvent.key by default as keyCode is deprecated * allow to register KeyboardEvent listeners for specified keys * allow to use priority for KeyboardEvents * default listeners will use key values instead of keyCode * preserve previous way of registering listeners There are three ways to register a listener now using keyboard.addListener: 1. Pass key or array of keys, then priority and the callback 2. Pass key or array of keys, then callback (default priority will be used) 3. Pass sole callback for global keyboard listener (lower priority than the latter) Closes #226
barmac
added a commit
that referenced
this issue
Oct 23, 2018
…-bus * use KeyboardEvent.key for new listeners as keyCode is deprecated * allow to register KeyboardEvent listeners for specified keys * allow to use priority for KeyboardEvents * default listeners will use key values instead of keyCode * preserve previous way of registering listeners There are three ways to register a listener now using keyboard.addListener: 1. Pass key or array of keys, then priority and the callback 2. Pass key or array of keys, then callback (default priority will be used) 3. Pass sole callback for global keyboard listener (lower priority than the latter) Closes #226
barmac
added a commit
that referenced
this issue
Oct 23, 2018
* use KeyboardEvent.key for new listeners as keyCode is deprecated * allow to register KeyboardEvent listeners for specified keys * allow to use priority for KeyboardEvents * default listeners will use key values instead of keyCode * preserve previous way of registering listeners There are three ways to register a listener now using keyboard.addListener: 1. Pass key or array of keys, then priority and the callback 2. Pass key or array of keys, then callback (default priority will be used) 3. Pass sole callback for global keyboard listener (lower priority than the latter) Closes #226
barmac
added a commit
that referenced
this issue
Oct 24, 2018
BREAKING CHANGE: lifecycle listeners will no longer receive field listeners * Listeners are no longer stored inside Keyboard. * Field `listeners` was removed from lifecycle events. Closes #226
barmac
added a commit
that referenced
this issue
Oct 24, 2018
BREAKING CHANGE: lifecycle listeners will no longer receive field listeners * Listeners are no longer stored inside Keyboard. * Field `listeners` was removed from lifecycle events. Closes #226
barmac
added a commit
that referenced
this issue
Oct 25, 2018
BREAKING CHANGE: lifecycle listeners will no longer receive field listeners * Listeners are no longer stored inside Keyboard. * Field `listeners` was removed from lifecycle events. Closes #226
merge-me bot
pushed a commit
that referenced
this issue
Oct 25, 2018
BREAKING CHANGE: lifecycle listeners will no longer receive field listeners * Listeners are no longer stored inside Keyboard. * Field `listeners` was removed from lifecycle events. Closes #226
Closed via 4d72e38 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since there is no way of prioritizing keyboard handlers I can't override a handler that was previously registered.
Use case: I built a token simulation plugin for bpmn-js that allows me to switch to simulation mode where I can't model. I can't reuse the 'l' key for toggling the log because it has already been assigned to toggling the lasso tool.
The text was updated successfully, but these errors were encountered: