Thanks, just tried those without success. The keymap script is able to reassign buttons that the TV is passing through to Libreelec, but there are some buttons the TV seems to just not pass through. Eg., there is a 'menu' button on the TV remote that brings up the TV's menu. I would prefer to use this button with Kodi, but the keymap script doesn't register it as being pressed. In any event, even if it did, I assume the TV would still open its own menu at the same time the key is pressed.
I had the same issue with a universal remote that I assigned to my TV. Ie. if the TV assumes the 'menu' button for its own menu, then the TV doesn't pass that button-press over CEC to Kodi.
I guess I'll just get an IR receiver for the RPi...