implement shift key constraint