Kodi Community Forum
xbmcclient.h: SendButton does not work for some buttons in Kodi 18 (worked in 17.6) - 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: xbmcclient.h: SendButton does not work for some buttons in Kodi 18 (worked in 17.6) (/showthread.php?tid=334606)



xbmcclient.h: SendButton does not work for some buttons in Kodi 18 (worked in 17.6) - vaar - 2018-08-14

Sample program using https://github.com/xbmc/xbmc/blob/master/tools/EventClients/lib/c%2B%2B/xbmcclient.h:
 
Code:
#include "xbmcclient.h"

main(int argc, char* argv)
{
  CXBMCClient xbmc;
  xbmc.SendButton(argv[1], "KB", BTN_NO_REPEAT);
}

If compiled as g++ -o test test.c and run as ./test down, the cursor goes down one position, as expected. ./test up or ./test e also work. But if I run ./test return or ./test escape (or ./test enter, or ./test esc, etc.) it does nothing.

Note that if I run ./test asdfasdfasdf I get this in the log:
Code:
10:42:52.555 T:1558180592 ERROR: Keyboard Translator: Can't find button asdfasdfasdf
10:42:52.584 T:1917603840 DEBUG: HandleKey: 0 (0xf000, obc-61185) pressed, action is
but I I run ./test enter I get nothing. Seems like the button name is being recognized, but ignored.

This used to work without problems in kodi 17.6, but I have to run 18 for Amazon Prime Video.


RE: xbmcclient.h: SendButton does not work for some buttons in Kodi 18 (worked in 17.6) - snixel - 2019-02-19

Was this ever resolved?
I recently updated to libreELEC 9 with Kodi 18 and noticed the same thing with the XBMCclient class in xbmcclient.py.
I use the script to send key presses to Kodi, but since v18 kodi seems to ignore some keys. Like enter and escape.


RE: xbmcclient.h: SendButton does not work for some buttons in Kodi 18 (worked in 17.6) - vaar - 2019-03-20

I finally decided to open a bug and the solution is quite simple:

https://github.com/xbmc/xbmc/issues/15772

With a bit of luck it will be merged soon.


RE: xbmcclient.h: SendButton does not work for some buttons in Kodi 18 (worked in 17.6) - snixel - 2019-04-04

Thx for showing the right direction!
I used sirchia advice to remove the longpress keys with a custom xml in userdata/keymaps. That fixes it for now Smile