Open eklem opened 3 months ago
https://github.com/eklem/espruino-stuff/blob/trunk/safe/espruino.js#L57
onKey doesn't say much. Maybe safeInput or lockInput ?^ And clean up the code a little.
Part of the cleanup can be to make a separate lock/unlock function instead of the s.move(0/1);. It won't be shorter, but more readable.
s.move(0/1);
https://github.com/eklem/espruino-stuff/blob/trunk/safe/espruino.js#L57
onKey doesn't say much. Maybe safeInput or lockInput ?^ And clean up the code a little.