It's a client-side feature. This would call someFunction(3) whenever you press 'x':
moveMap.bind(keyboard, "x", "someFunction", 3);
If the bind should be used even when you're not in-game, use globalActionMap instead of moveMap.
It's also possible to make a more complex keyboard bind that can do more than just call a function.