@opentui/core 0.1.58 → 0.1.59

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.
Files changed (3) hide show
  1. package/index.js +24 -12
  2. package/index.js.map +4 -4
  3. package/package.json +7 -7
package/index.js CHANGED
@@ -5720,9 +5720,15 @@ class InputRenderable extends Renderable {
5720
5720
  return true;
5721
5721
  }
5722
5722
  }
5723
- if (keySequence && keySequence.length === 1 && keySequence.charCodeAt(0) >= 32 && keySequence.charCodeAt(0) <= 126 && !keyCtrl && !keyMeta && !keySuper && !keyHyper) {
5724
- this.insertText(keySequence);
5725
- return true;
5723
+ if (!keyCtrl && !keyMeta && !keySuper && !keyHyper) {
5724
+ if (keyName === "space") {
5725
+ this.insertText(" ");
5726
+ return true;
5727
+ }
5728
+ if (keySequence && keySequence.length === 1 && keySequence.charCodeAt(0) >= 32 && keySequence.charCodeAt(0) <= 126) {
5729
+ this.insertText(keySequence);
5730
+ return true;
5731
+ }
5726
5732
  }
5727
5733
  return false;
5728
5734
  }
@@ -8341,16 +8347,22 @@ class TextareaRenderable extends EditBufferRenderable {
8341
8347
  return handler();
8342
8348
  }
8343
8349
  }
8344
- if (keySequence && !keyCtrl && !keyMeta && !keySuper && !keyHyper) {
8345
- const firstCharCode = keySequence.charCodeAt(0);
8346
- if (firstCharCode < 32) {
8347
- return false;
8350
+ if (!keyCtrl && !keyMeta && !keySuper && !keyHyper) {
8351
+ if (keyName === "space") {
8352
+ this.insertText(" ");
8353
+ return true;
8348
8354
  }
8349
- if (firstCharCode === 127) {
8350
- return false;
8355
+ if (keySequence) {
8356
+ const firstCharCode = keySequence.charCodeAt(0);
8357
+ if (firstCharCode < 32) {
8358
+ return false;
8359
+ }
8360
+ if (firstCharCode === 127) {
8361
+ return false;
8362
+ }
8363
+ this.insertText(keySequence);
8364
+ return true;
8351
8365
  }
8352
- this.insertText(keySequence);
8353
- return true;
8354
8366
  }
8355
8367
  return false;
8356
8368
  }
@@ -8841,5 +8853,5 @@ export {
8841
8853
  ASCIIFont
8842
8854
  };
8843
8855
 
8844
- //# debugId=AA9B550CE879718B64756E2164756E21
8856
+ //# debugId=69099B83255E61E264756E2164756E21
8845
8857
  //# sourceMappingURL=index.js.map