This logitech controller is not Mac OS X compatable, ( from the spec sheet ) so it wont control Keynote properly. It is set up to controll Powerpoint.
The keyboard commands "F5" and "." are not Keynote commands, I know they are used in Powerpoint.
in Keynote "." is exit playback
alt cmd P is play
B is screen black
The K command is a system command for Quicktime so this does work in Keynote for QT play control.
The Logitech is a mouse device and uses mouse button control.
To change the control of the logiteck you would need Mac compatible mouse control software which isnt available for the R400.
You would need to purchase a Mac compatible remote control with mouse button configuration software to work with Keynote.
Keynote files only play in Keynote, they do not play in VLC player therefore your suggestion does not work.
The original query was how to use a remote control to start and stop a Quicktime videoplaying as part of a Keynote presentation, not about using Quicktime Player or any other media player.
The keyboard command to start or stop play a video in Keynote is the k key, therefore a remote control will need to use this command.