I've had to add the name check because when the screensaver is active, the first key pressed on a remote arrives with the right action name, but the ID is always ACTION_BUILT_IN_FUNCTION. This did not happen in Frodo where checking for ACTION_TOGGLE_CECDEVICE was enough.