migrated struct, function defs to keyboard.h and fixed gasm escapes