keyboard shortcut toggles the Gemini sidebar extension?

📦 Key shortcuts
✨ The Prompt Phrase
Which keyboard shortcut toggles the Gemini sidebar extension?

~alt + G~

💻 Code Preview

📦 All-in-One Code
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>keyboard shortcut opens or toggles Gemini's sidebar panel (Copy) - Interactive Tutorial</title>
    <style>
        :root {
            --bg-color: #0b0f19;
            --text-color: #f1f5f9;
            --accent-1: #3b82f6; /* Gemini Blue */
            --accent-2: #8b5cf6; /* Purple */
            --accent-3: #10b981; /* Success Green */
            --glass-bg: rgba(255, 255, 255, 0.05);
            --glass-border: rgba(255, 255, 255, 0.1);
        }

        body {
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            line-height: 1.6;
            overflow-x: hidden;
            scroll-behavior: smooth;
        }

        /* Glassmorphism Panels */
        .glass-panel {
            background: var(--glass-bg);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            padding: 2.5rem;
            margin: 2rem auto;
            max-width: 800px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .glass-panel:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
        }

        /* Hero Header */
        header {
            text-align: center;
            padding: 5rem 1rem;
            background: radial-gradient(circle at top, rgba(59, 130, 246, 0.2), transparent 70%);
            border-bottom: 1px solid var(--glass-border);
        }

        h1 {
            font-size: 3.5rem;
            margin: 0;
            background: linear-gradient(to right, var(--accent-1), var(--accent-2), #e879f9);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: float 3s ease-in-out infinite;
        }

        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }

        /* Typography */
        h2 {
            color: var(--accent-1);
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 0;
        }

        .container {
            padding: 2rem;
            max-width: 1000px;
            margin: 0 auto;
        }

        /* Keyboard Keys */
        .key {
            display: inline-block;
            background: linear-gradient(180deg, #1e293b, #0f172a);
            color: #fff;
            padding: 0.6rem 1.2rem;
            border-radius: 8px;
            font-family: 'Courier New', Courier, monospace;
            font-size: 1.3rem;
            font-weight: bold;
            box-shadow: 0 6px 0 #020617, 0 8px 15px rgba(0,0,0,0.6);
            border: 1px solid #334155;
            margin: 0 5px;
            position: relative;
            top: 0;
            transition: all 0.1s ease;
            text-transform: uppercase;
        }
        
        .key:active, .key.pressed {
            top: 6px;
            box-shadow: 0 0px 0 #020617, 0 2px 5px rgba(0,0,0,0.6);
        }

        /* Interactive Demo Environment */
        .demo-container {
            position: relative;
            height: 350px;
            background: #0f172a;
            border-radius: 12px;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid var(--glass-border);
            margin-top: 1.5rem;
            box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
        }

        .gemini-sidebar {
            position: absolute;
            right: -320px;
            top: 0;
            width: 300px;
            height: 100%;
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(20px);
            border-left: 1px solid var(--accent-1);
            transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            padding: 1.5rem;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        }

        .gemini-sidebar.active {
            right: 0;
        }

        .btn {
            background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
            color: white;
            border: none;
            padding: 1rem 2rem;
            border-radius: 8px;
            font-size: 1.1rem;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
        }

        .btn:hover {
            transform: scale(1.05) translateY(-2px);
            box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
        }

        /* Accordion Structure */
        .accordion {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-color);
            cursor: pointer;
            padding: 1.2rem;
            width: 100%;
            text-align: left;
            border: 1px solid var(--glass-border);
            outline: none;
            transition: 0.3s;
            border-radius: 8px;
            margin-bottom: 0.5rem;
            font-size: 1.1rem;
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .accordion::after {
            content: '▼';
            font-size: 0.8rem;
            transition: transform 0.3s;
        }

        .accordion.active::after {
            transform: rotate(180deg);
        }

        .accordion:hover, .accordion.active {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--accent-1);
        }

        .panel {
            padding: 0 1.2rem;
            background: transparent;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
            color: #cbd5e1;
        }

        /* Gamified Quiz */
        .quiz-option {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            padding: 12px 20px;
            margin: 10px 0;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 1.1rem;
        }

        .quiz-option:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--accent-1);
            transform: translateX(5px);
        }
        
        .quiz-option.correct {
            background: rgba(16, 185, 129, 0.2);
            border-color: var(--accent-3);
            color: #fff;
        }

        .quiz-option.wrong {
            background: rgba(239, 68, 68, 0.2);
            border-color: #ef4444;
            color: #fff;
        }

        /* Tooltip Mechanics */
        .tooltip {
            position: relative;
            display: inline-block;
            border-bottom: 2px dotted var(--accent-2);
            cursor: help;
            color: #cbd5e1;
        }

        .tooltip .tooltiptext {
            visibility: hidden;
            width: 220px;
            background-color: #1e293b;
            color: #f8fafc;
            text-align: center;
            border-radius: 8px;
            padding: 8px 12px;
            position: absolute;
            z-index: 10;
            bottom: 150%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s, bottom 0.3s;
            font-size: 0.9rem;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            border: 1px solid var(--accent-2);
        }

        .tooltip .tooltiptext::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -8px;
            border-width: 8px;
            border-style: solid;
            border-color: #1e293b transparent transparent transparent;
        }

        .tooltip:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
            bottom: 125%;
        }

        /* Footer */
        footer {
            text-align: center;
            padding: 3rem;
            border-top: 1px solid var(--glass-border);
            margin-top: 4rem;
            color: #64748b;
            background: rgba(0,0,0,0.2);
        }
        
        .code-snippet {
            background: #1e293b;
            padding: 1rem;
            border-radius: 8px;
            font-family: monospace;
            color: #60a5fa;
            border: 1px solid #334155;
            display: inline-block;
            margin: 10px 0;
        }
    </style>
</head>
<body>

    <header>
        <h1>✨ Master the AI Shortcut! ✨</h1>
        <p style="font-size: 1.3rem; color: #94a3b8; margin-top: 1rem;">
            Summon your AI co-pilot with <span class="key">Alt</span> + <span class="key">G</span>
        </p>
    </header>

    <div class="container">

        <!-- What Is It? -->
        <section class="glass-panel" id="what">
            <h2>🤔 What Is It?</h2>
            <p>The command <strong><span class="code-snippet">alt + G --> Toggle Gemini sidebar extension</span></strong> is your magic wand for productivity. It is a keyboard shortcut that instantly slides the <span class="tooltip">Gemini extension panel<span class="tooltiptext">An AI assistant integrated directly into your web browser!</span></span> in or out of your screen, no matter what webpage you are browsing.</p>
        </section>

        <!-- Why Use It? -->
        <section class="glass-panel" id="why">
            <h2>💡 Why Use It?</h2>
            <ul style="font-size: 1.1rem; color: #cbd5e1; line-height: 1.8;">
                <li>🚀 <strong>Unbreakable Flow:</strong> No need to click away or open a new tab. Your AI is right there.</li>
                <li>🔄 <strong>Instant Toggle:</strong> Press it once to open, press it again to hide. Clean and simple!</li>
                <li>📝 <strong>Contextual Help:</strong> Since you stay on your current page, you can easily ask Gemini to summarize or analyze the exact article you are reading.</li>
            </ul>
        </section>

        <!-- How Does It Work? -->
        <section class="glass-panel" id="how">
            <h2>🛠️ How Does It Work?</h2>
            <p style="margin-bottom: 1.5rem; color: #cbd5e1;">Follow these steps to build muscle memory:</p>
            
            <button class="accordion">Step 1: The Anchor Finger</button>
            <div class="panel">
                <p>Find the <strong>Alt</strong> (Alternate) key. It's usually located right next to your Spacebar. Press and <em>hold</em> it down with your thumb.</p>
            </div>

            <button class="accordion">Step 2: The Trigger Finger</button>
            <div class="panel">
                <p>While continuing to hold down the <strong>Alt</strong> key, use your index finger to tap the <strong>G</strong> (for Gemini!) key just once.</p>
            </div>
            
            <button class="accordion">Step 3: Release and Magic</button>
            <div class="panel">
                <p>Release both keys. The Gemini sidebar will slide onto your screen. Repeat the same action to make it disappear!</p>
            </div>
        </section>

        <!-- Live Demo -->
        <section class="glass-panel" id="demo">
            <h2>🎮 Live Interactive Demo</h2>
            <p style="color: #cbd5e1;">Try it out! Physically press <kbd>Alt + G</kbd> on your keyboard right now, or click the button below to witness the toggle effect!</p>
            
            <div class="demo-container">
                <button class="btn" id="demoBtn">Simulate Alt + G</button>
                
                <div class="gemini-sidebar" id="sidebar">
                    <h3 style="margin-top: 0; color: var(--accent-1); display: flex; align-items: center; gap: 8px;">
                        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M12 2L14.4 9.6L22 12L14.4 14.4L12 22L9.6 14.4L2 12L9.6 9.6L12 2Z" fill="#3b82f6"/>
                        </svg>
                        Gemini
                    </h3>
                    <p style="font-size: 0.95rem; color: #cbd5e1; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem;">Hello! I'm ready to help you write, plan, learn, and more.</p>
                    
                    <div style="flex-grow: 1;">
                        <div style="width: 85%; height: 16px; background: rgba(255,255,255,0.05); border-radius: 4px; margin-top: 20px;"></div>
                        <div style="width: 60%; height: 16px; background: rgba(255,255,255,0.05); border-radius: 4px; margin-top: 12px;"></div>
                    </div>

                    <div style="width: 100%; height: 40px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; display: flex; align-items: center; padding: 0 15px; box-sizing: border-box; color: #64748b; font-size: 0.85rem;">
                        Ask me anything...
                    </div>
                </div>
            </div>
        </section>

        <!-- Code Breakdown -->
        <section class="glass-panel" id="code">
            <h2>🧩 Anatomy of the Shortcut</h2>
            <div style="display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin: 3rem 0;">
                <div style="text-align: center;">
                    <div class="key" id="keyAlt">Alt</div>
                    <p style="font-size: 0.9rem; color: #94a3b8; margin-top: 10px;">The Modifier</p>
                </div>
                <div style="font-size: 2rem; color: var(--accent-1); font-weight: bold;">+</div>
                <div style="text-align: center;">
                    <div class="key" id="keyG">G</div>
                    <p style="font-size: 0.9rem; color: #94a3b8; margin-top: 10px;">The Action (Gemini)</p>
                </div>
            </div>
        </section>

        <!-- Mistakes & Tips -->
        <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem;">
            <section class="glass-panel">
                <h2 style="color: #ef4444;">⚠️ Common Mistakes</h2>
                <ul style="color: #cbd5e1;">
                    <li style="margin-bottom: 10px;">Pressing <code>Ctrl</code> instead of <code>Alt</code> (a very common typo for Windows users).</li>
                    <li style="margin-bottom: 10px;">Pressing them one after the other. They must overlap! Hold Alt, <em>then</em> tap G.</li>
                    <li style="margin-bottom: 10px;">Not having the browser window actively selected (focused).</li>
                </ul>
            </section>

            <section class="glass-panel">
                <h2 style="color: var(--accent-3);">🌟 Pro Tips</h2>
                <ul style="color: #cbd5e1;">
                    <li style="margin-bottom: 10px;"><strong>The Word "Toggle":</strong> Toggle means it acts like a light switch. The same shortcut turns it ON and OFF.</li>
                    <li style="margin-bottom: 10px;">If <code>Alt + G</code> conflicts with another app on your computer, you can usually change extension shortcuts in your browser's settings page: <code>chrome://extensions/shortcuts</code></li>
                </ul>
            </section>
        </div>

        <!-- Practice Quiz -->
        <section class="glass-panel" id="quiz">
            <h2>🎯 Knowledge Check</h2>
            <p id="quiz-status" style="font-size: 1.2rem; font-weight: bold; margin-bottom: 1.5rem;">Let's see what you learned!</p>
            
            <div id="q1">
                <p style="font-size: 1.1rem;"><strong>Question: If the Gemini sidebar is currently OPEN on your screen, what happens if you press <kbd>Alt + G</kbd>?</strong></p>
                <div class="quiz-option" onclick="checkAnswer(this, false)">A) A new tab opens with Google Search</div>
                <div class="quiz-option" onclick="checkAnswer(this, true)">B) The sidebar will close/hide (toggle)</div>
                <div class="quiz-option" onclick="checkAnswer(this, false)">C) It takes a screenshot</div>
            </div>
        </section>

        <!-- Summary Card -->
        <section class="glass-panel" id="summary" style="background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1)); text-align: center; border-color: var(--accent-1);">
            <h2>📋 Quick Reference Card</h2>
            <div style="background: rgba(0,0,0,0.3); padding: 1.5rem; border-radius: 12px; display: inline-block; text-align: left; margin: 1rem 0;">
                <p style="font-size: 1.2rem; margin-top: 0;"><strong>Action:</strong> Open / Close Gemini AI Sidebar</p>
                <p style="font-size: 1.2rem; margin-bottom: 0;"><strong>Command:</strong> <span class="key" style="font-size: 1rem;">Alt</span> + <span class="key" style="font-size: 1rem;">G</span></p>
            </div>
            <br>
            <button class="btn" style="margin-top: 1rem; background: transparent; border: 2px solid var(--accent-1); color: var(--text-color);" onclick="copyShortcut()">📋 Copy Code to Clipboard</button>
        </section>

    </div>

    <footer>
        <p>Built for the Web | Generated by AI Prompt Dictionary</p>
    </footer>

    <script>
        // Accordion functionality
        const accordions = document.getElementsByClassName("accordion");
        for (let i = 0; i < accordions.length; i++) {
            accordions[i].addEventListener("click", function() {
                this.classList.toggle("active");
                const panel = this.nextElementSibling;
                if (panel.style.maxHeight) {
                    panel.style.maxHeight = null;
                } else {
                    panel.style.maxHeight = panel.scrollHeight + "px";
                }
            });
        }

        // Demo interactive logic
        const sidebar = document.getElementById('sidebar');
        const demoBtn = document.getElementById('demoBtn');
        const keyAlt = document.getElementById('keyAlt');
        const keyG = document.getElementById('keyG');

        function toggleSidebar() {
            sidebar.classList.toggle('active');
            if(sidebar.classList.contains('active')) {
                demoBtn.innerText = "Close Sidebar (Alt + G)";
                demoBtn.style.background = "linear-gradient(45deg, #ef4444, #b91c1c)";
            } else {
                demoBtn.innerText = "Simulate Alt + G";
                demoBtn.style.background = "linear-gradient(45deg, var(--accent-1), var(--accent-2))";
            }
        }

        demoBtn.addEventListener('click', toggleSidebar);

        // Global Keyboard Event Listener
        document.addEventListener('keydown', function(event) {
            // Visual key pressing logic
            if (event.key === 'Alt') {
                keyAlt.classList.add('pressed');
            }
            if (event.key.toLowerCase() === 'g') {
                keyG.classList.add('pressed');
            }
            
            // Trigger logic for demo
            if (event.altKey && event.key.toLowerCase() === 'g') {
                event.preventDefault(); // Stop default browser alt+g if any
                toggleSidebar();
            }
        });

        document.addEventListener('keyup', function(event) {
            if (event.key === 'Alt') {
                keyAlt.classList.remove('pressed');
            }
            if (event.key.toLowerCase() === 'g') {
                keyG.classList.remove('pressed');
            }
        });

        // Quiz Logic
        function checkAnswer(element, isCorrect) {
            const options = element.parentElement.querySelectorAll('.quiz-option');
            
            // Reset state
            options.forEach(opt => {
                opt.style.pointerEvents = 'none'; 
                opt.classList.remove('correct', 'wrong');
            });

            if (isCorrect) {
                element.classList.add('correct');
                const status = document.getElementById('quiz-status');
                status.innerHTML = "🎉 Brilliant! You nailed it! 🎉";
                status.style.color = "var(--accent-3)";
                triggerConfetti();
            } else {
                element.classList.add('wrong');
                const status = document.getElementById('quiz-status');
                status.innerHTML = "Not quite! Remember, 'toggle' means it switches between states.";
                status.style.color = "#ef4444";
                
                // Allow retry after 2 seconds
                setTimeout(() => {
                    options.forEach(opt => opt.style.pointerEvents = 'auto');
                    element.classList.remove('wrong');
                    status.innerHTML = "Give it another try!";
                    status.style.color = "var(--text-color)";
                }, 2500);
            }
        }

        // Clipboard Copy Logic
        function copyShortcut() {
            const textToCopy = "alt + G -->Toggle Gemini sidebar extension.";
            navigator.clipboard.writeText(textToCopy).then(() => {
                alert("Shortcut copied to clipboard! 📋");
            }).catch(err => {
                console.error('Failed to copy: ', err);
            });
        }

        // Lightweight Vanilla JS Confetti System
        function triggerConfetti() {
            const colors = ['#3b82f6', '#8b5cf6', '#10b981', '#fcd34d', '#ec4899'];
            for(let i = 0; i < 40; i++) {
                let confetti = document.createElement('div');
                confetti.style.position = 'fixed';
                confetti.style.left = (Math.random() * 100) + 'vw';
                confetti.style.top = '-20px';
                confetti.style.width = (Math.random() * 10 + 5) + 'px';
                confetti.style.height = (Math.random() * 10 + 5) + 'px';
                confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
                confetti.style.borderRadius = Math.random() > 0.5 ? '50%' : '2px';
                confetti.style.zIndex = '9999';
                confetti.style.pointerEvents = 'none';
                document.body.appendChild(confetti);

                let duration = Math.random() * 2 + 2;
                confetti.animate([
                    { transform: 'translate3d(0,0,0) rotateX(0) rotateY(0)' },
                    { transform: `translate3d(${Math.random() * 200 - 100}px, 100vh, 0) rotateX(${Math.random() * 720}deg) rotateY(${Math.random() * 720}deg)` }
                ], {
                    duration: duration * 1000,
                    easing: 'cubic-bezier(.37,0,.63,1)'
                });

                // Cleanup DOM
                setTimeout(() => confetti.remove(), duration * 1000);
            }
        }
    </script>
</body>
</html>
Live Preview