Skip to main content

Keyboard Controls

Hyperscape supports keyboard shortcuts for common actions and debug tools.

Debug Controls

KeyActionDescription
F5Toggle FPS PanelShow/hide performance debug panel with FPS, frame time, memory usage
The F5 keybind was added in PR #505 to provide quick access to performance monitoring without opening DevTools.

Movement Controls

KeyActionDescription
ClickMoveClick terrain to walk to location
Shift + ClickRunHold shift while clicking to run (consumes stamina)
WASDCamera PanPan camera view (if enabled)

Combat Controls

KeyActionDescription
Click EnemyAttackInitiate combat with target
EscStop CombatCancel auto-attack

Inventory Controls

KeyActionDescription
Left-Click ItemPrimary ActionPerform default action (Eat, Wield, Use, etc.)
Right-Click ItemContext MenuShow all available actions
Drag ItemMove/EquipDrag to move or equip items

UI Controls

KeyActionDescription
TabToggle ChatFocus/unfocus chat input
EnterSend ChatSend chat message
EscClose PanelClose active UI panel
IToggle InventoryShow/hide inventory panel
EToggle EquipmentShow/hide equipment panel
BToggle BankShow/hide bank panel (when near bank)

Debug Panel (F5)

When the FPS debug panel is visible, it shows:
  • FPS - Frames per second (target: 60)
  • Frame Time - Milliseconds per frame (target: <16.67ms)
  • Memory - Heap size and allocation rate
  • Entities - Active entity count
  • Network - Ping, packet loss, bandwidth

Performance Targets

MetricGoodWarningCritical
FPS60+45-59<45
Frame Time<16.67ms16.67-22ms>22ms
Memory<500MB500-800MB>800MB
Entities<10001000-2000>2000
Ping<50ms50-100ms>100ms

Customization

Keybinds are defined in ClientInput.ts:
// From packages/shared/src/systems/client/ClientInput.ts
private handleKeyDown(event: KeyboardEvent): void {
  // F5 - Toggle debug panel
  if (event.key === "F5") {
    event.preventDefault();
    const debugPanel = document.getElementById("fps-debug-panel");
    if (debugPanel) {
      debugPanel.style.display = 
        debugPanel.style.display === "none" ? "block" : "none";
    }
  }
  
  // Add more keybinds here
}
To add custom keybinds, edit ClientInput.ts and add cases to handleKeyDown().