Added a blocking function to get a key combination up to a specified key