GamePad

A gamepad is a handheld controller, typically with a digital “hat” joystick, two small analogue joysticks, and some buttons. It uses the same interface as a joystick, and so is supported by the Emacs JoyStick interface (which was in fact developed with a gamepad rather than a conventional joystick).

The OS interface protocol uses separate Up and Down button events, and the Emacs interface distinguishes those, and provides chording (but not the painful sort that conventional keyboards have), so it’s possible to get a vast range of commands from a few buttons. The emacs interface also distinguishes two kinds of button-up events, according to whether the button has been used, during that press, as a modifier to another button.

JohnSturdy is experimenting with this, and has promising initial results. The difference in comfort levels are noticeable; after all, gamepads were designed to be fun to use. It’s also noticeably fast, when driving the EmacsVersor command set; a quick test of the kind of operation which that setup does well (select the control structure and variable bindings around a sequence of expressions, and copy it to surround another group of expressions) took 5 seconds with the gamepad, 11 seconds with the more advanced commands (s-exp movement) provided with Emacs, and 25 seconds with character/line based editing. The learning curve, however, is quite steep.