fix(os): add Enter key support on boot screen

- Add handleBootKeyPress to handle keyboard input during boot
- Attach onKeyDown handler to both mobile and desktop boot screens
- Add tabIndex={0} to make boot screens focusable
- Pressing Enter now triggers handleGuestContinue to enter system

Fixes: Enter key does nothing on boot screen
This commit is contained in:
MrPiglr 2026-02-12 15:37:45 -07:00
parent 94044be8d1
commit 98159927b7

View file

@ -927,6 +927,12 @@ export default function AeThexOS() {
setTimeout(() => setShowDailyTip(true), 1000);
};
const handleBootKeyPress = (e: React.KeyboardEvent) => {
if (e.key === 'Enter' && showLoginPrompt) {
handleGuestContinue();
}
};
const handleLoginFromBoot = () => {
setShowLoginPrompt(false);
setIsBooting(false);
@ -974,7 +980,11 @@ export default function AeThexOS() {
};
return (
<div className="h-screen w-screen bg-black flex flex-col items-center justify-center relative overflow-hidden">
<div
className="h-screen w-screen bg-black flex flex-col items-center justify-center relative overflow-hidden"
onKeyDown={handleBootKeyPress}
tabIndex={0}
>
{/* Animated background grid */}
<div className="absolute inset-0 opacity-10">
<div className="absolute inset-0" style={{
@ -1080,7 +1090,11 @@ export default function AeThexOS() {
// Desktop boot screen
return (
<div className="h-screen w-screen bg-black relative overflow-hidden">
<div
className="h-screen w-screen bg-black relative overflow-hidden"
onKeyDown={handleBootKeyPress}
tabIndex={0}
>
{/* Scan lines overlay */}
<div
className="absolute inset-0 pointer-events-none z-50"