You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be very useful to have a more generic option to act on any control signal.
For me, I have it set so that can catch ^W to change my execute function back to the original execute function with out having to change any hardware data streams (uart). That is, I have access to all the nice stuff of typing into a command line while not having to muck around with updating my hardware input, if that makes sense.
The change would be here prv_control_char_process where you just set the signal value of mrl to ch and call the signal interrupt function provided by the user, which can have its own switch case to determine what to do.
I hope this makes sense to you. And I could just put in my own branch, but I think it should be here as well.
The text was updated successfully, but these errors were encountered:
Hello! Thank you for participating in the project!
Your idea is quite interesting, there are many ^+key control keys that are not used by the library. So that the registered characters do not impact to already implemented ones in the library, I see the implementation of this field in the structure by using of an enumeration, for example, microrl_ctrl_signal_keys_t with keys available for callback (and not used in library yet). Also, it is possible to implement several of these signals with custom callbacks instead of one signal with one callback, using the microrl_ctrl_signal_t signals structure array with configurable size, and using a function for registering these signals. The possible implementation of the microrl_ctrl_signal_t is:
typedefenum {
....
MICRORL_CTRL_SIGNAL_W=0x77; /* 'w' ASCII code */
....
} microrl_ctrl_signal_keys_t;
typedefstruct {
microrl_ctrl_signal_keys_tkey; /* Control signal key */microrl_ctrl_signal_fnctrl_signal_fn; /* Control signal user's callback */
} microrl_ctrl_signal_t;
I will implement this feature in the near future, but now I have little free time. If you urgently need such feature, you can prepare a Pull Request with your own implementation of this feature.
I think it would be very useful to have a more generic option to act on any control signal.
For me, I have it set so that can catch ^W to change my execute function back to the original execute function with out having to change any hardware data streams (uart). That is, I have access to all the nice stuff of typing into a command line while not having to muck around with updating my hardware input, if that makes sense.
The change would be here
prv_control_char_process
where you just set the signal value of mrl to ch and call the signal interrupt function provided by the user, which can have its own switch case to determine what to do.I hope this makes sense to you. And I could just put in my own branch, but I think it should be here as well.
The text was updated successfully, but these errors were encountered: