modify contraction mode of keyboard

modify contraction mode of keyboard