Giter Club home page Giter Club logo

Comments (2)

debloper avatar debloper commented on August 16, 2024 2

On a second thought, going to postpone this feature to round back at later.

None of the existing solutions are up to the mark in terms of quality of implementation. They have all sorts of issues - from dependencies to distributions & everything in-between. They do not follow the "do one thing, and one thing well" methodology & hence suffer from the feature overloading problem. Half of them are also tied to specific display server or compositor, even though this can be done by directly talking to the Kernel.

The one that comes closest is ydotool, but aptitude installs an older broken version v0.1.8, and the new versions (v1.0.x) don't have ARM release. So, we'll have to build/distribute it ourselves, and potentially risk becoming a (supply chain exploit vector), which is on the rise recently. So I am not walking into that.

If I really have to build C code anyway, I'd rather write a better/leaner implementation.

All that's needed is to send input_event to kernel to proper device/stream... something like:

// NOTE: IT'S NOT VALIDATED & SHOUDN'T WORK
// THIS IS JUST A REFERENCE, NOT AN EXAMPLE
// I NEED TO FIND THE DEVICE TO fwrite() TO

#include <linux/input.h>

void main (int argc, char *argv[]) {
    struct input_event ie;

    ie.type = EV_REL;
    ie.code = REL_X;
    ie.value = 1000;

    fwrite(&ie, sizeof ie, 1, THE_INPUT_DEVICE_TO_HANDLE_THIS);
    // you can include stdio.h & use `stdout` to fwrite to
    // that should allow you to compile & run it
    // and spit event bytecode in terminal... xP

    return;
}

But we'll come back to it at a later point. Meanwhile, 👍 the issue to flag it as important, to help me prioritize this.

from piosk.

debloper avatar debloper commented on August 16, 2024 1

Thank you... let's make it part of 3.0 release!

from piosk.

Related Issues (20)

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.