Hi
I found that Code-mirror library itself provides the List of keyboard shortcuts for Mac OSX and other platform type.
We just need to pass them in extraKeys param while creating code-mirror instance.
Following is the keyboard shortcuts for various operations in text editor:
- Copy - [Ctrl-C, Cmd-C]
- Cut - [Ctrl-X, Cmd-X]
- Select All - [Ctrl-A, Cmd-A]
- Undo - [Ctrl-Z, Cmd-Z]
- Redo - [Ctrl-Y, Cmd-Y]
- Delete Line - [Ctrl-D, Cmd-D]
- Move left/right(words) - [Alt-Left, Alt-Right]
- Move start/end of line - [Cmd-Left, Cmd-Right] // Ctrl-Left/Right are bound to System shortcuts. so these keys cannot be used.
These keyboard shortcuts are consistent in Web/Runtime applications in all platform types.
Issue not fixed:
keyboard shortcut for Paste text doesn't work in Mac Runtime only. It is working on Linux runtime & Windows Runtime.
I also found that right click paste is working in Mac Runtime which is the feature of code-mirror, So I am looking into its code to figure out and I will send a patch with fix once it gets fixed.
Please find attached patch and review.
Thanks,
Surinder Kumar