cat / goq
clone

turns a linux box into a private steam streaming appliance: plug in, tap your key, play from another computer

docs(input): clarify physical keyboard contract

Dami committed 68b1d7b
commit
68b1d7b4898d308ddee7baf4e5269e4c93e8c8b7
parent
9ed422188d81541280efae4565815703c55bf20a
author
Dami <dami.etoile@gmail.com>
4 files changed, +25 -12
Mcrates/sigil-protocol/src/input.rs2++
Mdocs/fresh-bazzite-host.md14+++++++++-----
Mportal/keyboard-map.mjs5+++--
Mportal/keyboard-map.test.mjs16+++++++++++-----
M crates/sigil-protocol/src/input.rs +2 -0
M docs/fresh-bazzite-host.md +9 -5
M portal/keyboard-map.mjs +3 -2
M portal/keyboard-map.test.mjs +11 -5
@@ -32,7 +32,7 @@ test('forwards the bounded physical code contract including extended keys', () =
3232 }3333 });3434 35-test('physical codes preserve non-ASCII and alternate-layout key positions', () => {35+test('physical codes preserve client key positions across keyboard layouts', () => {3636 assert.equal(mapKey({ code: 'KeyE', key: 'é' }), 'KeyE');3737 assert.equal(mapKey({ code: 'Digit2', key: 'é' }), 'Digit2');3838 assert.equal(mapKey({ code: 'KeyQ', key: 'a' }), 'KeyQ');
@@ -71,12 +71,18 @@ test('rejects unsupported physical and logical keys without guessing', () => {
7171 }7272 });7373 74-test('chooses one physical key transition before any text fallback', () => {75- const both = { keyboard: true, text: true };74+test('production keyboard capability forwards a physical code without Text', () => {7675 assert.deepEqual(77- keyboardInputForEvent({ code: 'KeyE', key: 'é' }, both),76+ keyboardInputForEvent(77+ { code: 'KeyE', key: 'é' },78+ { keyboard: true, text: false },79+ ),7880 { type: 'key', key: 'KeyE' },7981 );82+});83+84+test('hypothetical operational Text capability remains exclusive with keyboard', () => {85+ const both = { keyboard: true, text: true };8086 assert.deepEqual(8187 keyboardInputForEvent({ code: 'F5', key: 'F5' }, both),8288 { type: 'key', key: 'F5' },
@@ -87,7 +93,7 @@ test('chooses one physical key transition before any text fallback', () => {
8793 );8894 });8995 90-test('text-only fallback accepts one Unicode scalar and rejects modified or composing input', () => {96+test('hypothetical Text-only capability accepts one scalar and rejects unsafe input', () => {9197 const textOnly = { keyboard: false, text: true };9298 assert.deepEqual(9399 keyboardInputForEvent({ code: '', key: 'é' }, textOnly),