Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KeyBindingUtil: add usesMacOSHeuristics method (#869)
Summary: **Summary** Add a public method, `usesMacOSHeuristics`, to the `KeyBindingUtil` module. This makes it possible to determine how draft-js will interpret certain keyboard events and thus alter the UI accordingly, e.g.; <img width="499" alt="screenshot 2016-12-13 at 17 58 33" src="https://cloud.githubusercontent.com/assets/6705160/21150013/dee64566-c15d-11e6-9639-75a39d21d079.png"> I currently achieve this by doing (🙈); ```js const COMMAND_MODIFIER_CHAR = (navigator && navigator.userAgent.indexOf('Mac') >= 0) ? '\u2318' // Mac command key character : 'Ctrl' ``` Pull Request resolved: facebookarchive/draft-js#869 Differential Revision: D9734962 fbshipit-source-id: ed3f3d0a87df51c708fd666fe85bc6acba1ecfee
- Loading branch information