A team built a phone keyboard driven entirely by head movement and tested three layouts for it.

A phone keyboard assumes two free hands. That assumption breaks for a driver, for a welder, and completely for anyone who cannot use their hands at all. A research group at Universitas Brawijaya designed an interface for that situation, where the only input is the movement of the user's head.

The system is called HEMOCS, short for Head Movement Control System. A phone sits inside a dummy head mounted display of the cardboard kind, and its accelerometer, gyroscope, and magnetometer report how the head is oriented. That orientation is described with three angles: pitch, roll, and yaw.
Those angles turn into six gestures. The head can rotate left or right, tilt forward or back, and bend sideways in either direction. Each gesture can be bound to an action on screen.
The prototype keyboard was built three times over, with letters arranged by English frequency, in plain alphabetical order, and in the familiar QWERTY order. Two control styles were tried as well. In free movement the head drives a pointer like a mouse, and a key is selected by holding still for three seconds. In linear movement, gestures step the pointer around and fire actions directly.
Other settings were tuned by experiment. A head angle threshold of 12 degrees gave the highest accuracy, at 87 percent, and the best key size came out at 0.3 cm. A small usability session with five respondents followed the measurements.

The closing result is a tradeoff the authors report plainly. The frequency layout saved the most movement, yet users still felt more comfortable with QWERTY because it was familiar, while the frequency arrangement was judged easier to use. Linear movement was preferred over free movement, and respondents mentioned some mental and physical strain. The authors note their layouts and controls can help builders pick the right combination for hands free interaction, with the next step being a real HEMOCS application.
Herman Tolle et al. (2016). Design of keyboard input control for mobile application using Head Movement Control (HEMOCS). 2016 International Conference on Advanced Computer Science and Information Systems (ICACSIS).