Deleting PVR recordings and a few other items in Kodi seemed to be too much effort so I tweaked my remote a bit to avoid having to dig through the context menu to remove items and recordings. Since I couldn’t find anywhere on the innerwebs where someone had posted how to keymap directly to accept “yes” on a confirmation dialog I figured I would share how to do this.
My remote sends ctrl+r when I press the record button on my remote (using a FLIRC USB dongle). The keymap below is specific to that and the ability to utilize long-press actions. If you want to do the same thing you will have to modify the keymap to conform to whatever key your remote is sending. If you are unfamiliar with how all this works it is best to get started by reading Kodi’s wiki on the topic.
As for how this works in practice holding down (long-press) the record button deletes (or hides depending on the window in question) the selected item. When a confirmation dialog pops up to confirm the action then pressing the record button again (regular short-press) selects yes to confirm the deletion. Note I mapped this only to specific windows as I did not want it global. This lessened the chance of accidently deleting anything in my library. If someone wanted this everywhere in Kodi then they could just map the deleting to “global”, add in the part for the “yesnodialog” window, and then omit the rest as it wouldn’t be needed.
The following has been tested with Estuary and the OSMC skin…
<keymap>
<TVChannels>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</TVChannels>
<TVRecordings>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</TVRecordings>
<TVTimers>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</TVTimers>
<TVTimerRules>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</TVTimerRules>
<VideoBookmarks>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</VideoBookmarks>
<VideoPlaylist>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</VideoPlaylist>
<MusicPlaylist>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</MusicPlaylist>
<MusicPlaylistEditor>
<keyboard>
<r mod="ctrl,longpress">Delete</r>
</keyboard>
</MusicPlaylistEditor>
<yesnodialog>
<keyboard>
<r mod="ctrl">SendClick(11)</r>
</keyboard>
</yesnodialog>
</keymap>