Stufin
Home Quick Cart Profile

Raspberry Pi Official Keyboard and Mouse Kit

Buy Now on Stufin

Compact Design

The keyboard and mouse are designed to be compact and lightweight, making them ideal for use in a wide range of applications, from DIY projects to industrial installations.

Raspberry Pi Optimized

The keyboard and mouse are specifically designed for use with Raspberry Pi boards, ensuring optimal compatibility and performance.

Plug-and-PlayNo additional setup or configuration is required; simply plug in the keyboard and mouse and start working.
79-Key Keyboard LayoutThe keyboard features a standard 79-key layout, including all the essential keys, function keys, and a cursor pad.
Three-Button Optical MouseThe mouse features a precise optical sensor and three buttons, providing precise control and navigation.

USB Connectivity

Both the keyboard and mouse connect to your Raspberry Pi using standard USB cables, ensuring reliable and fast data transfer.

Raspberry Pi Official Product

The Raspberry Pi Official Keyboard and Mouse Kit is a genuine Raspberry Pi product, ensuring compatibility, quality, and reliability.

Technical Specifications

Keyboard Dimensions

280 x 100 x 20 mm (11.0 x 3.9 x 0.8 in)

Mouse Dimensions

60 x 100 x 30 mm (2.4 x 3.9 x 1.2 in)

Keyboard Weight

250 g (8.8 oz)

Mouse Weight

60 g (2.1 oz)

Cable Length

1.5 m (4.9 ft)

Interface

USB

Compatibility

Raspberry Pi 2, 3, 4, and 400

Applications

The Raspberry Pi Official Keyboard and Mouse Kit is suitable for a wide range of applications, including

DIY projects and prototypes

Robotics and automation

Home automation and IoT projects

Industrial control and monitoring systems

Educational and research projects

Retro game consoles and emulation systems

Conclusion

The Raspberry Pi Official Keyboard and Mouse Kit is a reliable, efficient, and intuitive input device solution for Raspberry Pi single-board computers. With its compact design, plug-and-play functionality, and optimized performance, this kit is an ideal accessory for a wide range of projects and applications.

Pin Configuration

  • Raspberry Pi Official Keyboard and Mouse Kit Pinout
  • The Raspberry Pi Official Keyboard and Mouse Kit is a convenient accessory for Raspberry Pi boards, providing a compact keyboard and mouse combo that connects directly to the Raspberry Pi. The kit uses a single USB cable to connect to the Raspberry Pi, making it easy to set up and use. Here's a detailed explanation of the pinout for the keyboard and mouse:
  • USB Connection
  • The keyboard and mouse kit connects to the Raspberry Pi via a single USB-A male connector. The USB interface is a standard USB 2.0 interface, which is compatible with Raspberry Pi boards.
  • Keyboard Pinout
  • The keyboard portion of the kit uses a standard USB keyboard protocol to communicate with the Raspberry Pi. The keyboard pinout is as follows:
  • VCC (Pin 1): +5V power supply from the Raspberry Pi
  • D- (Pin 2): USB data negative signal
  • D+ (Pin 3): USB data positive signal
  • GND (Pin 4): Ground
  • ID (Pin 5): Not connected ( reserved for future use)
  • Mouse Pinout
  • The mouse portion of the kit uses a standard USB mouse protocol to communicate with the Raspberry Pi. The mouse pinout is as follows:
  • VCC (Pin 1): +5V power supply from the Raspberry Pi
  • D- (Pin 2): USB data negative signal
  • D+ (Pin 3): USB data positive signal
  • GND (Pin 4): Ground
  • ID (Pin 5): Not connected (reserved for future use)
  • Connection Structure
  • To connect the Raspberry Pi Official Keyboard and Mouse Kit to your Raspberry Pi, follow these steps:
  • 1. Connect the USB-A male connector to a free USB port on your Raspberry Pi.
  • 2. Ensure the keyboard and mouse are properly seated in their respective connectors on the kit.
  • 3. Power on your Raspberry Pi and the keyboard and mouse will be automatically detected by the operating system.
  • Important Notes
  • The Raspberry Pi Official Keyboard and Mouse Kit is designed to work with Raspberry Pi boards, but it may also be compatible with other devices that support USB keyboards and mice.
  • The kit does not require any additional drivers or software to function, as it uses standard USB protocols.
  • The keyboard and mouse kit can be used simultaneously, allowing you to interact with your Raspberry Pi using both input devices.

Code Examples

Raspberry Pi Official Keyboard and Mouse Kit Documentation
Overview
The Raspberry Pi Official Keyboard and Mouse Kit is a compact and ergonomic keyboard and mouse combo designed specifically for use with Raspberry Pi single-board computers. This kit provides a convenient and cost-effective solution for users who want a reliable and efficient way to interact with their Raspberry Pi projects.
Technical Specifications
Keyboard:
	+ Layout: QWERTY
	+ Keys: 78
	+ Interface: USB
	+ Dimensions: 284 x 93 x 23mm
 Mouse:
	+ Interface: USB
	+ Sensor: Optical
	+ Resolution: 1000 dpi
	+ Dimensions: 100 x 60 x 35mm
Using the Raspberry Pi Official Keyboard and Mouse Kit
The Raspberry Pi Official Keyboard and Mouse Kit can be used with any Raspberry Pi model that has a USB port. Here are some code examples that demonstrate how to use this component in various contexts:
Example 1: Using the Keyboard to Input Data in Python
In this example, we will use the Raspberry Pi Official Keyboard to input data in a Python script.
```python
# Import the necessary module
import keyboard
# Define a function to read input from the keyboard
def read_input():
    print("Enter your name: ")
    name = input()
    print("Hello, " + name + "!")
# Call the function
read_input()
```
In this example, we use the `keyboard` module to read input from the user through the Raspberry Pi Official Keyboard. When the user presses Enter, the input is stored in the `name` variable and printed to the console.
Example 2: Using the Mouse to Control a GUI Application
In this example, we will use the Raspberry Pi Official Mouse to control a simple GUI application built using the Pygame library.
```python
# Import the necessary modules
import pygame
import sys
# Initialize Pygame
pygame.init()
# Set up the display
screen = pygame.display.set_mode((640, 480))
# Set up the mouse
pygame.mouse.set_visible(True)
# Define a function to handle mouse events
def handle_mouse_events():
    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                sys.exit()
            elif event.type == pygame.MOUSEMOTION:
                print("Mouse moved to: " + str(event.pos))
            elif event.type == pygame.MOUSEBUTTONDOWN:
                print("Mouse button pressed at: " + str(event.pos))
            elif event.type == pygame.MOUSEBUTTONUP:
                print("Mouse button released at: " + str(event.pos))
# Call the function
handle_mouse_events()
```
In this example, we use the Pygame library to create a GUI application that responds to mouse events. When the user moves the mouse, presses a mouse button, or releases a mouse button, the corresponding event is handled by the `handle_mouse_events` function.
Example 3: Using the Keyboard and Mouse Together in a Game
In this example, we will use both the Raspberry Pi Official Keyboard and Mouse to control a simple game built using the Pygame library.
```python
# Import the necessary modules
import pygame
import sys
# Initialize Pygame
pygame.init()
# Set up the display
screen = pygame.display.set_mode((640, 480))
# Set up the keyboard and mouse
pygame.key.set_repeat(10, 10)
pygame.mouse.set_visible(True)
# Define a function to handle keyboard and mouse events
def handle_events():
    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                sys.exit()
            elif event.type == pygame.KEYDOWN:
                if event.key == pygame.K_UP:
                    print("Up arrow pressed")
                elif event.key == pygame.K_DOWN:
                    print("Down arrow pressed")
            elif event.type == pygame.MOUSEMOTION:
                print("Mouse moved to: " + str(event.pos))
            elif event.type == pygame.MOUSEBUTTONDOWN:
                print("Mouse button pressed at: " + str(event.pos))
# Call the function
handle_events()
```
In this example, we use both the keyboard and mouse to control a simple game. When the user presses the up or down arrow keys, a message is printed to the console. When the user moves the mouse or presses a mouse button, a message is also printed to the console.
These examples demonstrate the versatility and ease of use of the Raspberry Pi Official Keyboard and Mouse Kit in various contexts.