mimicked mac computers code to enable form use in JS