Git Product home page Git Product logo

mouse-driver's Introduction

MouseK-driver

A linux kernel module to control mouse pointer using keyboard. This is an experiment to fiddle with drivers. It may not have any real life use case but was fun to create. It still has some bugs and needs a lot of improvements.

To run

  • Use make to generate .ko file
  • Install using insmod mousek.ko files
  • Go to cd /dev and create sudo mknod /dev/mousek c 247 0 where 247 will be replaced by major number given while installing this module. This major number can be viewed in logs using dmesg
  • Provide permission to this char file sudo chmod 666 mousek
  • To remove rmmod mousek
  • To view available kernel mods lsmod

To provide input to mouse

Use the available commands: All of the commands are being fed into dev mousek char file. This can be done by echo in /dev directory. For example -

$ echo "i dllwW" > mousek
$ echo "ll" > mousek
$ echo "x 434" > mousek

First character will tell what command to follow i : instruction sequence followed by commands example

  • echo "i udrrl" > mousek or echo "i ddrqQ" > mousek where -

    • "i" is command
    • "l" for -10 pixel X axis
    • "r" for 10 pixel X axis
    • "d" for 10 pixel Y axis
    • "u" for -10 pixel Y axis
    • "q" for left click down
    • "Q" for left click Up
    • "w" for right click down
    • "W" for right click Up
  • x : relative value in X Axis

    • Example: echo "x 250" > mousek
  • y : relative value in Y Axis

    • Example: echo "y 200" > mousek
  • l : left click , ll : double left click

    • Example: echo "l" > mousek or echo "ll" > mousek
  • r : right click

    • Example: echo "r" > mousek

Bugs

  • Input sequence command doesn't respect order of commands at the moment.
  • Unable to move visible mouse pointer symbol on screen (for this, need to mess with x10 demon I guess).

License

This kernel module comes with a GPL license.

mouse-driver's People

Contributors

coolkingcole avatar kushsharma avatar

Watchers

 avatar

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.