hax0kartik / rehid

HID module rewrite(button remapping and more)
104 stars 7 forks source link

Update remapper config parser to read 'get' and 'press' json key instead of index 0 and 1 #2

Closed mikahjc closed 3 years ago

mikahjc commented 3 years ago

By keeping the JSON parser lightweight, we can't index by key names. Added a method that searches through a remap entry and returns a pointer to the requested entry. To keep things performant we only perform the search if the provided object contains 2 keys.