Giter Site home page Giter Site logo

Comments (2)

ari26squared avatar ari26squared commented on May 18, 2024 1

I had a different impression on how to achieve this, which is why I suggested it to you. You know the way the library works better than I do.

I am also busy, but I will try making the change into a pull request (given your thoughts). You may beat me to it!

Thank you

from microrl-remaster.

dimmykar avatar dimmykar commented on May 18, 2024

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:

typedef enum {
    ....
    MICRORL_CTRL_SIGNAL_W = 0x77; /* 'w' ASCII code */
    ....
} microrl_ctrl_signal_keys_t;

typedef struct {
    microrl_ctrl_signal_keys_t key; /* Control signal key */
    microrl_ctrl_signal_fn ctrl_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.

from microrl-remaster.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.