H5PEditor Library with multiple fields
My new content editor will need two news editor fields.
I started creating a new widger following this tutorial : https://h5p.org/creating-editor-widgets
But this tutorial is only for one field.
How can I handle two fields ? These fields can't work in standalone, they both need each other.
The first field will be a field in order to select a shortcut : the user will focus the field, then push keys and it will fill the input with pressed key.
The second field will be a text field that will mirror the first field but that will be editable in order to rename keys name (for exemple, to rename Control + A shortcut to Ctrl + A).
A solution that might work is to only put the first field in my library, and to use a classic text field for the second field and access it from the first field that will handle all the logic. But this seems very dirty I think.
edit : just after sending this post i found the duration widget that look similar in structur to what I need to do. I will check it.