• 1
  • 10
  • 11
  • 12
  • 13(current)
  • 14
v19 Keymap Editor (Kodi 18/19 and on)
Screensaver KeyMapping doesn't actually trigger the screensaver.

I'm hoping I'm doing something wrong, but I want to use the screen saver to turn off my connected devices via CEC, and it's working (for the most part).  So I mapped a key to the Window -> Screensaver.  But it doesn't actually send the signal to components, it just blacks out the screen (ignoring the screen saver settings).

Is there a different action I should be mapping to or a different way to trigger a screensaver?
Reply
Action is ActivateScreensaver and you need to map it globally.
Reply
I just took a look at this and it looks quite nice.  I was looking for a specific few settings.  One that I couldn't find is navigate the EPG to the current program.  Sometimes when I start the EPG is not correctly at the current time.

I didn't see this setting in the editor.
Reply
(2024-09-25, 09:54)Stuggy Wrote: I just took a look at this and it looks quite nice.  I was looking for a specific few settings.  One that I couldn't find is navigate the EPG to the current program.  Sometimes when I start the EPG is not correctly at the current time.

I didn't see this setting in the editor.
The actions you can take are mostly the ones listed here:

https://kodi.wiki/view/Keymap#Commands

Controlling the EPG in that way is not in that list.
Reply
Thanks for the reply.  I was digging through the source yesterday to find the names of actions.  I also realised that you can create an xml file which is maybe what your plugin does.
Reply
(2024-09-26, 08:53)Stuggy Wrote: Thanks for the reply.  I was digging through the source yesterday to find the names of actions.  I also realised that you can create an xml file which is maybe what your plugin does.
Yup, that's all it really does.  It just gives you a way to do it all from the GUI, but at the end it's the same XML keyboard file you could do by hand.
Reply
Hi Evryone,

Anyone knows how to add a shortkey for :
 - activate/deactivate"Allow hardware acceleration -Mediacodec (surface)"
 - activate/deactivate"Allow hardware acceleration -Mediacodec"

If not a shortkey for displaying the "settings/player"

I Think I have to find a code and put it on xml but I don't know the code

Thanks
Reply
(2024-10-21, 08:29)KKhui Wrote: Hi Evryone,

Anyone knows how to add a shortkey for :
 - activate/deactivate"Allow hardware acceleration -Mediacodec (surface)"
 - activate/deactivate"Allow hardware acceleration -Mediacodec"

If not a shortkey for displaying the "settings/player"

I Think I have to find a code and put it on xml but I don't know the code

Thanks

The hardware acceleration options are platform specific, so there's no way I know of to toggle them directly.  You should be able to use ActivateWindow(window[,dir, return]) to open a specific window.

https://xbmc.github.io/docs.kodi.tv/mast...tions.html

I think the window you want is WINDOW_SETTINGS_PLAYER.

https://kodi.wiki/view/Window_IDs#Window_IDs
Reply
works - watching tv channel and pressing mapped button shows epg for only this channel:

<keymap>
    <fullscreenlivetv>
        <keyboard>
            <key id="252">activatewindow(pvrchannelguide)</key>
        </keyboard>
    </fullscreenlivetv>
</keymap>

 
does not work - pressing mapped button on the channel list is not showing epg for exactly this selected channel,
the screen is flashing and nothing else happens, I can not see any errors in the log file

<keymap>
    <tvchannels>
        <keyboard>
            <key id="252">activatewindow(pvrchannelguide)</key>
        </keyboard>
    </tvchannels>
</keymap>


How can I open epg for selected channel from the channel list?
Reply
@helvetica - your post above has been merged into the addon support thread (this current one) to keep things tidy.

This is just a courtesy post to let you know in case you wondered where your original thread had gone.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
would you consider adding long press operations?

based on this post https://forum.kodi.tv/showthread.php?tid...pid3218735
which links to a potentially undesirable reddit, from there it links to the github fork https://github.com/bleak-lodge/script.keymapedit

looking at the changes it doesn't look like long press is much to add, ignoring the rest of the changes
- https://github.com/host505/script.keymap...dit:master

it would be preferable if the official addon supported long press rather than install an addon from an unknown github linked from reddit
Reply
(2024-12-12, 19:39)izprtxqkft Wrote: would you consider adding long press operations?

based on this post https://forum.kodi.tv/showthread.php?tid...pid3218735
which links to a potentially undesirable reddit, from there it links to the github fork https://github.com/bleak-lodge/script.keymapedit

looking at the changes it doesn't look like long press is much to add, ignoring the rest of the changes
- https://github.com/host505/script.keymap...dit:master

it would be preferable if the official addon supported long press rather than install an addon from an unknown github linked from reddit
I'll have to see if I can find time for this.  It doesn't look too complicated, but I also don't really understand what it's doing in terms of the actual keymap file it outputs.  I'll have to do some testing, which presents two interesting problems.  First, I don't use this addon basically at all anymore, so I have to go back and look at how it does what it does (I only took it over during the Python3 transition).  Second, I have nothing that generates long presses, so other than looking at the keymap file at the end, I'm not sure how much actual testing I can do.
Reply
(2024-12-13, 02:12)pkscout Wrote: I'll have to see if I can find time for this.

that's all i can ask

-----

if i can give you a head start, whenever you find time
looking at this commit it looks a little less muddy https://github.com/host505/script.keymap...8ac1250801

basically what i see

editor.py:
after if detects the key press but before assigning it to the keymap it prompts the user if it should be a longpress
- the prompt is based on an addon setting

if the user confirms it should be then the "newkey" is appended with " + longpress"

utils.py:
read_keymap detects "mod" in a key function and saves it into the key variable with the same scheme " + "

write_keymap is using a split to add the "mod" into the keycode, with a conditional
- this function is less readable to me

-----

any way, if you find the time that would be great, this addon is invaluable on Android so i appreciate you keeping it maintained

take care
Reply
(2024-12-13, 02:47)izprtxqkft Wrote: any way, if you find the time that would be great, this addon is invaluable on Android so i appreciate you keeping it maintained
OK, there's a test version of this available as 1.3.0~beta1:

https://github.com/pkscout/script.keymap...-longpress

It seems to generate the correct XML for the keymap and reads back the keymap correctly, but, as I said, I have no way to test whether this is actually doing anything.  Feel free to give it a try and see what happens.

To enable the long press support, you need to go into the addon settings and enable it.
Reply
(2024-12-15, 15:18)pkscout Wrote: OK, there's a test version of this available as 1.3.0~beta1:

https://github.com/pkscout/script.keymap...-longpress

It seems to generate the correct XML for the keymap and reads back the keymap correctly, but, as I said, I have no way to test whether this is actually doing anything.  Feel free to give it a try and see what happens.

To enable the long press support, you need to go into the addon settings and enable it.



Works perfectly for me, thank you very much!

-----

Test parameters+result

Edit->Home->System->Quit Kodi
Mapped to Long press Back

Mapping was immediately available and working after Save Keymap

Return to same place and removed the mapping, mapping was removed and no longer available after Save Keymap

Device Zidoo Z9X Pro
Hisense TV Remote operating over CEC

Tested across 3 versions of Kodi, Current+1 Behind+1 Ahead

Nexus
- Kodi (20.0 (20.0.0) Git:20230115-389e701cb9). Platform: Android ARM 32-bit
Omega
- Kodi (21.1 (21.1.0) Git:20240817-183eb85f10). Platform: Android ARM 32-bit
Piers
- Kodi (22.0-ALPHA1 (21.90.700) Git:20241214-a82dfb0dab). Platform: Android ARM 32-bit

No discrepancy across versions, all worked the same.

-----

As an experimental test I tried this on my Debian installation to map backspace to perform the same Quit functionality.
- Kodi from Debian (21.1 Debian package version: 2:21.1+dfsg-5+b1). Platform: Linux x86 64-bit

The addon correctly was able to create and remove the mapping as intended.

The mapping was not available for use due to Kodi which exceeds the scope of this addon as this addon cannot force Kodi to map keys.

This addon only reads/edits/writes keymap files and now with the mod longpress.
Reply
  • 1
  • 10
  • 11
  • 12
  • 13(current)
  • 14

Logout Mark Read Team Forum Stats Members Help
Keymap Editor (Kodi 18/19 and on)0