fixed issues on win32 and mac keyboard