Kodi Community Forum
onAction / CInputManger detection? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: onAction / CInputManger detection? (/showthread.php?tid=298880)



onAction / CInputManger detection? - Ranga - 2016-12-04

I'm using onAction function, is there anyway to detect if the action/key was a long-down(as in when you hold the key down and it repeats the action) press?

If I press down key once I get
Code:
DEBUG: Keyboard: scancode: 0x50, sym: 0x0112, unicode: 0x0000, modifier: 0x0
DEBUG: CInputManager::OnKey: down (0xf081) pressed, action is Down

If I hold the down key I get:
Code:
DEBUG: Keyboard: scancode: 0x50, sym: 0x0112, unicode: 0x0000, modifier: 0x0
DEBUG: CInputManager::OnKey: long-down (0x100f081) pressed, action is Down

So the CInputManager is detecting it's a "long-down" hold down key action, so I'm wondering if I can detect this anyway using onAction? I only want to perform something once even if the key pressed is held down, I don't want to keep repeating instead I want it so you would have to release the key and press it again.

I just can't figure out how to detect if the action/key is being held down or not using onAction

Thank you in advanced!


RE: onAction / CInputManger detection? - pannal - 2024-07-22

Did you solve this in the meantime? This is still an issue.