Connect independent resizable chat panes with routed focus and narrow layouts
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user