xbmc/xbmc — pull request #1827 by da-anda (2012-11-21 23:41:00+00:00)
Title: Unify handling of key mappings accross different input devices

Currently, key input (=keyboard, remotes, services), joystick and gamepad use their own logic to process input signals and map them to actions. While joystick and gamepad already use CApplication::GetActiveWindowID() to resolve the windowID to use for keymapping/action lookup, the very same logic of this method is duplicated in CApplication::OnKey() which is used for key input handling. This PR removes the code duplication in CApplication::OnKey() and adds currently missing logic from OnKey() (like virtual FULLSCREEN_LIVETV window) to GetActiveWindowID(). By doing this, some extended logic for fallback keymapping that is currently used by the windows FULLSCREEN_LIVETV and DIALOG_FULLSCREEN_INFO has been moved from CApplication to the ButtonTranslator in a more generic and easily extendable way which makes it available for all input devices.

The changes in this PR fix the currently present bug that the PVR keymappings couldn't be used by all input devices, as reported by users in the forum: http://forum.xbmc.org/showthread.php?tid=144205&page=5