diff --git a/spikes/ovis-keytest/main.js b/spikes/ovis-keytest/main.js index a39b027..1010df7 100644 --- a/spikes/ovis-keytest/main.js +++ b/spikes/ovis-keytest/main.js @@ -20,6 +20,11 @@ export default class KeyTest extends View { this.textarea.on("change", (e, cx) => this.log("G change", cx)); this.textarea.on("submit", (e, cx) => this.log("G submit", cx)); this.textarea.on("focus", (e, cx) => this.log("G focus", cx)); + this.textarea.on("paste_other", (e, cx) => { + let payload = ""; + try { payload = " " + JSON.stringify(e).slice(0, 300); } catch {} + this.log("G paste_other" + payload, cx); + }); this.textarea.on("blur", (e, cx) => this.log("G blur", cx)); const bind = (keystroke, action, context) => (context === undefined ? { keystroke, action } : { keystroke, action, context }); @@ -60,7 +65,7 @@ export default class KeyTest extends View { log(text, cx) { this.n += 1; this.lines.push(`${this.n}. ${text}`); - if (this.lines.length > 12) this.lines.shift(); + if (this.lines.length > 14) this.lines.shift(); cx?.notify(); } @@ -87,6 +92,12 @@ export default class KeyTest extends View { .child( Textarea.new(this.textarea).w_full().px(10).py(8).rounded(8).bg(t.background).text_color(t.foreground).text_size(13), ) + .child( + div() + .text_size(12) + .text_color(t.accent ?? t.foreground) + .child("Klik w pole → ab → ↑ → ↓ → Ctrl+Alt+J → Ctrl+Alt+K → Ctrl+Alt+L → Ctrl+Alt+U → Ctrl+V (obraz w schowku, np. Win+Shift+S) → napisz w czacie: gotowe"), + ) .children(this.lines.map((l) => div().text_size(12).child(l))); } }