Use an alist to determine keysequence