Skip to main content

Keyboard and mouse controls

Minecraft Consoles includes full keyboard and mouse support for PC gameplay. This page covers all available controls.
The game uses raw mouse input for smooth camera movement and accumulates input across frames for consistent gameplay at any frame rate.

Movement controls

Basic movement and navigation:
ActionKeyNotes
Move forwardW
Move leftA
Move backwardS
Move rightD
Jump / Fly upSpaceHold to fly up in creative mode
Sneak / Fly downShiftHold to sneak or fly down
SprintCtrl (Hold) or Double-tap WIncreases movement speed
You can sprint by either holding Ctrl while moving or by double-tapping W.

Mouse controls

Camera and interaction controls:
ActionControlNotes
Look aroundMove mouseRaw mouse input for smooth camera movement
Attack / Destroy blockLeft ClickHold to break blocks
Use / Place blockRight ClickPlace blocks or use items
Select itemMouse Wheel or 1-9Scroll to cycle through hotbar
Mouse capture is enabled during gameplay. Press Left Alt to toggle mouse capture for debugging purposes.

Inventory and items

Managing your inventory and items:
ActionKey
Open inventoryE
Drop itemQ
Open craftingC
Select hotbar slot1 through 9
Scroll hotbarMouse Wheel

Game controls

General game functions:
ActionKeyNotes
Pause menuEscOpens the main pause menu
Toggle fullscreenF11Switch between windowed and fullscreen
Toggle HUDF1Hide or show the heads-up display
Toggle debug infoF3Show debug information overlay
Open debug overlayF4Advanced debug information
Toggle viewF5Switch between first-person and third-person
Game infoTabShows player list and host options
Debug overlays (F3, F4) display technical information useful for developers and troubleshooting.

Tutorial and UI controls

Navigating menus and tutorials:
ActionKeyNotes
Accept tutorial hintEnterConfirm tutorial hints
Decline tutorial hintBDismiss tutorial hints
Toggle mouse captureLeft AltFor debugging - releases/captures mouse
The Tutorial World will show hints as you play. Press Enter to accept them or B to skip.

Input system architecture

The keyboard and mouse input system is implemented in the Windows64 platform layer:

Key input handling

The KeyboardMouseInput class (Windows64/KeyboardMouseInput.cpp:15) handles all keyboard input:
  • Key state tracking - Maintains current and previous frame state for 256 virtual keys
  • Edge detection - Detects key press and release events per frame
  • Accumulation - Accumulates key presses across frames for game-tick rate processing
// Key state queries
bool IsKeyDown(int vk) const;      // Current frame state
bool IsKeyPressed(int vk) const;   // Rising edge detection
bool IsKeyReleased(int vk) const;  // Falling edge detection

// Game-tick accumulation
bool ConsumeKeyPress(int vk);      // Consume accumulated press

Mouse input handling

Mouse input uses Windows raw input API for precise movement:
  • Raw input - Registers for HID_USAGE_GENERIC_MOUSE to get unaccelerated mouse movement
  • Delta accumulation - Accumulates mouse movement deltas across frames
  • Mouse capture - Clips cursor to window and hides it during gameplay
// Mouse delta consumption
void ConsumeMouseDelta(float &dx, float &dy);

// Mouse wheel handling
int ConsumeScrollDelta();

// Mouse capture control
void SetCapture(bool capture);
The system uses double-buffered state for edge detection and accumulates input for game-tick processing at 20Hz, ensuring smooth input handling regardless of frame rate.

Frame timing

The input system is designed for high frame rate gameplay:
  • Per-frame state - Updated every frame for UI and immediate feedback
  • Game-tick accumulation - Accumulated input is consumed at the game’s 20Hz tick rate
  • High-resolution timer - Windows high-resolution timer provides smooth timing at high FPS

Performance features

The input system includes several performance enhancements:
  • V-Sync disabled - Better performance and lower input latency
  • High-resolution timer - Smoother gameplay timing at high frame rates
  • Raw mouse input - Direct mouse input without Windows acceleration
  • Efficient state management - Double-buffered state for minimal overhead
For the best experience, disable V-Sync in your graphics driver settings and let the game run at your monitor’s maximum refresh rate.

Troubleshooting

Common input issues and solutions:

Mouse not captured

If the mouse isn’t captured during gameplay:
  1. Make sure you’re in-game (not in a menu)
  2. Press Left Alt to toggle mouse capture
  3. The cursor should disappear and be clipped to the window

Keys not responding

If keyboard input isn’t working:
  1. Make sure the game window has focus
  2. Check if you’re in a text input field
  3. Try clicking the game window to regain focus

Mouse movement feels wrong

If mouse sensitivity or acceleration feels off:
  • The game uses raw input, bypassing Windows mouse acceleration
  • Adjust sensitivity in the game options menu
  • Check that your mouse driver isn’t interfering with raw input
Some gaming mice with custom drivers may interfere with raw input. Try disabling mouse acceleration in your driver software.

Technical details

For developers interested in the implementation:

Raw input registration

The game registers for raw mouse input during initialization (Windows64/KeyboardMouseInput.cpp:36):
RAWINPUTDEVICE rid;
rid.usUsagePage = HID_USAGE_PAGE_GENERIC;
rid.usUsage = HID_USAGE_GENERIC_MOUSE;
rid.dwFlags = 0;
rid.hwndTarget = hWnd;
RegisterRawInputDevices(&rid, 1, sizeof(rid));

WndProc integration

Input events are processed through the Windows message pump:
  • WM_KEYDOWN / WM_KEYUP - Keyboard events
  • WM_INPUT - Raw mouse movement
  • WM_LBUTTONDOWN / WM_RBUTTONDOWN - Mouse buttons
  • WM_MOUSEWHEEL - Scroll wheel

State management

The system maintains multiple state buffers:
// Per-frame double-buffered state
bool m_keyState[256];
bool m_keyStatePrev[256];
bool m_mouseButtons[3];
bool m_mouseButtonsPrev[3];

// Sticky press accumulators
bool m_keyPressedAccum[256];
bool m_mousePressedAccum[3];

// Mouse delta accumulators
float m_mouseDeltaXAccum;
float m_mouseDeltaYAccum;
The accumulator pattern ensures that fast key presses aren’t missed when the game tick rate (20Hz) is lower than the frame rate.

Quick start

Get up and running quickly

Building from source

Compile the game yourself

Build docs developers (and LLMs) love