Add some conditions to the key handler