Please check `event.key` against `Qt.Key_W` etc. instead of taking the text. You could also do `switch (event.key) {` I guess.

Also, I think those 1, 2, 4 and 8 numbers should be named flags exposed from C++ (maybe Being.Left, Being.Right, etc?)