Giter Club home page Giter Club logo

minput-hop's Introduction

minput-hop

minput-hop (a play on input-leap) is a compact client-only library written in C89 for talking to Synergy KVM server and its forks.

Rough docs for API available at: https://indigoparadox.github.io/minput-hop/!

Purpose

To have something simple and (relatively) easy to port to obsolete or embedded operating systems so they can share input devices with a KVM server.

Architecture

The architecture is a little convoluted, but it's roughly like this:

  • Platform-specific startup happens in osio_*.c. This is WinMain() on Windows and main() elsewhere.
  • Platform-specific main sets up a common environment, gets configuration (server, client name, port, etc) into a NETIO_CFG struct which it then passes to minput_main() in main.c.
  • minput_main() initializes common subsystems (network, UI) in order and calls osio_loop(), again platform-specific in osio_*.c.
  • osio_loop() repeated calls the loop iteration; either by setting up a timer and then starting the message loop on Windows, or directly elsewhere.

This might be simplified somewhat later, but it works for now.

Ideas

  • Abstract socket send/recv/etc into layer that can be switched out for e.g. serial communication over RS-232.

Known Issues

  • Does not handle the mouse being held down gracefully, especially in MSPAINT.
  • Does not handle mouse interactions well inside of its own window.

Debug Defines

In addition to the DEBUG compile-time definition, some fine-grained debug statements have been placed inside the following definitions to keep verbosity in the logs down when not needed:

  • DEBUG_FLOW
  • DEBUG_CALV
  • DEBUG_SEND
  • DEBUG_PACKETS_IN
  • DEBUG_PROTO_MOUSE
  • DEBUG_PROTO_CLIP

References

  • Programming Windows, 3rd Edition - Petzold, Charles
  • qemu docs for Barrier protocol information.
  • @[email protected] for undocumented *_event() calls in Windows 3.
  • Bobobobo's weblog for a detailed example of using the tray notification area.

minput-hop's People

Contributors

indigoparadox avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.