MinecraftForge/MinecraftForge — pull request #1506 by mezz (2014-11-23 02:18:14+00:00)
Title: Add GuiScreenEvents for keyboard and mouse input

Modeled after the existing GuiScreenEvents https://github.com/MinecraftForge/MinecraftForge/commit/eb2549c7730d9430adb11282e05e2fcb2022a4ed

Solves issue #1501

Problem:
GuiScreen consumes keyboard and mouse input in such a way that the existing events aren't fired. (it uses Mouse.next() and Keyboard.next()).
There is no way to detect these events without using .next() first, which steals them from GuiScreen and any other mods that want to detect those events.

Solution:
Fire new GuiScreenEvents:
`MouseInputEvent.Pre (Cancelable)`
`MouseInputEvent.Post`
`KeyboardInputEvent.Pre (Cancelable)`
`KeyboardInputEvent.Post`

Rather than querying and passing all the mouse and keyboard data like the old Forge MouseEvent, they work like FML's mouse and keyboard events. The consumer of the event can query the relevant fields of Mouse or Keyboard directly rather than making the event copy every field.