If you want to have the F-Keys to be F-Keys by default (not only together with Fn) on a Thinpad x240 you're likely to
activate Fn-Lock. The problem with this is, that the "End"-Key on the top right of the keyboard get's "Insert" then,
which is pretty annoying as I use "End" frequently. The solution is to switch "End" and "Insert", so the "End/Insert"
key will be "End" with enabled Fn-Lock. To do this create the file
paste the following:
# ThinkPad X240: switch End and Insert keys (so that when Fn-Lock is enabled, End works without Fn). keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadX240:* KEYBOARD_KEY_d2=end KEYBOARD_KEY_cf=insert
After the next reboot "End" and "Insert" will be switched.
Article based on: http://www.thinkwiki.org/wiki/Category:X240
12.01.2016 Update: for Ubuntu 15.10
On Ubuntu 15.10 the above method seems not to work properly, so I figured out another way to map "insert" to "end":
xmodmap -e "keycode 118 = End"
Add the above line in a file that gets executed at startup (like
.xinitrc or awesome WM's
rc.lua) to map "Insert" to
"End". You won't have an "Insert"-Key anymore, but for my part I don't need it anyway.
Tell us what you think about this. Is something unclear? Do you have questions or ideas? Leave your comments below.