mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Add Xorg modifiers (#57)
* implement additional modifiers to xorg. * xorg modifiers to API. * update modifiers api & add ws. * scroll pos rename to delta and add ctrl key.
This commit is contained in:
@ -25,13 +25,19 @@ func (s ScreenSize) String() string {
|
||||
}
|
||||
|
||||
type KeyboardModifiers struct {
|
||||
NumLock *bool
|
||||
CapsLock *bool
|
||||
Shift *bool `json:"shift"`
|
||||
CapsLock *bool `json:"capslock"`
|
||||
Control *bool `json:"control"`
|
||||
Alt *bool `json:"alt"`
|
||||
NumLock *bool `json:"numlock"`
|
||||
Meta *bool `json:"meta"`
|
||||
Super *bool `json:"super"`
|
||||
AltGr *bool `json:"altgr"`
|
||||
}
|
||||
|
||||
type KeyboardMap struct {
|
||||
Layout string
|
||||
Variant string
|
||||
Layout string `json:"layout"`
|
||||
Variant string `json:"variant"`
|
||||
}
|
||||
|
||||
type ClipboardText struct {
|
||||
@ -48,7 +54,7 @@ type DesktopManager interface {
|
||||
// xorg
|
||||
Move(x, y int)
|
||||
GetCursorPosition() (int, int)
|
||||
Scroll(x, y int)
|
||||
Scroll(deltaX, deltaY int, controlKey bool)
|
||||
ButtonDown(code uint32) error
|
||||
KeyDown(code uint32) error
|
||||
ButtonUp(code uint32) error
|
||||
|
@ -115,6 +115,16 @@ type ControlHost struct {
|
||||
HostID string `json:"host_id,omitempty"`
|
||||
}
|
||||
|
||||
type ControlScroll struct {
|
||||
// TOOD: remove this once the client is fixed
|
||||
X int `json:"x"`
|
||||
Y int `json:"y"`
|
||||
|
||||
DeltaX int `json:"delta_x"`
|
||||
DeltaY int `json:"delta_y"`
|
||||
ControlKey bool `json:"control_key"`
|
||||
}
|
||||
|
||||
type ControlPos struct {
|
||||
X int `json:"x"`
|
||||
Y int `json:"y"`
|
||||
@ -159,13 +169,11 @@ type ClipboardData struct {
|
||||
/////////////////////////////
|
||||
|
||||
type KeyboardMap struct {
|
||||
Layout string `json:"layout"`
|
||||
Variant string `json:"variant"`
|
||||
types.KeyboardMap
|
||||
}
|
||||
|
||||
type KeyboardModifiers struct {
|
||||
CapsLock *bool `json:"capslock"`
|
||||
NumLock *bool `json:"numlock"`
|
||||
types.KeyboardModifiers
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
|
Reference in New Issue
Block a user