@lvce-editor/renderer-process 16.0.0 → 16.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6508,6 +6508,7 @@ const getSashId = $Target => {
6508
6508
  const Backspace$1 = 'Backspace';
6509
6509
  const Tab$1 = 'Tab';
6510
6510
  const Space$1 = ' ';
6511
+ const Space2 = 'Space';
6511
6512
  const Enter$1 = 'Enter';
6512
6513
  const Escape$1 = 'Escape';
6513
6514
  const PageUp$1 = 'PageUp';
@@ -6695,6 +6696,7 @@ const getKeyCode = key => {
6695
6696
  case Enter$1:
6696
6697
  return Enter;
6697
6698
  case Space$1:
6699
+ case Space2:
6698
6700
  return Space;
6699
6701
  case PageUp$1:
6700
6702
  return PageUp;
@@ -6871,10 +6873,13 @@ const CtrlCmd = 1 << 11 >>> 0;
6871
6873
  const Shift = 1 << 10 >>> 0;
6872
6874
  const Alt = 1 << 9 >>> 0;
6873
6875
 
6874
- const normalizeKey = key => {
6876
+ const normalizeKey = (key, code) => {
6875
6877
  if (key.length === 1) {
6876
6878
  return key.toLowerCase();
6877
6879
  }
6880
+ if (key === 'Unidentified') {
6881
+ return code;
6882
+ }
6878
6883
  return key;
6879
6884
  };
6880
6885
 
@@ -6883,12 +6888,13 @@ const getKeyBindingIdentifier = event => {
6883
6888
  ctrlKey,
6884
6889
  shiftKey,
6885
6890
  altKey,
6886
- key
6891
+ key,
6892
+ code
6887
6893
  } = event;
6888
6894
  const modifierControl = ctrlKey ? CtrlCmd : 0;
6889
6895
  const modifierShift = shiftKey ? Shift : 0;
6890
6896
  const modifierAlt = altKey ? Alt : 0;
6891
- const normalizedKey = normalizeKey(key);
6897
+ const normalizedKey = normalizeKey(key, code);
6892
6898
  const keyCode = getKeyCode(normalizedKey);
6893
6899
  const identifier = modifierControl | modifierShift | modifierAlt | keyCode;
6894
6900
  return identifier;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "16.0.0",
3
+ "version": "16.1.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"