fix bug in keygrouplayout and add vertical layout for pico