refractoring ButtonKeys