For 1 and 2 I'm using this:
buttons mapped to KEY_EPG and KEY_HOME in keytable.
In oder to get the EPG working I use the following Lircmap.xml
The linux input events translated by eventlircd will show up as "devinput" lirc events in kodi.
As for 3: that should be doable with mapping a button to KEY_PVR - that should map to <recordedtv> in the default kodi keymap for devinput and will then bring up the window via this entry in the default kodi remote.xml
so long,
Hias