Documentation ¶
Index ¶
- Constants
- func AddressToBytes(address Address) [4]byte
- func CheckError(err error)
- func DefaultScreen(display *Display) int
- func EncodeMessage(msg Message) []byte
- func FakeKeyEvent(display *Display, keycode uint, eventType int, delay int)
- func GetCursorPosition(event *XEvent) (int, int)
- func GetKeyCode(event *XEvent) uint
- func GetXEventType(event *XEvent) int
- func ReadAuthorizedKeys(autorizedKeysPath string) (map[string]RSAPubKey, []string)
- func XGrabKeyboard(display *Display, window Window)
- func XGrabPointer(display *Display, window Window)
- func XKeycodeToKeysym(display *Display, keycode uint) uint64
- func XKeysymToKeycode(display *Display, keysym uint64) uint
- func XKeysymToString(keysym uint64) string
- func XNextEvent(display *Display, event *XEvent)
- func XStringToKeysym(keyString string) uint64
- func XSync(display *Display)
- func XTestFakeButtonEvent(display *Display, keycode uint, eventType int, delay int)
- func XTestFakeMotionEvent(display *Display, screen int, x, y int, delay uint64)
- func XTestFakeRelativeMotionEvent(display *Display, x, y int, delay uint64)
- func XTestGrabControl(display *Display, onOff int)
- type AESCrypto
- type AESKey
- type Address
- type Device
- type Display
- type EncryptionType
- type Event
- type EventEntity
- type Input
- func (input *Input) ButtonAction(button EventEntity, event Event)
- func (input *Input) GetCursorPos() (int, int)
- func (input *Input) Init()
- func (input *Input) InputFromClient(message Message)
- func (input *Input) KeyboardButtonAction(button EventEntity, event Event)
- func (input *Input) MouseButtonAction(button EventEntity, event Event)
- func (input *Input) MouseMove(x, y int)
- func (input *Input) MouseScroll(lines int)
- func (input *Input) SetCursorPos(x, y int) uintptr
- type InternalMsg
- type Message
- type Output
- type Platform
- type RSACrypto
- func (rsaCrypto *RSACrypto) CreateEncodedSecret()
- func (rsaCrypto *RSACrypto) DecodeMessage(encodedMsg []byte, signiture []byte) Message
- func (rsaCrypto *RSACrypto) Decrypt(msg []byte) Message
- func (rsaCrypto *RSACrypto) EncodeMessage(msg Message) ([]byte, []byte)
- func (rsaCrypto *RSACrypto) Encrypt(msg Message) []byte
- func (rsaCrypto *RSACrypto) ReadSecret(publicKeyPath string, privateKeyPath string)
- type RSAPriKey
- type RSAPubKey
- type Screen
- type Secret
- type Window
- type XEvent
Constants ¶
View Source
const ( KeyPress = C.KeyPress KeyRelease = C.KeyRelease ButtonPress = C.ButtonPress ButtonRelease = C.ButtonRelease MotionNotify = C.MotionNotify ButtonPressMask = C.ButtonPressMask ButtonReleaseMask = C.ButtonReleaseMask PointerMotionMask = C.PointerMotionMask GrabModeAsync = C.GrabModeAsync None = C.None CurrentTime = C.CurrentTime True = C.True False = C.False )
Variables ¶
This section is empty.
Functions ¶
func AddressToBytes ¶
func CheckError ¶
func CheckError(err error)
func DefaultScreen ¶
func EncodeMessage ¶
func GetCursorPosition ¶
func GetKeyCode ¶
func GetXEventType ¶
func ReadAuthorizedKeys ¶
func XGrabKeyboard ¶
func XGrabPointer ¶
func XKeycodeToKeysym ¶
func XKeysymToKeycode ¶
func XKeysymToString ¶
func XNextEvent ¶
func XStringToKeysym ¶
func XTestFakeButtonEvent ¶
func XTestFakeMotionEvent ¶
func XTestGrabControl ¶
Types ¶
type AESCrypto ¶
type AESCrypto struct {
Key AESKey
}
func (*AESCrypto) CreateEncodedSecret ¶
func (*AESCrypto) ReadSecret ¶
type EventEntity ¶
type EventEntity byte
const ( MouseLeftButton EventEntity = iota MouseRightButton MouseMiddleButton MouseOptButton1 MouseOptButton2 MouseWheel MouseCursor KeyVolumeMute KeyVolumeUp KeyVolumeDown KeyMediaStop KeyMediaPause KeyMediaNext KeyMediaPrevious KeyEsc KeyWinCmd KeyLWinCmd KeyRWinCmd KeyAlt KeyLAlt KeyRAlt KeyCtrl KeyLCtrl KeyRCtrl KeyShift KeyLShift KeyRShift KeyTab KeyCaps KeyAltGr KeyEnter KeySpace KeyBackspace KeyDelete KeyArrowUp KeyArrowDown KeyArrowLeft KeyArrowRight KeyInsert KeyPrintScreen KeyScrollLock KeyPause KeyHome KeyEnd KeyPageUp KeyPageDown KeyF1 KeyF2 KeyF3 KeyF4 KeyF5 KeyF6 KeyF7 KeyF8 KeyF9 KeyF10 KeyF11 KeyF12 KeyTilde Key0 Key1 Key2 Key3 Key4 Key5 Key6 Key7 Key8 Key9 KeyA KeyB KeyC KeyD KeyE KeyF KeyG KeyH KeyI KeyJ KeyK KeyL KeyM KeyN KeyO KeyP KeyQ KeyR KeyS KeyT KeyU KeyV KeyW KeyX KeyY KeyZ KeyLeftBracket KeyBackSlash KeyRightBracket KeyMinus KeyEqual KeyApostrophe KeySemicolon KeyComma KeyPeriod KeySlash KeyNumLock KeyNumPad0 KeyNumPad1 KeyNumPad2 KeyNumPad3 KeyNumPad4 KeyNumPad5 KeyNumPad6 KeyNumPad7 KeyNumPad8 KeyNumPad9 KeyNumPadEnter KeyNumPadMul KeyNumPadDiv KeyNumPadAdd KeyNumPadSub KeyNumPadDecimal Client Server )
ISO keyboard layout is implemented for now
type Input ¶
type Input struct { Display *Display // contains filtered or unexported fields }
func (*Input) ButtonAction ¶
func (input *Input) ButtonAction(button EventEntity, event Event)
func (*Input) GetCursorPos ¶
func (*Input) InputFromClient ¶
func (*Input) KeyboardButtonAction ¶
func (input *Input) KeyboardButtonAction(button EventEntity, event Event)
func (*Input) MouseButtonAction ¶
func (input *Input) MouseButtonAction(button EventEntity, event Event)
func (*Input) MouseScroll ¶
func (*Input) SetCursorPos ¶
type InternalMsg ¶
type InternalMsg struct { EventEntity EventEntity Event Event ExtraInfo [4]int }
type Message ¶
type Message struct { SenderAddress [4]byte SenderId string SenderPlatform Platform ReceiverAddress [4]byte ReceiverId string ReceiverPlatform Platform Event Event EventEntity EventEntity ExtraInfo [4]int }
func DecodeMessage ¶
type Output ¶
type Output struct { Com chan InternalMsg // contains filtered or unexported fields }
func (*Output) OutputToServer ¶
func (output *Output) OutputToServer()
type RSACrypto ¶
type RSACrypto struct { PublicKeyComment string TargetPublicKey RSAPubKey // contains filtered or unexported fields }
func (*RSACrypto) CreateEncodedSecret ¶
func (rsaCrypto *RSACrypto) CreateEncodedSecret()
func (*RSACrypto) DecodeMessage ¶
func (*RSACrypto) EncodeMessage ¶
func (*RSACrypto) ReadSecret ¶
type RSAPriKey ¶
type RSAPriKey rsa.PrivateKey
type Window ¶
func XDefaultRootWindow ¶
Click to show internal directories.
Click to hide internal directories.