aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/wininput.md
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-05-02 16:55:13 +0200
committercbdev <cb@cbcdn.com>2020-05-02 16:55:13 +0200
commit56507d7ac27d0562689ea7c505fa026ecc38494f (patch)
treef77767d1a30e66fc2ab448950b72b99b817d4b6a /backends/wininput.md
parent4f467a30f88a628e0e49858986d9278e12a92ce5 (diff)
downloadmidimonster-56507d7ac27d0562689ea7c505fa026ecc38494f.tar.gz
midimonster-56507d7ac27d0562689ea7c505fa026ecc38494f.tar.bz2
midimonster-56507d7ac27d0562689ea7c505fa026ecc38494f.zip
Implement keyboard output for wininput
Diffstat (limited to 'backends/wininput.md')
-rw-r--r--backends/wininput.md114
1 files changed, 114 insertions, 0 deletions
diff --git a/backends/wininput.md b/backends/wininput.md
new file mode 100644
index 0000000..672a24e
--- /dev/null
+++ b/backends/wininput.md
@@ -0,0 +1,114 @@
+### The `wininput` backend
+
+This backend allows using the mouse and keyboard as input and output channels on a Windows system.
+For example, it can be used to create hotkey-like behaviour (by reading keyboard input) or to control
+a computer remotely.
+
+As Windows merges all keyboard and mouse input into a single data stream, no fine-grained per-device
+access (as is available under Linux) is possible.
+
+#### Global configuration
+
+This backend does not take any global configuration.
+
+#### Instance configuration
+
+This backend does not take any instance-specific configuration.
+
+#### Channel specification
+
+The mouse is exposed as two channels for the position (with the origin being the upper-left corner of the desktop)
+
+* `mouse.x`
+* `mouse.y`
+
+as well as one channel per mouse button
+
+* `mouse.lmb` (Left mouse button)
+* `mouse.rmb` (Right mouse button)
+* `mouse.mmb` (Middle mouse button)
+* `mouse.xmb1` (Extra mouse button 1)
+* `mouse.xmb2` (Extra mouse button 2)
+
+All keys that have an [assigned virtual keycode](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes)
+are mappable as MIDIMonster channels using the syntax `key.<keyname>`, with *keyname* being one of the following specifiers:
+
+* One of the keynames listed below (e.g., `key.enter`)
+* For "simple" keys (A-z, 0-9, etc), simply the key glyph (e.g. `key.a`)
+* A hexadecimal number specifying the virtual keycode
+
+Keys are pressed once the normalized event value is greater than `0.9`, and released if under that.
+
+The following keynames are defined in an internal mapping table:
+
+| Key name | Description |
+|-------------------------------|-----------------------|
+| `backspace` | |
+| `tab` | |
+| `clear` | |
+| `enter` | |
+| `shift` | |
+| `control` | |
+| `alt` | |
+| `capslock` | |
+| `escape` | |
+| `space`, | |
+| `pageup`, `pagedown` | |
+| `end` | |
+| `home` | |
+| `pause` | |
+| `numlock` | |
+| `scrolllock` | |
+| `insert` | |
+| `delete` | |
+| `printscreen` | |
+| `up`, `down`, `left`, `right` | |
+| `select` | |
+| `print` | |
+| `execute` | |
+| `help` | |
+| `apps` | |
+| `sleep` | |
+| `num0` - `num9` | |
+| `multiply` | |
+| `plus` | |
+| `comma` | |
+| `minus` | |
+| `dot` | |
+| `divide` | |
+| `f1` - `f24` | |
+| `lwin`, `rwin` | |
+| `lshift`, `rshift` | |
+| `lctrl, `rctrl` | |
+| `lmenu`, `rmenu` | |
+| `previous`, `next` | Browser controls |
+| `refresh` | Browser controls |
+| `stop` | Browser controls |
+| `search` | Browser controls |
+| `favorites` | Browser controls |
+| `homepage` | Browser controls |
+| `mute` | |
+| `voldown`, `volup` | |
+| `nexttrack`, `prevtrack` | |
+| `stopmedia`, `togglemedia` | |
+| `mediaselect` | |
+| `mail` | |
+| `app1`, `app2` | |
+| `zoom` | |
+
+Example mappings:
+```
+generator.x > wi1.mouse.x
+input.a > wi1.key.a
+input.X > wi1.key.escape
+```
+
+#### Known bugs / problems
+
+Keyboard and mouse input is subject to UIPI. You can not send input to applications that run at a higher
+privilege level than the MIDIMonster.
+
+Some antivirus applications may detect this backend as problematic file, because it uses the same system
+interfaces to read keyboard and mouse input as any malicious application would. While it is definitely
+possible to configure the MIDIMonster to do malicious things, the code itself does not log anything.
+You can verify this by reading the backend code yourself.