← Back to SuroSec

ThinkPad Classic Keyboard Retrofit: X220 7-Row on an X230

X220
X220 Keyboard

ThinkPads built their reputation on a few simple truths: they’re fixable, they last, and the keyboards are best-in-class. The last X-series to ship with the iconic 7-row layout was the X220. With the X230, Lenovo switched to a chiclet layout. It’s fine, but if you spend your day in terminals, editors, and shortcuts, the 7-row board feels like home. That’s why a whole micro-ecosystem exists around retrofitting an X220 keyboard into an X230.

Why Mod the Keyboard?

The catch: the X230’s embedded controller (EC) expects the chiclet matrix. Dropping in a 7-row board works electrically, but a few keys report the “wrong” scancodes. Historically, the clean fix is an EC firmware patch.

Pin Isolation to Prevent Overheating

The X220 and X230 keyboards use slightly different pinouts. On the X230, pins #25, #27, and #29 are separated, while on the X220 they are internally tied together. Plugging an X220 keyboard directly into an X230 without modification can create a short circuit, potentially leading to overheating or permanent keyboard damage.

The standard workaround is simple: apply a small strip of electrical tape over pins #25, #27, and #29 on the X220 keyboard’s ribbon cable before installation. This prevents the unwanted connection while leaving all other pins untouched.

Ignoring this step can result in overheating and physical damage to the keyboard over time.

Some users have reported years of trouble-free use without performing this mod, but documented cases show burn marks appearing on the keyboard’s ribbon cable when the pins were left unisolated. A thin piece of electrical tape provides a safe margin, and ensures long-term stability of the retrofit.

X220 Keyboard Pin Isolation

The EC Patch: hamishcoleman/thinkpad-ec

Hamish Coleman’s thinkpad-ec project provides a way to patch the EC firmware so the X220 keyboard maps perfectly on an X230. The usual flow:

  1. Obtain Lenovo’s official X230 EC update package.
  2. Extract the EC images (.FL1/.FL2).
  3. Use thinkpad-ec to build a patched image.
  4. Flash from a DOS environment with Lenovo’s flash utility (e.g., phlash16).
EC flashing requires caution. A power loss or wrong image can leave the system in a bad state. Always read the project’s README end-to-end and verify hashes.

Where I Tripped: Coreboot First, EC Later

On my machines, I prioritized firmware hardening: I flashed Coreboot (Skulls) first to disable Intel ME and modernize the boot path. That worked great for security, but it complicated the EC flash. Lenovo’s DOS/Windows tools expect the stock Lenovo BIOS runtime. Once Coreboot is installed, those vendor flash tools don’t always run properly. You can still program the EC externally, but that means cracking the case again and using an SPI programmer on the right chip. It’s doable, just heavier weight.

Given that I already had a solid Coreboot setup and backups, I had two choices:

I chose the second path for now. It’s reversible, keeps the system secure, and avoids an extra round of hardware flashing.

The Hardware Swap

The physical retrofit is straightforward and well documented:

  1. Power off, disconnect battery and AC.
  2. Remove palm rest and keyboard per the X230 hardware maintenance manual.
  3. Install the X220 palm rest (if you’re going for the full classic setup) and 7-row keyboard.
  4. Route ribbon cables carefully. On the palm-rest FFC, the blue stiffener faces the ZIF latch per Lenovo’s orientation. Lock the connector evenly.

At this point the machine boots and the keyboard works. A few Fn combos and the Menu/PrtSc/Insert cluster won’t be perfect without the EC patch, which brings us to software remapping.

Software Mapping Instead of EC Flash

The goal was simple: preserve the Coreboot environment, keep the X230 EC untouched, and still make the 7-row layout productive. On Linux this is easy to live with. I captured the actual key events and bound them to the expected actions at the window-manager layer.

Detect keys

In X11, use xev to see what each key sends. If you’re on a tiling WM like i3 and want no desktop environment, that’s fine:

sudo pacman -S xorg-server xorg-xev i3-wm i3status dmenu alacritty
startx # then run xev in a terminal

Press a suspect key (e.g., brightness or the old “Menu” key) and note the keysym or keycode reported by xev.

Bind actions in your WM

In i3, I added bindings directly in ~/.config/i3/config so I don’t need a separate hotkey daemon:

# Brightness (requires 'brightnessctl' or 'light')
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10%
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%-

# Audio (PulseAudio)
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle

If a key doesn’t report an XF86* symbol (for example, it shows up as F23), you can bind that directly:

# Example: a mis-mapped key appears as F23 in xev
bindsym F23 exec --no-startup-id brightnessctl set 10%-

This gives me working brightness, audio, mic-mute, and screenshots without touching the EC. For terminal and editor work, the remaining differences (Insert/Menu/PrtSc) aren’t show-stoppers.

Why This Path Is Reasonable

If You Want the Full EC Route

The “ideal” firmware-first order for a pristine retrofit is:

  1. Keep stock Lenovo BIOS temporarily.
  2. Build patched EC with thinkpad-ec (extract .FL1/.FL2 from Lenovo package, run the project’s Makefile).
  3. Flash from FreeDOS using Lenovo’s utility (phlash16 / updtflsh) per the repo guidance.
  4. Verify key behavior in BIOS.
  5. Flash Coreboot (Skulls) and proceed with your Linux install.

That leaves you with a firmware-level perfect 7-row map that survives OS reinstalls.

X230 Bezel Replacement
Before. Also replacing the bezel.
X220 Keyboard Mod
After. X230 with X220 keyboard, palm rest, and new bezel.

Outcome

Swapping the hardware was straightforward. Because I had already moved to Coreboot, I chose to solve the remaining keymap quirks in software. The result is a clean, fast X230 with a classic typing experience, a secure firmware stack, and the flexibility to switch back to the chiclet keyboard without another firmware dance. For my workflow — terminals, Vim, browsing, scripting — this strikes the right balance between pragmatism and purity.

More Posts