Closed PRR24 closed 1 year ago
please consider making the keymap case insensitive
This is not going to happen. It'd be a breaking change, and I don't think it's a good idea in general.
Please export Mac-detection function from prosemirror-keymap module
You can do baseKeymap == macBaseKeymap
if you want to find out whether prosemirror-commands detected a Mac platform.
Two suggestions:
Currently keymap is case sensitive, that is different how shortcuts typically work. While it is no big deal to add extra line of code for the command (like Mod-b and Mod-B for strong), it is still error-prone. For example, prosemirror-example-setup has forgotten to add Mod-Z binding for undo. As there is a support for Mod-Shift-* for shift-key-separation, please consider making the keymap case insensitive. Currently Mod-b (or any other letter) is case-insensitive on Mac, but case sensitive on Win and Lin.
Mac detection is generally needed for platform-specific keymap implementation (for example for the redo command). Please export Mac-detection function from prosemirror-keymap module (or from some other shared module), so that it should not be duplicated (like prosemirror-example-setup does) avoiding potential out-of sync implementations in future versions.
Thank you.