Stufin
Home Quick Cart Profile

Raspberry Pi Official Keyboard (White-Red)

Buy Now on Stufin

Compact Design

The keyboard is designed to be compact and lightweight, making it easy to integrate into a variety of projects and applications.

Ergonomic Layout

The keyboard features an ergonomic layout that is designed to reduce fatigue and discomfort, allowing users to type for extended periods with ease.

High-Quality KeysThe keyboard features high-quality, tactile keys that provide a crisp and responsive feedback, making typing a joy.

LED Indicators

The keyboard features LED indicators for Caps Lock, Num Lock, and Scroll Lock, making it easy to monitor the status of these functions.

Hot-Swappable KeysThe keyboard features hot-swappable keys, allowing users to easily replace or customize individual keys as needed.

Raspberry Pi Compatibility

The keyboard is specifically designed for use with the Raspberry Pi and is fully compatible with all Raspberry Pi models.

USB Connection

The keyboard connects to the Raspberry Pi via a standard USB connection, making it easy to integrate into a variety of projects.

Durable Construction

The keyboard is built to last, with a durable construction that can withstand heavy use and harsh environments.

Technical Specifications

Dimensions

284 x 95 x 30mm (11.2 x 3.7 x 1.2 inches)

Weight

250g (8.8 oz)

Interface

USB 2.0

Power Consumption

250mA

Operating System

Raspberry Pi OS, Windows, macOS, Linux

Language Support

QWERTY layout, with options for AZERTY, QWERTZ, and other layouts

Conclusion

The Raspberry Pi Official Keyboard (White-Red) is a high-quality, compact, and versatile keyboard designed specifically for use with the Raspberry Pi. With its ergonomic layout, high-quality keys, and durable construction, it is perfect for a wide range of applications, from general computing and browsing to industrial and commercial uses.

Pin Configuration

  • Raspberry Pi Official Keyboard (White-Red) Pinout Guide
  • The Raspberry Pi Official Keyboard (White-Red) is a compact keyboard designed specifically for the Raspberry Pi single-board computers. It features a 79-key layout and is compatible with the Raspberry Pi 400, Raspberry Pi 4, and other Raspberry Pi models. Here's a detailed guide to the pins on the keyboard connector:
  • Keyboard Connector Pinout:
  • The Raspberry Pi Official Keyboard (White-Red) has a 10-pin connector, with the following pinout:
  • 1. Pin 1: VCC (5V) - Power supply for the keyboard, connected to the 5V pin on the Raspberry Pi.
  • 2. Pin 2: GND (Ground) - Ground connection for the keyboard, connected to the GND pin on the Raspberry Pi.
  • 3. Pin 3: DATA (UART TXD) - Data transmission line for keyboard input, connected to the UART TXD pin on the Raspberry Pi (typically GPIO 14).
  • 4. Pin 4: CLOCK (UART RXD) - Clock signal for keyboard input, connected to the UART RXD pin on the Raspberry Pi (typically GPIO 15).
  • 5. Pin 5: NC (Not Connected) - Not connected to any signal, reserved for future use.
  • 6. Pin 6: NC (Not Connected) - Not connected to any signal, reserved for future use.
  • 7. Pin 7: LED_KBD1 (Keyboard LED 1) -Connected to the keyboard's LED indicator 1 ( typically the num lock LED).
  • 8. Pin 8: LED_KBD2 (Keyboard LED 2) - Connected to the keyboard's LED indicator 2 (typically the caps lock LED).
  • 9. Pin 9: LED_KBD3 (Keyboard LED 3) - Connected to the keyboard's LED indicator 3 (typically the scroll lock LED).
  • 10. Pin 10: GND (Ground) - Additional ground connection for the keyboard, connected to the GND pin on the Raspberry Pi.
  • Connection Structure:
  • To connect the Raspberry Pi Official Keyboard (White-Red) to your Raspberry Pi, follow these steps:
  • Step 1: Connect the power supply
  • Connect Pin 1 (VCC) to the 5V pin on the Raspberry Pi.
  • Connect Pin 2 (GND) to the GND pin on the Raspberry Pi.
  • Connect Pin 10 (GND) to the GND pin on the Raspberry Pi (optional, but recommended for added stability).
  • Step 2: Connect the data transmission lines
  • Connect Pin 3 (DATA) to the UART TXD pin on the Raspberry Pi (typically GPIO 14).
  • Connect Pin 4 (CLOCK) to the UART RXD pin on the Raspberry Pi (typically GPIO 15).
  • Step 3: Connect the LED indicators (optional)
  • If you want to use the keyboard's LED indicators, connect Pin 7 (LED_KBD1) to a GPIO pin on the Raspberry Pi (e.g., GPIO 17).
  • If you want to use the keyboard's LED indicators, connect Pin 8 (LED_KBD2) to a GPIO pin on the Raspberry Pi (e.g., GPIO 23).
  • If you want to use the keyboard's LED indicators, connect Pin 9 (LED_KBD3) to a GPIO pin on the Raspberry Pi (e.g., GPIO 24).
  • Note: Make sure to use the correct GPIO pins on your Raspberry Pi, as they may vary depending on the model and configuration. Consult the official Raspberry Pi documentation for more information.
  • By following this guide, you should be able to connect the Raspberry Pi Official Keyboard (White-Red) to your Raspberry Pi and start using it for your projects.

Code Examples

Raspberry Pi Official Keyboard (White-Red) Documentation
The Raspberry Pi Official Keyboard (White-Red) is a compact, wired keyboard designed specifically for the Raspberry Pi single-board computer. This keyboard is a great addition to any Raspberry Pi project, providing a convenient and intuitive way to interact with your device.
Getting Started
To get started with the Raspberry Pi Official Keyboard (White-Red), simply connect it to your Raspberry Pi using the provided USB cable. No additional setup or installation is required.
Code Examples
Here are a few code examples that demonstrate how to use the Raspberry Pi Official Keyboard (White-Red) in various contexts:
### Example 1: Reading Keyboard Input using Python
This example shows how to use the `pynput` library to read keyboard input from the Raspberry Pi Official Keyboard (White-Red) using Python.
```python
from pynput import keyboard
def on_press(key):
    try:
        print('alphanumeric key {0} pressed'.format(key.char))
    except AttributeError:
        print('special key {0} pressed'.format(key))
def on_release(key):
    print('{0} released'.format(key))
    if key == keyboard.Key.esc:
        # Stop listener
        return False
# Collect events until released
with keyboard.Listener(
        on_press=on_press,
        on_release=on_release) as listener:
    listener.join()
```
This code creates a keyboard listener that prints a message to the console whenever a key is pressed or released. You can modify the `on_press` and `on_release` functions to perform custom actions based on the keyboard input.
### Example 2: Using the Keyboard with a GUI Application (TKinter)
This example demonstrates how to use the Raspberry Pi Official Keyboard (White-Red) with a GUI application built using Python's Tkinter library.
```python
import tkinter as tk
root = tk.Tk()
root.title("Raspberry Pi Keyboard Example")
def key_press(event):
    print(f"Key pressed: {event.keysym}")
root.bind("<Key>", key_press)
label = tk.Label(root, text="Press a key to see the output!")
label.pack()
root.mainloop()
```
In this example, we create a simple GUI application with a label and bind the `key_press` function to the `<Key>` event. Whenever a key is pressed, the `key_press` function is called, and it prints a message to the console indicating which key was pressed.
### Example 3: Using the Keyboard with a Command-Line Interface (CLI)
This example shows how to use the Raspberry Pi Official Keyboard (White-Red) to create a simple command-line interface (CLI) using Python's built-in `input` function.
```python
while True:
    command = input(" Enter a command: ")
    if command == "hello":
        print("Hello, world!")
    elif command == "quit":
        break
    else:
        print("Unknown command. Try again!")
```
In this example, we create a simple CLI that prompts the user to enter a command. The user's input is stored in the `command` variable, and we perform different actions based on the input. You can modify the CLI to perform custom actions based on the user's input.
I hope these examples help you get started with using the Raspberry Pi Official Keyboard (White-Red) in your IoT projects!