Documentation ¶
Index ¶
- Constants
- type Key
- type KeyBindHandler
- type Keyboard
- func (k *Keyboard) BindKeyEvent(eventName string, handler func(), keys ...*Key)
- func (k *Keyboard) GetKeyboardDevice() string
- func (k *Keyboard) Init() *keylogger.KeyLogger
- func (k *Keyboard) MainLoop()
- func (k *Keyboard) StartReadEvent() *chan keylogger.InputEvent
- func (k *Keyboard) StopReadEvent() error
- func (k *Keyboard) UnbindKeyEvent(eventName string)
- type KeyboardStatus
Constants ¶
View Source
const ( NUMLOCK = "NUMLOCK" Q = "Q" W = "W" E = "E" R = "R" T = "T" Y = "Y" U = "U" I = "I" O = "O" P = "P" A = "A" S = "S" D = "D" F = "F" G = "G" H = "H" J = "J" K = "K" L = "L" Z = "Z" X = "X" C = "C" V = "V" B = "B" N = "N" M = "M" UP = "UP" DOWN = "DOWN" LEFT = "LEFT" RIGHT = "RIGHT" PgUp = "PgUp" PgDn = "PgDn" KEY0 = "KEY0" KEY1 = "KEY1" KEY2 = "KEY2" KEY3 = "KEY3" KEY4 = "KEY4" KEY5 = "KEY5" KEY6 = "KEY6" KEY7 = "KEY7" KEY8 = "KEY8" KEY9 = "KEY9" BACKSPACE = "BACKSPACE" DELETE = "DELETE" INSERT = "INSERT" SPACE = "SPACE" HOME = "HOME" F1 = "F1" F2 = "F2" F3 = "F3" F4 = "F4" F5 = "F5" F6 = "F6" F7 = "F7" F8 = "F8" F9 = "F9" F10 = "F10" F11 = "F11" F12 = "F12" ESC = "ESC" CapsLock = "CapsLock" LSHIFT = "LSHIFT" RSHIFT = "RSHIFT" RCTRL = "RCTRL" LCTRL = "LCTRL" LALT = "LALT" RALT = "RALT" ENTER = "ENTER" TAB = "TAB" KeyOther = "KeyOther" Zkhz = "[" Zkhy = "]" )
映射
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keyboard ¶
type Keyboard struct { Keys map[string]*Key Status KeyboardStatus Logger *keylogger.KeyLogger Event *chan keylogger.InputEvent }
Keyboard 键盘
func (*Keyboard) BindKeyEvent ¶
BindKeyEvent 绑定按键事件
func (*Keyboard) GetKeyboardDevice ¶
GetKeyboardDevice 创建新的键盘设备
func (*Keyboard) StartReadEvent ¶
func (k *Keyboard) StartReadEvent() *chan keylogger.InputEvent
StartReadEvent 开始读取键盘事件
func (*Keyboard) UnbindKeyEvent ¶
UnbindKeyEvent 解绑按键事件
Click to show internal directories.
Click to hide internal directories.