Connect independent resizable chat panes with routed focus and narrow layouts

This commit is contained in:
2026-11-06 18:16:33 +00:00
parent 30372ce8b5
commit 4bae206afd
8 changed files with 597 additions and 33 deletions
+2 -2
View File
@@ -148,9 +148,9 @@ export function flutterPage(browser, log, { touch = false } = {}) {
const key = parts.pop();
const bits = { Alt: 1, Control: 2, Meta: 4, Shift: 8 };
const modifiers = parts.reduce((m, p) => m | (bits[p] ?? 0), 0);
const codes = { Enter: 13, Escape: 27, Tab: 9, Backspace: 8, ArrowDown: 40, ArrowUp: 38 };
const codes = { Enter: 13, Escape: 27, Tab: 9, Backspace: 8, ArrowDown: 40, ArrowUp: 38, ArrowLeft: 37, ArrowRight: 39, "/": 191 };
const digit = /^\d$/.test(key);
const code = digit ? `Digit${key}` : /^[a-z]$/i.test(key) ? `Key${key.toUpperCase()}` : key;
const code = key === '/' ? 'Slash' : digit ? `Digit${key}` : /^[a-z]$/i.test(key) ? `Key${key.toUpperCase()}` : key;
const vk = codes[key] ?? (key.length === 1 ? key.toUpperCase().charCodeAt(0) : 0);
const text = key === 'Enter' ? '\r' : key.length === 1 && !modifiers ? key : undefined;
const base = { key, code, windowsVirtualKeyCode: vk, modifiers, text };