Skip to content
This repository was archived by the owner on Jul 24, 2019. It is now read-only.

Fix hotkey support, add event namespaces, add hotkey enable callback#77

Open
alanpca wants to merge 16 commits into
mindmup:masterfrom
DataRecognitionCorporation:bug/Better_hotkey_and_event_support
Open

Fix hotkey support, add event namespaces, add hotkey enable callback#77
alanpca wants to merge 16 commits into
mindmup:masterfrom
DataRecognitionCorporation:bug/Better_hotkey_and_event_support

Conversation

@alanpca

@alanpca alanpca commented Jun 12, 2013

Copy link
Copy Markdown

Depends on #76

  • Map multiple hotkeys in a string into single hotkey commands
  • Store them in a hash
  • When buttons are pressed (keydown), compute a string to match them on
  • They must match this format:
    • Keys must come in order of modifiers as shown below:
    • <CTRL>+(<SHIFT>+)<KEY> (shift optional)
    • <META>+(<SHIFT>+)<KEY>
    • <ALT>+(<SHIFT>+)<KEY>
    • <SHIFT>+<KEY>
    • <KEY> (i.e. tab)
  • Change bindHotKeys to only bind single events for keydown and keyup
  • Re-map the keys into a hash as mentioned above
  • Prevent propagation and default if we match a command we're allowed
  • Add callback option to test a hotkey to see if it's allowed.
  • Add namsepaceEvents helper, to create all events with a namespace
  • Add default callback for hotKeyEnabledCallback
    • returns true if a hotkey can execute browser command
    • takes parameter command. i.e. bold

alanpca and others added 16 commits June 12, 2013 15:16
* Fixes steveathon#19
* Problem: addRange or removeAllRanges kills the browser command states.
* Store cache in commandCache
* Add updateCommandCache and restoreCommandCache methods
* Add support for command-with-arg buttons to be in an active state
* Update command cache when running execCommand
* Store and then update selected commands when selecting a toolbar button
* Create the command cache by looking up the buttons that are in the DOM, set the default value to false
* Map multiple hotkeys in a string into single hotkey commands
* Store them in a hash
* When buttons are pressed (`keydown`), compute a string to match them on
* They must match this format:
  * Keys must come in order of modifiers as shown below:
  * <CTRL>+(<SHIFT>+)<KEY> `(shift optional)`
  * <META>+(<SHIFT>+)<KEY>
  * <ALT>+(<SHIFT>+)<KEY>
  * <SHIFT>+<KEY>
  * <KEY> `(i.e. tab)`
* Change `bindHotKeys` to only bind single events for `keydown` and `keyup`
* Re-map the keys into a hash as mentioned above
* Prevent propagation and default if we match a command we're allowed
* Add callback option to test a hotkey to see if it's allowed.
* Add `namsepaceEvents` helper, to create all events with a namespace
* Add default callback for `hotKeyEnabledCallback`
  * returns `true` if a hotkey can execute  browser command
  * takes parameter `command`. i.e. `bold`
…on indent; update save/restore selection to track cursor position
…on indent; update save/restore selection to track cursor position
 * Removed changes on indent from DRCWBTE-4165.
 ** DRCWBTE-4165 introduces an regression when used with spellcheck.
 ** This issue has been remedied indirectly in DRCWBTE-6975
- namespace the 'touchend' event bound to window so we can remove it
- throttle 'updateToolbar' so it doesn't get called every keypress
…sues

8036_Writing_Input_Performance_Issues
Could be caused by a Chrome 38 change
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants