Converted if in keyboard to switch, removed opti.