Grok Chat Navigation Improvements

Keyboard navigation and message interaction for Grok chat

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

Autor
na na
Instalaciones diarias
0
Instalaciones totales
13
Calificaciones
0 0 0
Versión
1.3
Creado
25/4/2025
Actualizado
5/8/2025
Tamaño
21 KB
Licencia
MIT
Funciona en

Grok Chat Navigation Improvements

This userscript enhances the accessibility and usability of the Grok chat interface by adding keyboard navigation and interaction capabilities. It allows users to easily select, edit, copy, and regenerate chat messages using intuitive keyboard shortcuts, making the chat more accessible and efficient.

Features

  • Keyboard Navigation:

    • Navigate through chat messages using j (down), k (up), Home, and End keys. Ctrl+I to focus the main chat input field.
  • Message Interaction:

    • Edit (e), copy (c), or regenerate (r) selected messages with keyboard shortcuts.
    • Enhanced cursor control in editing mode with Ctrl+Home and Ctrl+End.
    • Quickly go to the last or the first chat message by quickly double tapping End and/or Home, respectively.
  • Escape Key Functionality:

    • Press Escape to deselect messages, defocus input, cancel editing, or toggle the aside panel for messages with code.
  • Mouse Interaction:

    • Click a message to select it; click outside to deselect.
  • Scroll Handling:

    • Automatically adjusts selection and scrolls to keep the selected message in view.

Installation

  1. Install a userscript manager like Tampermonkey for Chrome or Firefox.
  2. Click the Tampermonkey icon in your browser and select "Create a new script."
  3. Copy and paste the entire script code into the editor.
  4. Save the script with "File" > "Save" or Ctrl+S.
  5. The script will activate on the Grok chat page (https://grok.com/*).

Usage

Navigation

  • j or ArrowDown: Select the next message.
  • k or ArrowUp: Select the previous message.
  • Home: Jump to the first message.
  • End: Jump to the last message (scrolls to bottom with offset).

Interaction

  • With a message selected:
    • e: Edit the message.
    • c: Copy the message.
    • r: Regenerate the message.
  • While editing:
    • Ctrl+Home: Move cursor to start.
    • Ctrl+End: Move cursor to end.
    • Escape: Cancel editing.

Deselection and Panel Control

  • Escape: Deselect the current message, cancel editing, or toggle the aside panel.

Mouse Interaction

  • Click a message to select it.
  • Click outside messages to deselect.

Compatibility

  • Works on the Grok chat interface at https://grok.com/*.
  • Tested with Tampermonkey on Chrome and Firefox.

License

Released under the MIT License. See script header for details.

Author

Changelog

  • Version 1.3: 2025-08-05

    • Fixed: inability to type 'j', 'k', 'Home', and 'End' in the main chat input box.
  • Version 1.2:

    • Added: Ctrl+I hotkey to focus the main chat input box.
    • Improved: Escape key now defocuses and restores previous message selection.
    • Added: Double-tap Home/End (within 800 ms) jumps to the first/last message and scrolls it into view.
    • Improved: Button selection for Edit/Cancel/Copy/Regenerate is language-agnostic, using visible button order and SVG icon detection.
  • Version 1.0:

    • Initial release with keyboard navigation and interaction features.