tracking selected link

tracking the selected link is a bit complicated since it has a compound
key (type & key)