I think you could modify the 311 (control code for K) on line 238 of the client\main.lua file.

You can find a list of the control numbers here:

F5 is 166, for example.