@wix/design-system
Version:
@wix/design-system
19 lines (16 loc) • 537 B
Flow
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
* @emails oncall+draft_js
*/
;
const Keys = require("fbjs/lib/Keys");
function isSoftNewlineEvent(e: SyntheticKeyboardEvent<>): boolean {
return e.which === Keys.RETURN && (e.getModifierState('Shift') || e.getModifierState('Alt') || e.getModifierState('Control'));
}
module.exports = isSoftNewlineEvent;