How to swap control and function key on Lenovo external keyboard?

I use a Lenovo ThinkPad (X220i) and like all ThinkPad users, I swapped "control" and "function" in the BIOS. Now I bought an external USB keyboard by Lenovo with a similar keyboard layout as the internal one, but unfortunately, "control" and "function" are swapped only on the internal, but not the external keyboard. Can this be fixed somehow? Maybe using setxkbmap or xmodmap? I'm running Debian 9 (stretch) btw. if this matters.


As of September 2020, swapping Ctrl and Fn is now possible without the hardware modifications described by Martin.

Instructions can be found here, courtesy of the OP, I will recount them for completeness:

  • Download the firmware updater from Lenovo, version 3.30 (the latest as of September 2020)
  • In a hex editor, change byte 0x74004 from 0xba to 0xf5 and byte 0x740BA from 0xf5 to 0xba.
  • Run the updater and flash the firmware to your keyboard.

This applies only to the USB version of the old TrackPoint Keyboard, called "ThinkPad Compact USB Keyboard with TrackPoint". It does not apply to the new "TrackPoint Keyboard II". Do this at your own risk.


Answering my own question:

Thanks to Lenovo forum user blackdot54 from Canada, there is a hardware modding solution, that works well for me:

https://forums.lenovo.com/t5/Displays-Options-and-Accessories/External-Thinkpad-Keyboard-KU-1255-switch-Fn-Ctrl-on-non-thinkpad-PC/m-p/2192639?page=3#3954879

You need

  • conductive silver paint and a very fine brush
  • a sharp cutter
  • adhesive tape
  • a small flathead screwdriver
  • optional: Ohmmeter, Q tips
  • mandatory: a little bit of serenity and a steady hand

Looks difficult on the photos, but it's not that hard.