cmdf and cmdg behavior mirrors how browsers do it