hbgetBuildBarKey function