Goal:
One Harmony activity, different desktop environments/sessions (Windows, Linux, & Kodi).
Challenge:
Solution:
Proof of concept:
Kodi harmony FLIRC power issue (2015)
[suspend-keystroke] := alt+backslash
[suspend-command, linux] := systemctl suspend
[suspend-command, windows] := %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Gnome (& maybe Pantheon):
settings > devices > keyboard
[suspend-keystroke] := [suspend-command, linux]
Windows:
create shortcut in user’s desktop
enter [suspend-command, windows] as location of item
assign [suspend-keystroke] to ‘shortcut key’ of shortcut
kodi:
This will only suspend a system if kodi is the focused application, but is cross-platform functional.
create entry in keymap.xml, assigning [suspend-keystroke] to (kodi’s) sleep function.
Example:
userdata\keymaps\keymap.xml
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<global>
<keyboard>
<backslash mod="alt">Suspend()</backslash>
<t mod="shift,alt">PlayPvrTV</t>
</keyboard>
</global>
</keymap>
MyHarmony:
devices > FLIRC > Change Device Settings > Power Settings >
[ I want to turn off this device when it’s not in use ]
[ One button on the remote for turning it both On and Off ]
[ I don't have the original remote, but I know the command that is used: PowerOff ]
reduce (eliminate) command repeats for FLIRC-device
devices > FLIRC > Change Device Settings > Device command repeats > set to `0`
FLIRC:
link FLIRC’s [power-off] signal to [suspend-keystroke]
Un-explored:
Determine what the keyboard (logitech k400) power button is outputting (using ‘xev’?)
xev -event keyboard
link the command to a keystroke via kodi keymap file.
Notes:
FLIRC, support
other FLIRC support
kodi shortcuts to use
keystroke | function |
---|---|
p | play |
space | play/pause |
x | stop |
e | epg |
ctrl+r | record |
h | channel list |
c | context menu |
i | info |
k | pvr |
0 (zero) | toggle last two channels |
f | fast forward |
r | rewind |
backspace | back |
find usb keyboard id’s
https://superuser.com/a/552026
WMC shortcuts
https://technet.microsoft.com/en-us/library/ff404226.aspx
http://tweaks.com/windows/39108/windows-media-center-keyboard-shortcuts/
https://www.simplehelp.net/2008/06/18/42-keyboard-shortcuts-for-controlling-windows-media-center/
Devices to use with Harmony
anyware:gp-ir02bk (mce remote)
FLIRC:kodi
kodi doesn’t respond to some rc6 commands because they are broadcast beyond kodi’s ir spectrum.
The easy route is FLIRC, which internally translates the ir codes, and output’s them to the PC as standard keyboard codes (super universal). Also, with FLIRC & harmony remote, I am freed from rc6/kodi/linux incompatibilities.
Regarding Windows, getting Kodi to see the missing rc6 codes directly involves a registry hack, and some old un-supported software “Advanced MCE Remote Mapper Tool”.
*other list of hacky options
Regarding Linux, there’s a dance with ir-keytables and some services.