Add shortcut for Merge Last, and Merge First
The first step is to find out what command is being called when you
merge 2 vertices. You can find that out by doing a merge, then checking
the info window at the top. You can see me do this in this GIF:



From here, I know the command I want to activate is
bpy.ops.mesh.merge. Now all I have to do is map a shortcut to this
function. This can be done pretty easily without scripting.


Go to File &gt; User Preferences &gt; Input &gt; 3D View &gt; Mesh
Go to the bottom and click Add New.
Click the drop down next to the "none" label for the shortcut you
just added.
In the text input box where you see "none" written, change it to say
mesh.merge.
At the bottom you should see a property show up that's grayed out
that says "At Center". Click that drop down and change it to "At
First".
Use the buttons on the right side of this dialog to make the shortcut
that will activate this function. In my example below, I have decided
to use Ctrl Alt M




Be sure to save user settings if you want this shortcut to be active every time you open Blender.