add multimedia keys

This commit is contained in:
Unrud 2018-09-30 00:26:31 +02:00
parent b3b068fe59
commit 34f4dbf77a
21 changed files with 1457 additions and 76 deletions

View file

@ -20,6 +20,7 @@
package main
type PointerButton int
type Key int
const (
PointerButtonLeft PointerButton = iota
@ -28,6 +29,16 @@ const (
PointerButtonLimit
)
const (
KeyVolumeMute Key = iota
KeyVolumeDown
KeyVolumeUp
KeyMediaPlayPause
KeyMediaPrevTrack
KeyMediaNextTrack
KeyLimit
)
type PluginInfo struct {
Name string
Init func() (Plugin, error)
@ -50,6 +61,7 @@ func (e UnsupportedPlatformError) Error() string {
type Plugin interface {
Close() error
KeyboardText(text string) error
KeyboardKey(key Key) error
PointerButton(button PointerButton, press bool) error
PointerMove(deltaX, deltaY int) error
PointerScroll(deltaHorizontal, deltaVertical int) error