New version with callbacks partially working with SFS
Working version with support of key down/up events