fixed infinite-loop for key processing
Merge remote-tracking branch 'origin/ribbons' into ribbons