Misc Mac and keyboard improvements