scripts: set type for the "key" attribute