From ae8f0e2236d9f94f3fe19da8e1ef568110a91875 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 11:58:35 +0200 Subject: [PATCH 01/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index 2349619..b98cdd1 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -46,6 +46,7 @@ export const VirtualKeyboard = () => { const languages = [ { value: 'en', label: 'English' }, { value: 'fr', label: 'French' }, + { value: 'de', label: 'Deutsch' }, { value: 'ru', label: 'Russian' } ]; From 759abc92c9d7c40c1282906d57e13af8d690cbf6 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:02:37 +0200 Subject: [PATCH 02/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index b98cdd1..09b0e33 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -127,6 +127,13 @@ export const VirtualKeyboard = () => { // all other labels use their own code return KeyboardCodes.get(base); } + if (keyboardLanguage === 'de' && key.endsWith('_qwertz')) { + const base = key.replace('_qwertz', ''); + if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); + if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); + // all other labels use their own code + return KeyboardCodes.get(base); + } const specialKey = specialKeyMap.get(key); if (specialKey) { From 309b9665cb761a233a3cfa4d70f536068c4ffbab Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:06:30 +0200 Subject: [PATCH 03/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index de75c14..006d17a 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -29,6 +29,14 @@ export const keyboardOptions = { '{shiftleft} RusZ RusX RusC RusV RusB RusN RusM RusComma RusPeriod RusSlash {shiftright}', '{controlleft} {winleft} {altleft} {space} {altright} {winright} {menu} {controlright}' ], + qwertz: [ + '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', + 'Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal {backspace}', + '{tab} KeyQ KeyW KeyE KeyR KeyT KeyZ KeyU KeyI KeyO KeyP BracketLeft BracketRight Backslash', + '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon Quote {enter}', + '{shiftleft} KeyY KeyX KeyC KeyV KeyB KeyN KeyM Comma Period Slash {shiftright}', + '{controlleft} {winleft} {altleft} {space} {altright} {winright} {menu} {controlright}' + ], azerty: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', 'Backquote_azerty Digit1_azerty Digit2_azerty Digit3_azerty Digit4_azerty Digit5_azerty Digit6_azerty Digit7_azerty Digit8_azerty Digit9_azerty Digit0_azerty Minus_azerty Equal_azerty {backspace}', From 00d30efa457e8b6e06967c97bedab1b88282c603 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:12:44 +0200 Subject: [PATCH 04/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 006d17a..4b0e8ce 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -32,8 +32,8 @@ export const keyboardOptions = { qwertz: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', 'Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal {backspace}', - '{tab} KeyQ KeyW KeyE KeyR KeyT KeyZ KeyU KeyI KeyO KeyP BracketLeft BracketRight Backslash', - '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon Quote {enter}', + '{tab} KeyQ KeyW KeyE KeyR KeyT KeyZ KeyU KeyI KeyO KeyP KeyUE BracketLeft BracketRight Backslash', + '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL KeyOE KeyAE Semicolon Quote {enter}', '{shiftleft} KeyY KeyX KeyC KeyV KeyB KeyN KeyM Comma Period Slash {shiftright}', '{controlleft} {winleft} {altleft} {space} {altright} {winright} {menu} {controlright}' ], From e9cccd58ea1a3e881bd60cf6a4fb6c6eb5a4b8ee Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:26:06 +0200 Subject: [PATCH 05/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 4b0e8ce..d77e9d9 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -63,6 +63,10 @@ export const keyboardOptions = { Equal: '+
=', '{backspace}': 'Backspace', + KeyUE: 'Ü', + KeyOE: 'Ö', + KeyAE: 'Ä', + '{tab}': 'Tab', KeyQ: 'Q', KeyW: 'W', From 196b9555ab94d3e02dc9f7e195c6f5b78e54f128 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:58:59 +0200 Subject: [PATCH 06/43] Update virtual-keys.ts --- .../pages/desktop/keyboard/virtual-keys.ts | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index d77e9d9..5121064 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -31,11 +31,11 @@ export const keyboardOptions = { ], qwertz: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', - 'Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal {backspace}', - '{tab} KeyQ KeyW KeyE KeyR KeyT KeyZ KeyU KeyI KeyO KeyP KeyUE BracketLeft BracketRight Backslash', - '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL KeyOE KeyAE Semicolon Quote {enter}', - '{shiftleft} KeyY KeyX KeyC KeyV KeyB KeyN KeyM Comma Period Slash {shiftright}', - '{controlleft} {winleft} {altleft} {space} {altright} {winright} {menu} {controlright}' + 'DEBackquote DEDigit1 DEDigit2 DEDigit3 DEDigit4 DEDigit5 DEDigit6 DEDigit7 DEDigit8 DEDigit9 DEDigit0 DEDigit00 DEDigit000 {backspace}', + '{tab} DEKeyQ KeyW DEKeyE KeyR KeyT KeyZ KeyU KeyI KeyO KeyP DEKeyUE DEPlus', + '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL DEKeyOE DEKeyAE DEHashtag {enter}', + '{shiftleft} DEaufrechtstrich KeyY KeyX KeyC KeyV KeyB KeyN KeyM DEComma DEPunkt DEMinus {shiftright}', + '{DEcontrolleft} {winleft} {altleft} {space} {DEaltright} {winright} {menu} {DEcontrolright}' ], azerty: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', @@ -63,9 +63,35 @@ export const keyboardOptions = { Equal: '+
=', '{backspace}': 'Backspace', - KeyUE: 'Ü', - KeyOE: 'Ö', - KeyAE: 'Ä', + DEBackquote: '^
°', + DEDigit1: '1 !', + DEDigit2: '2 "', + DEDigit3: '3 §', + DEDigit4: '4 $', + DEDigit5: '5 %', + DEDigit6: '6 &', + DEDigit7: '7{/', + DEDigit8: '8[(', + DEDigit9: '9])', + DEDigit0: '0}=', + DEDigit00: 'ß\\?', + DEDigit000: '´ `', + + DEKeyQ: 'Q @', + DEKeyE: 'E €', + DEPlus: '+~*', + DEHashtag: '# \'', + DEaufrechtstrich: '<|>', + DEComma: ', ;', + DEPunkt: '. :', + DEMinus: '- _', + '{DEcontrolleft}': 'STRG', + '{DEaltright}': 'ALT GR', + '{DEcontrolright}': 'STRG', + + DEKeyUE: 'Ü', + DEKeyOE: 'Ö', + DEKeyAE: 'Ä', '{tab}': 'Tab', KeyQ: 'Q', From b9c85fad7b5ef71aa0b8fd290d5ca8b4c74c6fed Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 13:00:06 +0200 Subject: [PATCH 07/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index 09b0e33..59289b2 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -66,6 +66,7 @@ export const VirtualKeyboard = () => { const layoutMap = new Map([ ['en', 'default'], ['ru', 'rus'], + ['de', 'qwertz'], ['fr', 'azerty'] ]); From acf366d61ee850084b993d11ca4855e474040288 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:03:09 +0200 Subject: [PATCH 08/43] Update mappings.ts --- web/src/pages/desktop/keyboard/mappings.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/pages/desktop/keyboard/mappings.ts b/web/src/pages/desktop/keyboard/mappings.ts index 11f2b18..f4daa53 100644 --- a/web/src/pages/desktop/keyboard/mappings.ts +++ b/web/src/pages/desktop/keyboard/mappings.ts @@ -153,6 +153,11 @@ export const KeyboardCodes: Map = new Map([ ['ShiftRight', 229], ['AltRight', 230], ['MetaRight', 231] + + // DE-spezifische Tokens (wichtig für qwertz-Layout) + ['{DEcontrolleft}', 'ControlLeft'], // wird in display als 'STRG' gezeigt + ['{DEcontrolright}', 'ControlRight'], + ['{DEaltright}', 'AltRight'] // AltGr ]); export const ModifierCodes: Map = new Map([ From d8c4de9a01d3302943c6aa9b6f800cf16d47c18c Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:04:10 +0200 Subject: [PATCH 09/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 5121064..1e3987f 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -327,7 +327,12 @@ export const modifierKeys = [ '{controlright}', '{altright}', '{metaright}', - '{winright}' + '{winright}', + + // DE-spezifische Modifier-Tokens (für qwertz-Layout) + '{DEcontrolleft}', + '{DEcontrolright}', + '{DEaltright}' ]; // double line display buttons From 3de21f295b2b70ee8801ba4f9a92f7a55dc511be Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:04:26 +0200 Subject: [PATCH 10/43] Update mappings.ts --- web/src/pages/desktop/keyboard/mappings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/pages/desktop/keyboard/mappings.ts b/web/src/pages/desktop/keyboard/mappings.ts index f4daa53..b701ebf 100644 --- a/web/src/pages/desktop/keyboard/mappings.ts +++ b/web/src/pages/desktop/keyboard/mappings.ts @@ -152,7 +152,7 @@ export const KeyboardCodes: Map = new Map([ ['ControlRight', 228], ['ShiftRight', 229], ['AltRight', 230], - ['MetaRight', 231] + ['MetaRight', 231], // DE-spezifische Tokens (wichtig für qwertz-Layout) ['{DEcontrolleft}', 'ControlLeft'], // wird in display als 'STRG' gezeigt From 0e30b628948d2cc4421d3971478ae1b8ef99eebd Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:07:28 +0200 Subject: [PATCH 11/43] Update mappings.ts --- web/src/pages/desktop/keyboard/mappings.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web/src/pages/desktop/keyboard/mappings.ts b/web/src/pages/desktop/keyboard/mappings.ts index b701ebf..11f2b18 100644 --- a/web/src/pages/desktop/keyboard/mappings.ts +++ b/web/src/pages/desktop/keyboard/mappings.ts @@ -152,12 +152,7 @@ export const KeyboardCodes: Map = new Map([ ['ControlRight', 228], ['ShiftRight', 229], ['AltRight', 230], - ['MetaRight', 231], - - // DE-spezifische Tokens (wichtig für qwertz-Layout) - ['{DEcontrolleft}', 'ControlLeft'], // wird in display als 'STRG' gezeigt - ['{DEcontrolright}', 'ControlRight'], - ['{DEaltright}', 'AltRight'] // AltGr + ['MetaRight', 231] ]); export const ModifierCodes: Map = new Map([ From 8310e43b31aa4855c563552701c677d604490baa Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:08:53 +0200 Subject: [PATCH 12/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 1e3987f..8565675 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -313,7 +313,12 @@ export const specialKeyMap = new Map([ ['{arrowright}', 'ArrowRight'], ['{arrowleft}', 'ArrowLeft'], ['{arrowdown}', 'ArrowDown'], - ['{arrowup}', 'ArrowUp'] + ['{arrowup}', 'ArrowUp'], + + //DE + ['{DEcontrolleft}', 'ControlLeft'], + ['{DEcontrolright}', 'ControlRight'], + ['{DEaltright}', 'AltRight'] ]); // modifier keys From 8fc71a2e362b0e353a2f66c012d99d16019ae542 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:14:48 +0200 Subject: [PATCH 13/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index 59289b2..907b203 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -130,8 +130,10 @@ export const VirtualKeyboard = () => { } if (keyboardLanguage === 'de' && key.endsWith('_qwertz')) { const base = key.replace('_qwertz', ''); + // Y ↔ Z Tausch if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); + // all other labels use their own code return KeyboardCodes.get(base); } From 90068a3c2d83406f334a6905fecff2f4c56fe728 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:16:22 +0200 Subject: [PATCH 14/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index 907b203..288fc01 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -131,8 +131,8 @@ export const VirtualKeyboard = () => { if (keyboardLanguage === 'de' && key.endsWith('_qwertz')) { const base = key.replace('_qwertz', ''); // Y ↔ Z Tausch - if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); - if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); + //if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); + //if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); // all other labels use their own code return KeyboardCodes.get(base); From 1016853d25a44a8b820801d27e4e6bed06785650 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 17:54:13 +0200 Subject: [PATCH 15/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index 288fc01..907b203 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -131,8 +131,8 @@ export const VirtualKeyboard = () => { if (keyboardLanguage === 'de' && key.endsWith('_qwertz')) { const base = key.replace('_qwertz', ''); // Y ↔ Z Tausch - //if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); - //if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); + if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); + if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); // all other labels use their own code return KeyboardCodes.get(base); From 48c941fb86f335243fcbec8502233640e8c670b9 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:01:34 +0200 Subject: [PATCH 16/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index 907b203..c0956dc 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -118,6 +118,9 @@ export const VirtualKeyboard = () => { } function getKeyCode(key: string) { + console.log('Key: ', key); + console.log('KeyboardLanguage: ', keyboardLanguage); + // AZERTY: swap A↔Q and Z↔W on French physical positions if (keyboardLanguage === 'fr' && key.endsWith('_azerty')) { const base = key.replace('_azerty', ''); From c3a9e9d4020da0dc196bf2944088ef916a8a2c9d Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:05:44 +0200 Subject: [PATCH 17/43] Update virtual-keys.ts --- .../pages/desktop/keyboard/virtual-keys.ts | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 8565675..775557f 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -31,11 +31,11 @@ export const keyboardOptions = { ], qwertz: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', - 'DEBackquote DEDigit1 DEDigit2 DEDigit3 DEDigit4 DEDigit5 DEDigit6 DEDigit7 DEDigit8 DEDigit9 DEDigit0 DEDigit00 DEDigit000 {backspace}', - '{tab} DEKeyQ KeyW DEKeyE KeyR KeyT KeyZ KeyU KeyI KeyO KeyP DEKeyUE DEPlus', - '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL DEKeyOE DEKeyAE DEHashtag {enter}', - '{shiftleft} DEaufrechtstrich KeyY KeyX KeyC KeyV KeyB KeyN KeyM DEComma DEPunkt DEMinus {shiftright}', - '{DEcontrolleft} {winleft} {altleft} {space} {DEaltright} {winright} {menu} {DEcontrolright}' + 'Backquote_qwertz Digit1_qwertz Digit2_qwertz Digit3_qwertz Digit4_qwertz Digit5_qwertz Digit6_qwertz Digit7_qwertz Digit8_qwertz Digit9_qwertz Digit0_qwertz Digit00_qwertz Digit000_qwertz {backspace}', + '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ KeyU KeyI KeyO KeyP KeyUE_qwertz Plus_qwertz', + '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL KeyOE_qwertz KeyAE_qwertz Hashtag_qwertz {enter}', + '{shiftleft} aufrechtstrich_qwertz KeyY KeyX KeyC KeyV KeyB KeyN KeyM Comma_qwertz Punkt_qwertz Minus_qwertz {shiftright}', + '{controlleft_qwertz} {winleft} {altleft} {space} {altright_qwertz} {winright} {menu} {controlright_qwertz}' ], azerty: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', @@ -63,35 +63,35 @@ export const keyboardOptions = { Equal: '+
=', '{backspace}': 'Backspace', - DEBackquote: '^
°', - DEDigit1: '1 !', - DEDigit2: '2 "', - DEDigit3: '3 §', - DEDigit4: '4 $', - DEDigit5: '5 %', - DEDigit6: '6 &', - DEDigit7: '7{/', - DEDigit8: '8[(', - DEDigit9: '9])', - DEDigit0: '0}=', - DEDigit00: 'ß\\?', - DEDigit000: '´ `', + Backquote_qwertz: '^
°', + Digit1_qwertz: '1 !', + Digit2_qwertz: '2 "', + Digit3_qwertz: '3 §', + Digit4_qwertz: '4 $', + Digit5_qwertz: '5 %', + Digit6_qwertz: '6 &', + Digit7_qwertz: '7{/', + Digit8_qwertz: '8[(', + Digit9_qwertz: '9])', + Digit0_qwertz: '0}=', + Digit00_qwertz: 'ß\\?', + Digit000_qwertz: '´ `', - DEKeyQ: 'Q @', - DEKeyE: 'E €', - DEPlus: '+~*', - DEHashtag: '# \'', - DEaufrechtstrich: '<|>', - DEComma: ', ;', - DEPunkt: '. :', - DEMinus: '- _', - '{DEcontrolleft}': 'STRG', - '{DEaltright}': 'ALT GR', - '{DEcontrolright}': 'STRG', + KeyQ_qwertz: 'Q @', + KeyE_qwertz: 'E €', + Plus_qwertz: '+~*', + Hashtag_qwertz: '# \'', + aufrechtstrich_qwertz: '<|>', + Comma_qwertz: ', ;', + Punkt_qwertz: '. :', + Minus_qwertz: '- _', + '{controlleft_qwertz}': 'STRG', + '{altright_qwertz}': 'ALT GR', + '{controlright_qwertz}': 'STRG', - DEKeyUE: 'Ü', - DEKeyOE: 'Ö', - DEKeyAE: 'Ä', + KeyUE_qwertz: 'Ü', + KeyOE_qwertz: 'Ö', + KeyAE_qwertz: 'Ä', '{tab}': 'Tab', KeyQ: 'Q', @@ -316,9 +316,9 @@ export const specialKeyMap = new Map([ ['{arrowup}', 'ArrowUp'], //DE - ['{DEcontrolleft}', 'ControlLeft'], - ['{DEcontrolright}', 'ControlRight'], - ['{DEaltright}', 'AltRight'] + ['{controlleft_qwertz}', 'ControlLeft'], + ['{controlright_qwertz}', 'ControlRight'], + ['{altright_qwertz}', 'AltRight'] ]); // modifier keys @@ -335,9 +335,9 @@ export const modifierKeys = [ '{winright}', // DE-spezifische Modifier-Tokens (für qwertz-Layout) - '{DEcontrolleft}', - '{DEcontrolright}', - '{DEaltright}' + '{controlleft_qwertz}', + '{controlright_qwertz}', + '{altright_qwertz}' ]; // double line display buttons From 305a75d1a7f2a07f0fa85fbac0cd726b7e4cab04 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:10:40 +0200 Subject: [PATCH 18/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 775557f..ad1e272 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -32,9 +32,9 @@ export const keyboardOptions = { qwertz: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', 'Backquote_qwertz Digit1_qwertz Digit2_qwertz Digit3_qwertz Digit4_qwertz Digit5_qwertz Digit6_qwertz Digit7_qwertz Digit8_qwertz Digit9_qwertz Digit0_qwertz Digit00_qwertz Digit000_qwertz {backspace}', - '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ KeyU KeyI KeyO KeyP KeyUE_qwertz Plus_qwertz', + '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ_qwertz KeyU KeyI KeyO KeyP KeyUE_qwertz Plus_qwertz', '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL KeyOE_qwertz KeyAE_qwertz Hashtag_qwertz {enter}', - '{shiftleft} aufrechtstrich_qwertz KeyY KeyX KeyC KeyV KeyB KeyN KeyM Comma_qwertz Punkt_qwertz Minus_qwertz {shiftright}', + '{shiftleft} aufrechtstrich_qwertz KeyY_qwertz KeyX KeyC KeyV KeyB KeyN KeyM Comma_qwertz Punkt_qwertz Minus_qwertz {shiftright}', '{controlleft_qwertz} {winleft} {altleft} {space} {altright_qwertz} {winright} {menu} {controlright_qwertz}' ], azerty: [ @@ -77,6 +77,9 @@ export const keyboardOptions = { Digit00_qwertz: 'ß\\?', Digit000_qwertz: '´ `', + KeyY_qwertz: 'Y', + KeyZ_qwertz: 'Z', + KeyQ_qwertz: 'Q @', KeyE_qwertz: 'E €', Plus_qwertz: '+~*', From f8d8b04de35676b0b3d3558d94d4298b57660856 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:15:39 +0200 Subject: [PATCH 19/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index c0956dc..2d397e1 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -136,6 +136,7 @@ export const VirtualKeyboard = () => { // Y ↔ Z Tausch if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); + if (base === 'KeyUE') return KeyboardCodes.get('KeyBracketLeft'); // all other labels use their own code return KeyboardCodes.get(base); From 6ca0fa76264746afde6c647b013c2a726d76703a Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:25:05 +0200 Subject: [PATCH 20/43] Update virtual-keys.ts --- .../pages/desktop/keyboard/virtual-keys.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index ad1e272..0fe9030 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -32,9 +32,9 @@ export const keyboardOptions = { qwertz: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', 'Backquote_qwertz Digit1_qwertz Digit2_qwertz Digit3_qwertz Digit4_qwertz Digit5_qwertz Digit6_qwertz Digit7_qwertz Digit8_qwertz Digit9_qwertz Digit0_qwertz Digit00_qwertz Digit000_qwertz {backspace}', - '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ_qwertz KeyU KeyI KeyO KeyP KeyUE_qwertz Plus_qwertz', - '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL KeyOE_qwertz KeyAE_qwertz Hashtag_qwertz {enter}', - '{shiftleft} aufrechtstrich_qwertz KeyY_qwertz KeyX KeyC KeyV KeyB KeyN KeyM Comma_qwertz Punkt_qwertz Minus_qwertz {shiftright}', + '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ_qwertz KeyU KeyI KeyO KeyP BracketLeft_qwertz Plus_qwertz', + '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon_qwertz Quote_qwertz Backslash_qwertz {enter}', + '{shiftleft} IntlBackslash_qwertz KeyY_qwertz KeyX KeyC KeyV KeyB KeyN KeyM Comma_qwertz Period_qwertz Slash_qwertz {shiftright}', '{controlleft_qwertz} {winleft} {altleft} {space} {altright_qwertz} {winright} {menu} {controlright_qwertz}' ], azerty: [ @@ -83,18 +83,18 @@ export const keyboardOptions = { KeyQ_qwertz: 'Q @', KeyE_qwertz: 'E €', Plus_qwertz: '+~*', - Hashtag_qwertz: '# \'', - aufrechtstrich_qwertz: '<|>', + Backslash_qwertz: '# \'', + IntlBackslash_qwertz: '<|>', Comma_qwertz: ', ;', - Punkt_qwertz: '. :', - Minus_qwertz: '- _', + Period_qwertz: '. :', + Slash_qwertz: '- _', '{controlleft_qwertz}': 'STRG', '{altright_qwertz}': 'ALT GR', '{controlright_qwertz}': 'STRG', - KeyUE_qwertz: 'Ü', - KeyOE_qwertz: 'Ö', - KeyAE_qwertz: 'Ä', + BracketLeft_qwertz: 'Ü', + Semicolon_qwertz: 'Ö', + Quote_qwertz: 'Ä', '{tab}': 'Tab', KeyQ: 'Q', From e86d385521c6f6c3cf624515f44d404a9bf81f7e Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:25:08 +0200 Subject: [PATCH 21/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index 2d397e1..d5a7d34 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -133,10 +133,9 @@ export const VirtualKeyboard = () => { } if (keyboardLanguage === 'de' && key.endsWith('_qwertz')) { const base = key.replace('_qwertz', ''); - // Y ↔ Z Tausch + // Tausch if (base === 'KeyZ') return KeyboardCodes.get('KeyY'); if (base === 'KeyY') return KeyboardCodes.get('KeyZ'); - if (base === 'KeyUE') return KeyboardCodes.get('KeyBracketLeft'); // all other labels use their own code return KeyboardCodes.get(base); From bc640845168e383ac1d83f82081775a8228487b0 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:28:16 +0200 Subject: [PATCH 22/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 0fe9030..4fcfaf4 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -32,7 +32,7 @@ export const keyboardOptions = { qwertz: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', 'Backquote_qwertz Digit1_qwertz Digit2_qwertz Digit3_qwertz Digit4_qwertz Digit5_qwertz Digit6_qwertz Digit7_qwertz Digit8_qwertz Digit9_qwertz Digit0_qwertz Digit00_qwertz Digit000_qwertz {backspace}', - '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ_qwertz KeyU KeyI KeyO KeyP BracketLeft_qwertz Plus_qwertz', + '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ_qwertz KeyU KeyI KeyO KeyP BracketLeft_qwertz BracketRight_qwertz', '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon_qwertz Quote_qwertz Backslash_qwertz {enter}', '{shiftleft} IntlBackslash_qwertz KeyY_qwertz KeyX KeyC KeyV KeyB KeyN KeyM Comma_qwertz Period_qwertz Slash_qwertz {shiftright}', '{controlleft_qwertz} {winleft} {altleft} {space} {altright_qwertz} {winright} {menu} {controlright_qwertz}' @@ -82,7 +82,7 @@ export const keyboardOptions = { KeyQ_qwertz: 'Q @', KeyE_qwertz: 'E €', - Plus_qwertz: '+~*', + BracketRight_qwertz: '+~*', Backslash_qwertz: '# \'', IntlBackslash_qwertz: '<|>', Comma_qwertz: ', ;', From fb9f127289c0e76c20a8e148eef281366130d12d Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:31:41 +0200 Subject: [PATCH 23/43] Update virtual-keys.ts --- web/src/pages/desktop/keyboard/virtual-keys.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 4fcfaf4..1355ff5 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -31,7 +31,7 @@ export const keyboardOptions = { ], qwertz: [ '{escape} F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12', - 'Backquote_qwertz Digit1_qwertz Digit2_qwertz Digit3_qwertz Digit4_qwertz Digit5_qwertz Digit6_qwertz Digit7_qwertz Digit8_qwertz Digit9_qwertz Digit0_qwertz Digit00_qwertz Digit000_qwertz {backspace}', + 'Backquote_qwertz Digit1_qwertz Digit2_qwertz Digit3_qwertz Digit4_qwertz Digit5_qwertz Digit6_qwertz Digit7_qwertz Digit8_qwertz Digit9_qwertz Digit0_qwertz Minus_qwertz Equal_qwertz {backspace}', '{tab} KeyQ_qwertz KeyW KeyE_qwertz KeyR KeyT KeyZ_qwertz KeyU KeyI KeyO KeyP BracketLeft_qwertz BracketRight_qwertz', '{capslock} KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon_qwertz Quote_qwertz Backslash_qwertz {enter}', '{shiftleft} IntlBackslash_qwertz KeyY_qwertz KeyX KeyC KeyV KeyB KeyN KeyM Comma_qwertz Period_qwertz Slash_qwertz {shiftright}', @@ -74,8 +74,8 @@ export const keyboardOptions = { Digit8_qwertz: '8[(', Digit9_qwertz: '9])', Digit0_qwertz: '0}=', - Digit00_qwertz: 'ß\\?', - Digit000_qwertz: '´ `', + Minus_qwertz: 'ß\\?', + Equal_qwertz: '´ `', KeyY_qwertz: 'Y', KeyZ_qwertz: 'Z', From 7d3df10915d76cd8b1d4cf53e0890c155f02a2e9 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:41:45 +0200 Subject: [PATCH 24/43] Update virtual-keys.ts --- .../pages/desktop/keyboard/virtual-keys.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keys.ts b/web/src/pages/desktop/keyboard/virtual-keys.ts index 1355ff5..cc1a233 100644 --- a/web/src/pages/desktop/keyboard/virtual-keys.ts +++ b/web/src/pages/desktop/keyboard/virtual-keys.ts @@ -64,30 +64,30 @@ export const keyboardOptions = { '{backspace}': 'Backspace', Backquote_qwertz: '^
°', - Digit1_qwertz: '1 !', - Digit2_qwertz: '2 "', - Digit3_qwertz: '3 §', - Digit4_qwertz: '4 $', - Digit5_qwertz: '5 %', - Digit6_qwertz: '6 &', + Digit1_qwertz: '1
!', + Digit2_qwertz: '2
"', + Digit3_qwertz: '3
§', + Digit4_qwertz: '4
$', + Digit5_qwertz: '5
%', + Digit6_qwertz: '6
&', Digit7_qwertz: '7{/', Digit8_qwertz: '8[(', Digit9_qwertz: '9])', Digit0_qwertz: '0}=', Minus_qwertz: 'ß\\?', - Equal_qwertz: '´ `', + Equal_qwertz: '´
`', KeyY_qwertz: 'Y', KeyZ_qwertz: 'Z', - KeyQ_qwertz: 'Q @', - KeyE_qwertz: 'E €', + KeyQ_qwertz: 'Q
@', + KeyE_qwertz: 'E
€', BracketRight_qwertz: '+~*', - Backslash_qwertz: '# \'', + Backslash_qwertz: '#
\'', IntlBackslash_qwertz: '<|>', - Comma_qwertz: ', ;', - Period_qwertz: '. :', - Slash_qwertz: '- _', + Comma_qwertz: ',
;', + Period_qwertz: '.
:', + Slash_qwertz: '-
_', '{controlleft_qwertz}': 'STRG', '{altright_qwertz}': 'ALT GR', '{controlright_qwertz}': 'STRG', From f209cb1e0e6ee4c714e0e84c0c6566eac2c50b21 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 14 Sep 2025 18:42:35 +0200 Subject: [PATCH 25/43] Update virtual-keyboard.tsx --- web/src/pages/desktop/keyboard/virtual-keyboard.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx index d5a7d34..5a586a9 100644 --- a/web/src/pages/desktop/keyboard/virtual-keyboard.tsx +++ b/web/src/pages/desktop/keyboard/virtual-keyboard.tsx @@ -118,9 +118,6 @@ export const VirtualKeyboard = () => { } function getKeyCode(key: string) { - console.log('Key: ', key); - console.log('KeyboardLanguage: ', keyboardLanguage); - // AZERTY: swap A↔Q and Z↔W on French physical positions if (keyboardLanguage === 'fr' && key.endsWith('_azerty')) { const base = key.replace('_azerty', ''); From 5fcdf888b3c32dc9cc3c626796fe3f974fea8932 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Mon, 22 Sep 2025 22:14:52 +0200 Subject: [PATCH 26/43] Update paste.go --- server/service/hid/paste.go | 41 ++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/server/service/hid/paste.go b/server/service/hid/paste.go index df64468..76bb633 100644 --- a/server/service/hid/paste.go +++ b/server/service/hid/paste.go @@ -16,11 +16,41 @@ type Char struct { type PasteReq struct { Content string `form:"content" validate:"required"` + Langue string `form:"langue"` +} + +func LangueSwitch(base map[rune]Char, lang string) map[rune]Char { + // wenn kein lang angegeben → Standardmap zurück + if lang == "" { + return base + } + + // immer Kopie erstellen + m := copyMap(base) + + switch lang { + case "de": + // Z/Y tauschen + m['z'], m['y'] = m['y'], m['z'] + m['Z'], m['Y'] = m['Y'], m['Z'] + + // deutsche Sonderzeichen hinzufügen oder remappen + m['ä'] = Char{0, 52} // auf US-Taste ' (Apostroph) + m['Ä'] = Char{2, 52} + m['ö'] = Char{0, 51} // auf US-Taste ; + m['Ö'] = Char{2, 51} + m['ü'] = Char{0, 47} // auf US-Taste [ + m['Ü'] = Char{2, 47} + m['ß'] = Char{0, 45} // auf US-Taste - + // usw. + } + return m } func (s *Service) Paste(c *gin.Context) { var req PasteReq var rsp proto.Response + charMapLocal := LangueSwitch(charMap, req.Langue) if err := proto.ParseFormRequest(c, &req); err != nil { rsp.ErrRsp(c, -1, "invalid arguments") return @@ -34,7 +64,7 @@ func (s *Service) Paste(c *gin.Context) { keyUp := []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} for _, char := range req.Content { - key, ok := charMap[char] + key, ok := charMapLocal[char] if !ok { log.Debugf("unknown key '%c' (rune: %d)", char, char) continue @@ -48,6 +78,15 @@ func (s *Service) Paste(c *gin.Context) { rsp.OkRsp(c) log.Debugf("hid paste success, total %d characters processed", len(req.Content)) } + +func copyMap(src map[rune]Char) map[rune]Char { + dst := make(map[rune]Char, len(src)) + for k, v := range src { + dst[k] = v + } + return dst +} + var charMap = map[rune]Char{ // Lowercase letters 'a': {0, 4}, 'b': {0, 5}, 'c': {0, 6}, 'd': {0, 7}, 'e': {0, 8}, From 0dc0f9ea73251601096a0919773256fde8b29ba6 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sat, 27 Sep 2025 23:55:14 +0200 Subject: [PATCH 27/43] Update paste.go --- server/service/hid/paste.go | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/server/service/hid/paste.go b/server/service/hid/paste.go index 76bb633..4a0c260 100644 --- a/server/service/hid/paste.go +++ b/server/service/hid/paste.go @@ -30,19 +30,29 @@ func LangueSwitch(base map[rune]Char, lang string) map[rune]Char { switch lang { case "de": - // Z/Y tauschen - m['z'], m['y'] = m['y'], m['z'] - m['Z'], m['Y'] = m['Y'], m['Z'] + // Y tauschen + m['y'] = Char{0, 29} + m['Y'] = Char{2, 29} + + // Z tauschen + m['z'] = Char{0, 28} + m['Z'] = Char{2, 28} // deutsche Sonderzeichen hinzufügen oder remappen - m['ä'] = Char{0, 52} // auf US-Taste ' (Apostroph) - m['Ä'] = Char{2, 52} - m['ö'] = Char{0, 51} // auf US-Taste ; - m['Ö'] = Char{2, 51} - m['ü'] = Char{0, 47} // auf US-Taste [ - m['Ü'] = Char{2, 47} - m['ß'] = Char{0, 45} // auf US-Taste - - // usw. + m['\u00E4'] = Char{0, 52} // ä + m['\u00C4'] = Char{2, 52} // Ä + m['\u00F6'] = Char{0, 51} // ö + m['\u00D6'] = Char{2, 51} // Ö + m['\u00FC'] = Char{0, 47} // ü + m['\u00DC'] = Char{2, 47} // Ü + m['\u00DF'] = Char{0, 45} // ß + + //Tauschen + m['^'] = Char{0, 53} + + //neu + m['\u1FFD'] = Char{0, 53} + } return m } @@ -50,11 +60,11 @@ func LangueSwitch(base map[rune]Char, lang string) map[rune]Char { func (s *Service) Paste(c *gin.Context) { var req PasteReq var rsp proto.Response - charMapLocal := LangueSwitch(charMap, req.Langue) if err := proto.ParseFormRequest(c, &req); err != nil { rsp.ErrRsp(c, -1, "invalid arguments") return } + charMapLocal := LangueSwitch(charMap, req.Langue) if len(req.Content) > 1024 { rsp.ErrRsp(c, -2, "content too long") return @@ -66,6 +76,7 @@ func (s *Service) Paste(c *gin.Context) { for _, char := range req.Content { key, ok := charMapLocal[char] if !ok { + rsp.ErrRsp(c, -1, "unknown character: "+string(char)) log.Debugf("unknown key '%c' (rune: %d)", char, char) continue } From 044292ccb4f67f0c19c1b07376876f810d606adc Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 28 Sep 2025 11:36:54 +0200 Subject: [PATCH 28/43] Update paste.go --- server/service/hid/paste.go | 55 +++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/server/service/hid/paste.go b/server/service/hid/paste.go index 4a0c260..7b1686a 100644 --- a/server/service/hid/paste.go +++ b/server/service/hid/paste.go @@ -48,10 +48,40 @@ func LangueSwitch(base map[rune]Char, lang string) map[rune]Char { m['\u00DF'] = Char{0, 45} // ß //Tauschen - m['^'] = Char{0, 53} + m['^'] = Char{0, 53} // muss doppelt sein + m['/'] = Char{2, 36} // Shift + 7 + m['('] = Char{2, 37} // Shift + 8 + m['&'] = Char{2, 35} // Shift + 6 + m[')'] = Char{2, 38} // Shift + 9 + m['`'] = Char{2, 46} // Grave Accent / Backtick + m['"'] = Char{2, 31} // Shift + 2 + m['?'] = Char{2, 45} // Shift + ß + m['{'] = Char{0x40, 36} // ALt Gr + 7 + m['['] = Char{0x40, 37} // ALt Gr + 8 + m[']'] = Char{0x40, 38} // ALt Gr + 6 + m['}'] = Char{0x40, 39} // ALt Gr + 0 + m['\\'] = Char{0x40, 45} // ALt Gr + ß + m['@'] = Char{0x40, 20} // ALt Gr + q + m['+'] = Char{0, 48} // Shift + + + m['*'] = Char{2, 48} // Shift + + + m['~'] = Char{0x40, 48} // Shift + + + m['#'] = Char{0, 49} // Shift + # + m['\''] = Char{2, 49} // Shift + # + m['<'] = Char{0, 100} // Shift + < + m['>'] = Char{2, 100} // Shift + < + m['|'] = Char{0x40, 100} // ALt Gr + < + m[';'] = Char{2, 54} // Shift + , + m[':'] = Char{2, 55} // Shift + . + m['-'] = Char{0, 56} // Shift + - + m['_'] = Char{2, 56} // Shift + - //neu - m['\u1FFD'] = Char{0, 53} + m['\u00B4'] = Char{0, 46} // ´ + m['\u00B0'] = Char{2, 53} // ° + m['\u00A7'] = Char{2, 32} // § + m['\u20AC'] = Char{0x40, 8} // € + m['\u00B2'] = Char{0x40, 31} // ² + m['\u00B3'] = Char{0x40, 32} // ³ } return m @@ -76,7 +106,26 @@ func (s *Service) Paste(c *gin.Context) { for _, char := range req.Content { key, ok := charMapLocal[char] if !ok { - rsp.ErrRsp(c, -1, "unknown character: "+string(char)) + + hex := string(char) + + code := int(char) + + for i := 12; i >= 0; i -= 4 { + digit := (code >> i) & 0xF + var c byte + if digit < 10 { + c = byte('0' + digit) + } else { + c = byte('A' + (digit - 10)) + } + hex += string(c) + } + + + + + rsp.ErrRsp(c, -1, "unknown character: "+hex) log.Debugf("unknown key '%c' (rune: %d)", char, char) continue } From 310d550ff6e557da05bf9d68e5d556b7a4ba6634 Mon Sep 17 00:00:00 2001 From: Alexander-Ger-Reich <50119493+Alexander-Ger-Reich@users.noreply.github.com> Date: Sun, 28 Sep 2025 12:03:51 +0200 Subject: [PATCH 29/43] Update paste.tsx --- web/src/pages/desktop/menu/keyboard/paste.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/web/src/pages/desktop/menu/keyboard/paste.tsx b/web/src/pages/desktop/menu/keyboard/paste.tsx index 382d66e..cd6da91 100644 --- a/web/src/pages/desktop/menu/keyboard/paste.tsx +++ b/web/src/pages/desktop/menu/keyboard/paste.tsx @@ -8,6 +8,9 @@ import { useTranslation } from 'react-i18next'; import { paste } from '@/api/hid'; import { isKeyboardEnableAtom } from '@/jotai/keyboard.ts'; +import { Button, Input, Modal, Select, type InputRef } from 'antd'; +const { Option } = Select; + const { TextArea } = Input; export const Paste = () => { @@ -19,6 +22,7 @@ export const Paste = () => { const [status, setStatus] = useState<'' | 'error'>(''); const [isLoading, setIsLoading] = useState(false); const [errMsg, setErrMsg] = useState(''); + const [langue, setLangue] = useState('de'); const inputRef = useRef(null); @@ -88,6 +92,15 @@ export const Paste = () => { >
{t('keyboard.tips')}
+ +