Show HN: Play snake on your razer keybard on Linux

1 month ago 2

A Python implementation of the classic Snake game that runs directly on your Razer keyboard's RGB lighting.

game gif

The snake appears as green lights moving across your keyboard, while the fruit glows red. Each time you eat fruit, your snake grows longer

  • Hardware: Razer keyboard with RGB lighting (tested on Razer Ornata Chroma)
  • OS: Linux (required for OpenRazer drivers)
  • Python: 3.6 or higher
  • Dependencies:

1. Install OpenRazer Drivers

Follow the official OpenRazer installation guide for your Linux distribution.

git clone https://github.com/yourusername/razer-keyboard-snake.git cd razer-keyboard-snake

4. Add User to plugdev Group

sudo gpasswd -a $USER plugdev

Note: You'll need to log out and back in for group changes to take effect.

Run the game with:

  • Arrow Keys: Move the snake (↑ ↓ ← →)
  • Delete Key: Quit the game

Tested on:

  • ✅ Razer Ornata Chroma

Should work on any Razer keyboard with:

  • RGB matrix support
  • OpenRazer driver compatibility

Check OpenRazer device support list

  • Ensure OpenRazer daemon is running: systemctl --user status openrazer-daemon
  • Check that your user is in the plugdev group: groups $USER
  • Verify your keyboard is detected: razer-cli -ls
  • Try restarting the OpenRazer daemon: systemctl --user restart openrazer-daemon
  • Reconnect your keyboard
  • Make sure you've logged out and back in after adding yourself to plugdev group

Built with OpenRazer - an open-source driver suite for Razer devices.

This project is not affiliated with or endorsed by Razer Inc. Use at your own risk.

Read Entire Article