Map keyboard shortcuts on windows (#526)

* Map keyboard shortcuts on windows

* Fixed also saving commands

* Fix keyboard shortcut for keyboard shortcuts

* Fixed guide

* Cmd -> Mod
This commit is contained in:
Jori Lallo
2018-01-28 17:57:45 -08:00
committed by GitHub
parent 2b2bc376ce
commit 97268314fe
4 changed files with 16 additions and 3 deletions

View File

@ -1,10 +1,11 @@
// @flow
import { Change } from 'slate';
import { isModKey } from '../utils';
export default function KeyboardShortcuts() {
return {
onKeyDown(ev: SyntheticKeyboardEvent, change: Change) {
if (!ev.metaKey) return null;
if (!isModKey(ev)) return null;
switch (ev.key) {
case 'b':