Update to noVNC 0.4-173. This fix the keyboard problem.
Until a specific solution is built, compare JavaScript files as C files.