Minor improvements on keyboard trigger