// U-CENTER — Keyboard editor (all in one file to avoid cross-file Babel scoping issues) // ==================== KEYBOARD LAYOUT DATA ==================== const KB_ROWS = [ // Row 0 — Function [ { code: 'Esc', label: 'Esc' }, { code: 'gap', w: 0.5, type: 'gap' }, { code: 'F1', label: 'F1' }, { code: 'F2', label: 'F2' }, { code: 'F3', label: 'F3' }, { code: 'F4', label: 'F4' }, { code: 'gap', w: 0.3, type: 'gap' }, { code: 'F5', label: 'F5' }, { code: 'F6', label: 'F6' }, { code: 'F7', label: 'F7' }, { code: 'F8', label: 'F8' }, { code: 'gap', w: 0.3, type: 'gap' }, { code: 'F9', label: 'F9' }, { code: 'F10', label: 'F10' }, { code: 'F11', label: 'F11' }, { code: 'F12', label: 'F12' }, { code: 'gap', w: 0.3, type: 'gap' }, { code: 'PrtSc', label: 'Druck', sub: 'S-Abf' }, { code: 'ScrLk', label: 'Rollen' }, { code: 'Pause', label: 'Pause', sub: 'Untbr' }, ], // Row 1 — Numbers (DE ISO) [ { code: 'Grave', label: '^', sub: '°' }, { code: '1', label: '1', sub: '!' }, { code: '2', label: '2', sub: '"' }, { code: '3', label: '3', sub: '§' }, { code: '4', label: '4', sub: '$' }, { code: '5', label: '5', sub: '%' }, { code: '6', label: '6', sub: '&' }, { code: '7', label: '7', sub: '/' }, { code: '8', label: '8', sub: '(' }, { code: '9', label: '9', sub: ')' }, { code: '0', label: '0', sub: '=' }, { code: 'ss', label: 'ß', sub: '?' }, { code: 'accent', label: '´', sub: '`' }, { code: 'Backspace', label: 'Backspace', w: 2, type: 'mod' }, { code: 'gap', w: 0.3, type: 'gap' }, { code: 'Ins', label: 'Einfg' }, { code: 'Home', label: 'Pos1' }, { code: 'PgUp', label: 'Bild', sub: '↑' }, ], // Row 2 — QWERTZ [ { code: 'Tab', label: 'Tab', w: 1.5, type: 'mod' }, { code: 'Q', label: 'Q' }, { code: 'W', label: 'W' }, { code: 'E', label: 'E' }, { code: 'R', label: 'R' }, { code: 'T', label: 'T' }, { code: 'Z', label: 'Z' }, { code: 'U', label: 'U' }, { code: 'I', label: 'I' }, { code: 'O', label: 'O' }, { code: 'P', label: 'P' }, { code: 'Ue', label: 'Ü' }, { code: 'Plus', label: '+', sub: '*' }, { code: 'Enter', label: 'Enter', w: 1.5, type: 'mod' }, { code: 'gap', w: 0.3, type: 'gap' }, { code: 'Del', label: 'Entf' }, { code: 'End', label: 'Ende' }, { code: 'PgDn', label: 'Bild', sub: '↓' }, ], // Row 3 — ASDF [ { code: 'Caps', label: 'Caps', w: 1.75, type: 'mod' }, { code: 'A', label: 'A' }, { code: 'S', label: 'S' }, { code: 'D', label: 'D' }, { code: 'F', label: 'F' }, { code: 'G', label: 'G' }, { code: 'H', label: 'H' }, { code: 'J', label: 'J' }, { code: 'K', label: 'K' }, { code: 'L', label: 'L' }, { code: 'Oe', label: 'Ö' }, { code: 'Ae', label: 'Ä' }, { code: 'Hash', label: '#', sub: "'" }, { code: 'EnterFake', w: 1.25, type: 'gap' }, ], // Row 4 — ZXCV [ { code: 'LShift', label: 'Shift', w: 1.25, type: 'mod' }, { code: 'Less', label: '<', sub: '>' }, { code: 'Y', label: 'Y' }, { code: 'X', label: 'X' }, { code: 'C', label: 'C' }, { code: 'V', label: 'V' }, { code: 'B', label: 'B' }, { code: 'N', label: 'N' }, { code: 'M', label: 'M' }, { code: 'Comma', label: ',', sub: ';' }, { code: 'Period', label: '.', sub: ':' }, { code: 'Minus', label: '-', sub: '_' }, { code: 'RShift', label: 'Shift', w: 2.75, type: 'mod' }, { code: 'gap', w: 1.3, type: 'gap' }, { code: 'Up', label: '↑', type: 'nav' }, { code: 'gap', w: 1, type: 'gap' }, ], // Row 5 — Bottom [ { code: 'LCtrl', label: 'Strg', w: 1.25, type: 'mod' }, { code: 'LWin', label: 'Win', w: 1.25, type: 'mod' }, { code: 'LAlt', label: 'Alt', w: 1.25, type: 'mod' }, { code: 'Space', w: 6.25, type: 'space' }, { code: 'RAlt', label: 'Alt Gr', w: 1.25, type: 'mod' }, { code: 'FN', label: 'FN', w: 1.25, type: 'mod' }, { code: 'Menu', label: 'Menu', w: 1.25, type: 'mod' }, { code: 'RCtrl', label: 'Strg', w: 1.25, type: 'mod' }, { code: 'gap', w: 0.3, type: 'gap' }, { code: 'Left', label: '←', type: 'nav' }, { code: 'Down', label: '↓', type: 'nav' }, { code: 'Right', label: '→', type: 'nav' }, ], ]; // ==================== RGB EFFECTS ==================== const RGB_EFFECTS = [ { id: 'static', label: 'Statisch', desc: 'Alle Tasten in einer Farbe', preview: 'solid' }, { id: 'wave', label: 'Farbwelle', desc: 'Horizontaler Regenbogen', preview: 'wave' }, { id: 'breathe', label: 'Atmen', desc: 'Sanftes Pulsieren', preview: 'breathe' }, { id: 'ripple', label: 'Ripple', desc: 'Welle bei Tastendruck', preview: 'ripple' }, { id: 'reactive',label: 'Reaktiv', desc: 'Taste leuchtet bei Druck', preview: 'reactive' }, { id: 'rain', label: 'Regen', desc: 'Zufällige Tropfen', preview: 'rain' }, { id: 'tornado', label: 'Tornado', desc: 'Rotierende Spirale', preview: 'tornado' }, { id: 'matrix', label: 'Matrix', desc: 'Fallende Zeichen', preview: 'matrix' }, { id: 'custom', label: 'Per-Key', desc: 'Jede Taste individuell', preview: 'perkey' }, ]; const RGB_PRESETS = [ { name: 'uRage Purple', colors: ['#a54cff', '#7b28e0', '#4b0f9a'] }, { name: 'Cyber Cyan', colors: ['#22e0ff', '#0ea5e9', '#0369a1'] }, { name: 'Toxic Green', colors: ['#7fff9a', '#22c55e', '#166534'] }, { name: 'Blood Red', colors: ['#ff4a4a', '#dc2626', '#7f1d1d'] }, { name: 'Solar Orange', colors: ['#ffb347', '#ea580c', '#7c2d12'] }, { name: 'Ocean Fade', colors: ['#7dd3fc', '#a78bfa', '#f472b6'] }, ]; const PROFILES = [ { id: 'default', name: 'Standard', color: '#a54cff', game: '—', keys: 0 }, { id: 'fps', name: 'FPS — Valorant', color: '#22e0ff', game: 'Valorant', keys: 14, active: true }, { id: 'mmo', name: 'MMO — WoW', color: '#7fff9a', game: 'WoW', keys: 48 }, { id: 'work', name: 'Produktivität', color: '#ffb347', game: 'Office', keys: 6 }, ]; const REMAP_CATEGORIES = [ { id: 'std', label: 'Standard-Taste', desc: 'QWERTZ-Zeichen belegen' }, { id: 'media', label: 'Medien', desc: 'Play/Pause, Vol, Track' }, { id: 'mouse', label: 'Maus', desc: 'Klicks, Scroll, DPI-Stage' }, { id: 'combo', label: 'Tastenkombination', desc: 'Ctrl+C, Alt+F4, …' }, { id: 'macro', label: 'Makro auslösen', desc: 'Gespeichertes Makro starten' }, { id: 'app', label: 'App / Datei', desc: 'Programm oder URL' }, ]; // ==================== HELPERS ==================== const KEY_UNIT = 42; const KEY_GAP = 4; function computeKeyColor(effectId, rowIdx, keyIdx, cols, baseHue, staticColor) { if (effectId === 'static') return staticColor; if (effectId === 'wave') { const h = (keyIdx / Math.max(cols - 1, 1)) * 360; return `hsl(${h} 85% 55%)`; } if (effectId === 'breathe') return staticColor; if (effectId === 'rain') { const rnd = ((rowIdx * 13 + keyIdx * 7) % 100) / 100; return rnd > 0.7 ? `hsl(${baseHue} 90% 60%)` : `hsl(${baseHue} 90% 22%)`; } if (effectId === 'tornado') { const cx = 8, cy = 3; const angle = Math.atan2(rowIdx - cy, keyIdx - cx) * (180 / Math.PI); return `hsl(${(angle + 180) % 360} 85% 55%)`; } if (effectId === 'matrix') { const on = ((rowIdx + keyIdx) * 17) % 5 === 0; return on ? 'hsl(140 90% 55%)' : 'hsl(140 90% 18%)'; } if (effectId === 'reactive' || effectId === 'ripple') { return `hsl(${baseHue} 60% 22%)`; } if (effectId === 'custom') { return `hsl(${(rowIdx * 60 + keyIdx * 15) % 360} 80% 50%)`; } return staticColor; } // ==================== SINGLE KEY ==================== function Key(props) { const k = props.k; const selected = props.selected; const onSelect = props.onSelect; const color = props.color; const brightness = props.brightness; const effect = props.effect; if (k.type === 'gap') { return
; } const w = (k.w || 1) * KEY_UNIT + ((k.w || 1) - 1) * KEY_GAP; const b = brightness / 100; return ( ); } // ==================== KEYBOARD VISUAL ==================== function KeyboardVisual(props) { const selected = props.selected; const setSelected = props.setSelected; const keyColors = props.keyColors; const brightness = props.brightness; const effect = props.effect; const staticColor = props.staticColor; return (
{KB_ROWS.map(function (row, rIdx) { return (
{row.map(function (k, kIdx) { const id = rIdx + '-' + kIdx + '-' + k.code; const color = keyColors[id] || computeKeyColor(effect, rIdx, kIdx, row.length, 285, staticColor); return ( ); })}
); })}
); } // ==================== COLOR PICKER ==================== function ColorPicker(props) { const color = props.color; const onChange = props.onChange; const swatches = ['#ffffff', '#a54cff', '#7b28e0', '#22e0ff', '#0ea5e9', '#7fff9a', '#22c55e', '#ffb347', '#ea580c', '#ff4a4a', '#dc2626', '#f472b6', '#a78bfa', '#000000']; return (
Farbe
{swatches.map(function (c) { return (
); } // ==================== EFFECT PICKER ==================== function EffectPicker(props) { const current = props.current; const onSelect = props.onSelect; return (
{RGB_EFFECTS.map(function (e) { const active = e.id === current; let preview; if (e.preview === 'wave' || e.preview === 'perkey') { preview = 'linear-gradient(90deg, #ff4a4a, #ffb347, #7fff9a, #22e0ff, #a54cff)'; } else if (e.preview === 'matrix') { preview = 'linear-gradient(180deg, transparent 30%, #22c55e)'; } else if (e.preview === 'rain') { preview = `radial-gradient(circle at 20% 40%, ${UR.acc} 1px, transparent 2px), radial-gradient(circle at 60% 20%, ${UR.acc} 1px, transparent 2px), radial-gradient(circle at 80% 70%, ${UR.acc} 1px, transparent 2px), ${UR.bg3}`; } else if (e.preview === 'tornado') { preview = 'conic-gradient(from 0deg, #ff4a4a, #ffb347, #22e0ff, #a54cff, #ff4a4a)'; } else if (e.preview === 'ripple' || e.preview === 'reactive') { preview = `radial-gradient(circle at center, ${UR.acc}, ${UR.bg3})`; } else if (e.preview === 'breathe') { preview = `radial-gradient(circle at center, ${UR.acc} 20%, ${UR.bg3})`; } else { preview = UR.acc; } return ( ); })}
); } // ==================== SYNC ROW ==================== function SyncRow(props) { return (
{props.icon}
{props.name}
); } // ==================== SIDE PANELS ==================== function LightingPanel(props) { return ( Beleuchtungs-Engine} title="RGB-Effekt" subtitle="Global-Effekt oder pro Taste. Läuft on-board — kein Hintergrund-Dienst nötig." >
{RGB_PRESETS.map(function (p) { return ( ); })}
Reagiert auf Musik
Audio-Level steuert Helligkeit
); } function KeysPanel(props) { const selectedKey = props.selectedKey; if (!selectedKey) { return ( Key Remap} title="Taste auswählen">
Klicke eine Taste auf der virtuellen Tastatur, um sie neu zu belegen.
); } return ( Key Remap} title={Taste {selectedKey.label || selectedKey.code}} subtitle="Funktion, Layer & FN-Ebene für diese physische Taste." >
{['Basis', 'FN-Layer', 'Layer 2'].map(function (l, i) { return ( ); })}
Kategorie
{REMAP_CATEGORIES.map(function (c, i) { return ( ); })}
}>Belegung anwenden
); } function RapidTriggerPanel(props) { return ( Rapid Trigger · Hall-Effect} title={props.selectedKey ? ('Für Taste ' + (props.selectedKey.label || props.selectedKey.code)) : 'Global gültig'} subtitle="Jede Taste löst aus, sobald sich die Bewegungsrichtung umkehrt. Ideal für FPS-Counterstrafing." >
Rapid Trigger
{props.rapidTrigger ? 'Aktiv' : 'Deaktiviert'}
1000 Hz → 8000 Hz
); } function MacroPanel() { const macros = [ { name: 'Rapid Fire', keys: 'Left-Click × 8', bound: 'F1', dur: '340ms' }, { name: 'Bunnyhop', keys: 'Space + Scroll-Wheel', bound: 'MB4', dur: '520ms' }, { name: 'ALT+F4 Sicher', keys: 'ALT + F4', bound: '—', dur: '80ms' }, { name: 'Discord PTT', keys: 'F13 hold', bound: 'F13', dur: 'toggle' }, ]; return ( Makro-Bibliothek} title="Aufgezeichnete Makros" right={}>Neu} >
{macros.map(function (m, i) { return (
{m.name}
{m.keys} · {m.dur}
{m.bound}
); })}
● REC }>Pause
); } function ProfilePanel(props) { return ( Profil-Management} title="Meine Profile" subtitle="On-Board gespeichert. Auto-Wechsel wenn Spiel startet." >
{PROFILES.map(function (p) { const isActive = p.id === props.activeProfile; return (
{p.name}
{p.game.toUpperCase()} · {p.keys} REMAPS
{isActive && AKTIV}
); })}
{[ { app: 'valorant.exe', profile: 'FPS' }, { app: 'wow.exe', profile: 'MMO' }, { app: 'chrome.exe', profile: 'Standard' }, ].map(function (r, i) { return (
{r.app} {r.profile}
); })}
); } function PerformancePanel() { return ( Report-Rate} title="Polling-Frequenz" subtitle="Wie oft die Tastatur ihren Zustand an den PC sendet." >
{[ { hz: 8000, label: '8000 Hz', desc: '0.125 ms · Tournament', active: true }, { hz: 4000, label: '4000 Hz', desc: '0.25 ms · High-End' }, { hz: 1000, label: '1000 Hz', desc: '1 ms · Standard' }, { hz: 500, label: '500 Hz', desc: '2 ms · Kompatibilität' }, ].map(function (r, i) { return ( ); })}
N-Key Rollover
Alle Tasten gleichzeitig registrierbar
); } // ==================== KEYBOARD TABS ==================== const KB_TABS_LIST = [ { id: 'lighting', label: 'Beleuchtung', icon: }, { id: 'keys', label: 'Tastenbelegung', icon: }, { id: 'trigger', label: 'Rapid Trigger', icon: }, { id: 'macros', label: 'Makros', icon: }, { id: 'profiles', label: 'Profile', icon: }, { id: 'perf', label: 'Performance', icon: }, ]; // ==================== MAIN KEYBOARD SCREEN ==================== function KeyboardScreen(props) { const activeTab = props.activeTab; const setActiveTab = props.setActiveTab; const keyColors = props.keyColors; const setKeyColors = props.setKeyColors; const selected = props.selected; const setSelected = props.setSelected; const effect = props.effect; const setEffect = props.setEffect; const brightness = props.brightness; const setBrightness = props.setBrightness; const staticColor = props.staticColor; const setStaticColor = props.setStaticColor; const activeProfile = props.activeProfile; const setActiveProfile = props.setActiveProfile; const rapidTrigger = props.rapidTrigger; const setRapidTrigger = props.setRapidTrigger; const actuationPoint = props.actuationPoint; const setActuationPoint = props.setActuationPoint; const selectedKey = React.useMemo(function () { if (!selected) return null; const parts = selected.split('-'); const r = parseInt(parts[0], 10); const k = parseInt(parts[1], 10); return KB_ROWS[r] && KB_ROWS[r][k]; }, [selected]); const onApplyKey = function (c) { if (selected) { const next = Object.assign({}, keyColors); next[selected] = c; setKeyColors(next); } }; return (
{/* Header row */}
Keyboard · Exodus 900 mechanical

Tastatur-Konfiguration

PROFIL
{PROFILES.map(function (p) { const active = p.id === activeProfile; return ( ); })}
}>Zurücksetzen }>Speichern
{/* Tabs */}
{KB_TABS_LIST.map(function (t) { return ( ); })}
DE ISO · 87 KEYS · TKL
{/* Main split */}
{/* LEFT — keyboard + previews */}
{/* Hint bar */}
{selectedKey ? Ausgewählt: {selectedKey.label || selectedKey.code} — nutze das rechte Panel um Farbe, Belegung und Rapid Trigger anzupassen. : Klicke eine Taste auf der virtuellen Tastatur, um sie einzeln zu bearbeiten. Oder wähle rechts einen Effekt für die ganze Tastatur.} {selected && ( )}
{/* Foto-Preview + Sync */}
Live-Preview · Foto} title="Exodus 900 · echtes Gerät" subtitle="Vorschau, wie deine Konfiguration wirkt." >
uRage Exodus 900
Geräte-Sync} title="Ambient Sync" subtitle="Andere uRage-Geräte folgen dem gleichen Effekt." >
} name="Reaper 810 · Maus" active={true} /> } name="SoundZ 920 · Headset" active={true} /> } name="Morph SW · Controller" active={false} />
{/* RIGHT — context panel */}
{activeTab === 'lighting' && ( )} {activeTab === 'keys' && } {activeTab === 'trigger' && ( )} {activeTab === 'macros' && } {activeTab === 'profiles' && } {activeTab === 'perf' && }
); } Object.assign(window, { KeyboardScreen, KeyboardVisual, Key, KB_ROWS, RGB_EFFECTS, RGB_PRESETS, PROFILES, REMAP_CATEGORIES });