Copy of github.com/askrobots/network-computer (MIT): a desk you reach from anything. The original lives on GitHub.

2 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/demo/network-computer.git
HTTPS
https://gitstable.com/git/demo/network-computer.git
SSH
ssh://git@gitstable.com:2222/demo/network-computer.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

GitStable demo README: say this is a copy and where the original is cde82c2 13 hours, 41 minutes ago History
input.go · 787 bytes · 33 lines
1// Package input injects keyboard and mouse events into the host OS.
2package input
3
4import (
5 "log"
6
7 "github.com/askrobots/network-computer/internal/proto"
8)
9
10// Injector turns InputEvents into OS events.
11type Injector interface {
12 Handle(proto.InputEvent)
13 ReleaseAll() // release held buttons and keys, e.g. when a client drops
14}
15
16// New returns the platform injector for the given display, or a logger when
17// dryRun is set or the platform has no implementation yet.
18func New(display int, dryRun bool) (Injector, error) {
19 if dryRun {
20 return logInjector{}, nil
21 }
22 return newPlatform(display)
23}
24
25type logInjector struct{}
26
27func (logInjector) Handle(e proto.InputEvent) {
28 if e.T == "mm" {
29 return // too chatty
30 }
31 log.Printf("input: %+v", e)
32}
33func (logInjector) ReleaseAll() {}