Adding closing brace to commented function
Added an offline example to generate a key code