Implemented functional from article http://suvitruf.ru/2012/11/25/2615/ (Added joystick)