Cool Ideas: DIY Mechanical Keyboard Lighting Effects

May 17, 2024

You admire those mechanical keyboards with radiant, rhythmic lighting. You saw them as displays in the store. You saw several cool ones during an eSports tournament. 

The good thing is that you can recreate such effects on your own device. It's not difficult; the keyboard's software and firmware allow you to create beautiful ripples, waves, and other dazzling effects all made of light. You can synchronize them to your game. Or you can light up certain key groups so it would be easier to identify keys when you work. 

If you want a more challenging and satisfying project, you can work on the actual physical components---LEDs, microcontrollers, resistors, and more. 

Let's discuss how you can personalize your keyboard's RGB backlighting to your liking. Let's talk about how you can make the vibrant lighting designs you admire a reality.

How LEDs Works

Before you start modding your keyboard's backlighting, it's important to understand how a light-emitting diode (LED) works. Simply put, an LED is a miniature light bulb that contains a semiconductor diode. It generates light when an electric current passes through the diode.

  1. Basic Principle: An LED emits light through a process called electroluminescence. It has two layers: the P-type (positive) and N-type (negative) semiconductors.
  2. Current Flow: When a voltage is applied, electrons from the N-type layer flow across the P-N junction to combine with holes (positively charged "missing" electrons) in the P-type layer. This combination releases energy in the form of photons, or particles of light. This is the light that we can see. 
  3. Light Color: The color of the light depends on the semiconductor material used:
    • Gallium Phosphide: Green or yellow
    • Gallium Arsenide: Infrared or red
    • Indium Gallium Nitride: Blue or ultraviolet

And that's basically how LEDs work. Simple, isn't it? All other LED backlighting features and effects revolve around this basic principle. 

How LED Backlighting Works in Mechanical Keyboards

LED backlighting in mechanical keyboards operates through a carefully coordinated system of LEDs, switches, and control electronics. Let's check out how everything works:

  1. LED Placement: Surface-mounted LEDs are positioned directly on the PCB under each key switch or within a key switch's housing. Some keyboards have LEDs at the edges of the keyboard for under-glow or accent lighting.
  2. Circuit Board (PCB): The PCB is designed with a circuit to control and power each LED. Copper traces connect the LEDs to the power supply and microcontroller or driver.
  3. Key Switch Housing: Modern switches often have transparent or translucent housings that diffuse light evenly through the keycap. Some mechanical switches (e.g., Cherry MX RGB) have built-in LED slots, allowing for seamless integration.
  4. Keycaps: Translucent keycaps allow the light to shine through. Double-shot or pudding-style keycaps are popular for their high-light transmission.
  5. Microcontroller/LED Driver: A microcontroller or LED driver controls the on/off state, brightness, and color of each LED. Many mechanical keyboards use RGB LEDs that combine red, green, and blue diodes in one package. By varying the current through each diode, they can produce an almost infinite range of colors. The controller adjusts the levels of the red, green, and blue diodes to produce these colors.
  6. Software Control: For creating effects like breathing, waving, fading, or reactive typing, a technique called pulse width modulation (PWM) is used. Basically, the LED is rapidly switched on or off at a much faster rate than the human eye can perceive. This rapid cycling creates the illusion that the LED is steadily lit. Adjusting the duty cycle (i.e., the time it's on vs. off) changes the perceived brightness or dimness of the LED.

    Microcontrollers or LED drivers control the LEDs, allowing users to program different lighting effects. Software or onboard controls can manage the timing, intensity, and color changes.
  7. Power Supply: LEDs require very little power to activate. Thus, the electric power from the USB provides sufficient voltage for the LED system. 
  8. Firmware Integration: Firmware on the keyboard's microcontroller translates user inputs (e.g., via software) into lighting commands. Firmware updates can expand the lighting effects available.

Enhance Your Typing Experience with DIY RGB Lighting Effects

a man typing on a mechanical keyboard

Adding custom RGB keyboard lighting effects to your mechanical keyboard can drastically improve your typing experience in many ways by integrating aesthetics and functionality. Here are some of the things you will enjoy by playing with RGB lighting effects.

  1. Personalization
    • Unique Look: With programmable RGB lighting, you can easily customize the appearance of your keyboard with specific colors or themes that match your preferences, room setup, or mood.
    • Profile Matching: You can match lighting profiles with different software, games, or typing sessions.
  2. Functional Benefits
    • Visual Feedback: When keys are pressed, the RGB lighting activates, providing visual feedback and making the keyboard feel more interactive.
    • Key Mapping: Different colors can help visually distinguish between key functions.
  3. Ambient Lighting
    • Under-keyboard Glow: You can set your RGB lighting to emit a soft, steady glow for ambient lighting. Some keyboards have accent LEDs that create an ambient lighting effect around your setup.
    • Reduced Eye Strain: Harsh overhead lighting can cause eye strain as you play computer games or do your work. Subtle lighting on your computer setup illuminates the keys without needing overhead lighting.
  4. Typing Encouragement
    • Motivation: Fun lighting effects can make gaming and typing more enjoyable.
  5. Accessibility
    • Easier Identification: Lighting helps those with visual impairments identify keys quickly.
    • Custom Layouts: Programmable lighting can highlight frequently used or special keys for improved accessibility.
  6. Improved Workflow
    • Shortcut Keys: Different color mappings can help quickly identify shortcut keys for specific applications, improving productivity.
    • Layer Indicators: RGB backlighting can indicate different keyboard layers or modes, aiding users who switch frequently.

Step-by-Step Guide: Customizing Your Keyboard's LEDs Lighting

Do you want a working or gaming setup that breathes, sparkles, and dazzles with each key press? Creating a personalized mechanical gaming keyboard with RGB lighting might sound complex. However, thanks to software and built-in keyboard functionalities, customizing your keyboard lighting is quite straightforward. 

1. Prepare your keyboard.

  • Check if your keyboard allows RGB lighting customization through software.
  • Make sure you have the necessary software for controlling the lighting. Popular options include proprietary software (e.g., Razer Synapse, Corsair iCUE) or open-source firmware (QMK, VIA). Your keyboard's manufacturer often includes software that you can download freely on their website.

2. Install or update the software.

  • Install the manufacturer's software or an open-source tool like QMK or VIA.
  • Make sure your keyboard has the latest firmware version for proper compatibility.

3. Explore your keyboard's preset effects.

  • Start with preset effects to become familiar with what is available. Common options include:
    • Static Colors: Set all LEDs to a single color.
    • Breathing: LEDs fade in and out slowly.
    • Reactive Typing: LEDs light up when you press a key.
    • Rainbow/Wave: A moving wave of rainbow colors across the keyboard.

4. Create custom effects.

  • Open your keyboard's software/app. Choose which keys or areas of the keyboard you want to customize.
  • Assign colors and effects.
    • Per-Key: Assign colors individually for each key, or group them for sections like WASD or arrow keys.
    • Underglow: If your keyboard has underglow, customize these LEDs separately.

5. Adjust the settings.

  • Brightness: Control the brightness levels to suit your environment.
  • Speed/Direction: Adjust the speed and direction of animated effects.
  • Layering: Some software allows layering effects, combining multiple lighting patterns.

6. Save and test.

  • Save your custom profile and test the new settings.
  • Match lighting effects with specific gaming profiles or applications.

7. Do more customization if desired.

  • Custom Firmware: For deeper control and more options, consider flashing QMK firmware or using VIA for per-key RGB control.
  • Hardware Modifications: If you're comfortable with soldering, replace LEDs with new colors or add external LED strips. We will discuss this in the next section.

Step-by-Step Guide: DIY Mechanical Keyboard RGB Lighting

Physically changing the LEDs can be done and can offer you even more customization choices. It can be an exciting DIY project. However, such a project warrants some skill and understanding of electronics. Soldering, desoldering, and checking voltage flows are just some of the skills required for DIY projects.

Also note that if you're changing the physical components of your keyboard, you may void the keyboard's warranty.  

1. Plan your project.

  • Decide on the type of lighting effects you want and if you need individual key lighting (per-key) or underglow lighting.
  • Identify the switches, keycaps, and RGB LEDs you'll use.

2. Gather the components.

  • Keyboard Components: Key switches, keycaps, stabilizers, and a compatible PCB.
  • LEDs: RGB LEDs
  • Microcontroller/LED Driver: A suitable microcontroller (e.g., Arduino, Teensy) or an LED driver.
  • Other Supplies: Soldering iron, solder, wire, heat shrink tubing, and a multimeter.

3. Assemble the hardware.

  • Solder the key switches and diodes (if applicable) onto the PCB.
  • If your PCB is preconfigured for LEDs, solder the LEDs in place according to the polarity marked on the board. If your kit has accent lighting, solder or attach the LED lighting underneath or at the sides of the keyboard.

4. Connect the microcontroller.

  • Connect the RGB LEDs to their corresponding PWM channels on the microcontroller. 
  • Make sure the microcontroller receives adequate power from the keyboard's USB connection.

5. Program the lighting effects.

  • Flash the firmware onto the microcontroller. Common options include QMK (Quantum Mechanical Keyboard Firmware) or TMK.
  • Write or modify the firmware to include your desired lighting patterns. Adjust PWM frequencies, color channels, and timing for effects like breathing or waves.
  • Test the effects by uploading the firmware and powering on the keyboard.

6. Fine-tune your setup.

  • Attach the switches and the keycaps. Check the keycap transparency and adjust the brightness.
  • Fine-tune the colors and patterns using software or on-board controls.
  • Keep your keyboard's firmware updated to ensure compatibility and to access new features.

7. Assemble the keyboard.

  • Once the electronics are tested and functioning, place all components into the keyboard case.
  • Tidy up the cables and wires to prevent snagging.


Experimenting with RGB LEDs is fun. It can be as simple as programming color schemes and patterns to make your gaming experience more fun and immersive. It can be as complex as actually choosing and installing the physical electronic components, which is a fun and engaging DIY project. Whichever the case, backlit mechanical keyboards open up a whole new dimension to gaming and working!

Chris Greiner, a Mechanical Keyboard specialist, boasts a solid educational background with dual bachelor's degrees in Computer Science and Business Management from Lewis University. His additional certification in Mechanical Keyboard Design showcases his dedication to staying on the forefront of keyboard technology. Chris primarily writes for keyboard enthusiasts and has been featured on platforms like Jestik, solidifying his reputation as a thought leader in the mechanical keyboard community.
Notify of
Inline Feedbacks
View all comments


Pinstack is a dedicated online media platform focusing on selling and reviewing mechanical keyboards. Our commitment is to provide comprehensive reviews, in-depth guides, and much more. With our active presence on YouTube and our website, we strive to deliver top-quality content across multiple platforms, aiming to bring the best to our audience.
Subscribe to our newsletter
Subscription Form
We care about the protection of your data. We’ll never share your details.

Pinstack is an Amazon Affiliate. All earnings from this website are from qualified purchases. Learn more about our affiliate disclosure terms.
2023 - Copyright, All Rights Reserved
Would love your thoughts, please comment.x