Open Ulrond opened 3 days ago
Proposed map-table for keySimulator is an example of something new being added, but not populating the rcCodespy
remoteMaps:
- name: "keysimulator"
prefix: "keySimulator -k"
codes:
### These codes need to be rcCodes.py enum list, being translated to what is required by the keySimulator app
POWER: "power"
HOME: "home"
GUIDE: "guide"
SKY: "sky"
NUM_0: "0"
NUM_1: "1"
NUM_2: "2"
NUM_3: "3"
NUM_4: "4"
NUM_5: "5"
NUM_6: "6"
NUM_7: "7"
NUM_8: "8"
NUM_9: "9"
CHANNEL_UP: "chup"
CHANNEL_DOWN: "chdown"
UP: "up"
DOWN: "down"
LEFT: "left"
RIGHT: "right"
SELECT: "enter"
MUTE: "mute"
VOL_UP: "volup"
VOL_DOWN: "voldown"
PLAY: "play"
PAUSE: "pause"
FFORWARD: "fastfwd"
REWIND: "rewind"
RECORD: "record"
RED: "red"
GREEN: "green"
YELLOW: "yellow"
BLUE: "blue"
PAGEUP: "pageup"
PAGEDOWN: "pagedown"
EXIT: "exit"
SEARCH: "search"
INFO: "info"
APPS: "apps"
ONDEMAND: "ondemand"
HELP: "help"
INPUTKEY: "inputkey"
LOWBAT: "lowBat"
Goal:
rcCodes.py
is used as an input to the keyhandler, and that's not clear from the documentationneeds to be clear on the types it requires it's not a dictionary it's an enum from
rcCodes.py
There are some odd codes in there which are likely removable, unless they're supported by the remote they shouldn't be present.
This would imply that the rc Module was being used for things that it shouldn't be used for, and therefore these are out of scope for usage.
https://github.com/rdkcentral/python_raft/blob/master/framework/core/rcCodes.py
Upgrade rcCode to have a validation function
Upgrading rcCodes to have a validation function something akin to this seems sensible.