add multimedia keys
This commit is contained in:
parent
b3b068fe59
commit
34f4dbf77a
21 changed files with 1457 additions and 76 deletions
12
plugin.go
12
plugin.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue