#The problem
Currently plugins are supposed to listen to input using the InputManager. There are three issues to this.
- Binding conflicts. Plugins might use the same key. This is mostly an issue with the tab and ctrl keys.
- Rebinding confusion. Each plugin, if it is configurable, defines its own way of redefining keybindings. This is confusing.
- By default all presses are mapped, including when for example chat is open.
#The solution
Let plugins define keybindings by means of a simple string as key. Conflicts between plugins are solved because the plugin is part of the key. Client side the user can set the keybinding to an actual key, which is defaulted to a configurable default. The client side part is done by SpoutCraft, possibly by modifying the keybindings screen to add plugin keybindings. Here's the code the plugin has to use: