Sadly it gets even more complicated than just the FnLk button. The volume mute and increase/decrease buttons correctly send XF86AudioMute, XF86AudioRaiseVolume, and XF86AudioLowerVolume. The brightness up and down keys send XF86MonBrightnessUp and XF86MonBrightnessUp, respectively. The wireless one (F8) looks like it correctly enables and disables my wireless, as well as sending XF86WLAN. The rest are more tricky.
Mic mute, the camera one (F7), and whatever F9 through F10 are all are on /dev/input/by-path/platform-thinkpad_acpi-event (a symbolic link to /dev/input/event5 on my system), instead of the normal keyboard (/dev/input/by-path/platform-i8042-serio-0-event-kbd, a link to /dev/input/event3). I'm actively working on getting those five keys to work on my system, the code will live here once I'm done: https://github.com/AlexWillisson/tp-w540-keys I'm also documenting some of my work on getting parts of the W540 working on http://oldspeak.us/
There might be better ways to fix those keys, but I'm much more familiar with my code than with correctly configuring X devices.
The four buttons above the numpad are very strange, I'm not sure if I want to tackle them yet.