keybinding

package
v0.0.0-...-520a03a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEY_TOUCHPAD_TOGGLE = 0x212
	KEY_POWER           = 116
)

按键码 https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h nolint

View Source
const (
	MODIFY_NONE uint32 = 0
	MODIFY_CTRL uint32 = 1 << iota
	MODIFY_SHIFT
	MODIFY_ALT
	MODIFY_SUPER
)

按键修饰

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioController

type AudioController struct {
	// contains filtered or unexported fields
}

func NewAudioController

func NewAudioController(sessionConn *dbus.Conn,
	backlightHelper *backlight.Backlight) *AudioController

func (*AudioController) Destroy

func (c *AudioController) Destroy()

func (*AudioController) ExecCmd

func (c *AudioController) ExecCmd(cmd ActionCmd) error

func (*AudioController) Name

func (*AudioController) Name() string

type CapsLockState

type CapsLockState uint
const (
	CapsLockOff CapsLockState = iota
	CapsLockOn
	CapsLockUnknown
)

type Config

type Config struct {
	HandleTouchPadToggle bool
}

type Controller

type Controller interface {
	ExecCmd(cmd ActionCmd) error
	Name() string
}

type Daemon

type Daemon struct {
	*loader.ModuleBase
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(logger *log.Logger) *Daemon

func (*Daemon) GetDependencies

func (*Daemon) GetDependencies() []string

func (*Daemon) Start

func (d *Daemon) Start() error

func (*Daemon) Stop

func (d *Daemon) Stop() error

func (*Daemon) WaitEnable

func (d *Daemon) WaitEnable()

type DisplayController

type DisplayController struct {
	// contains filtered or unexported fields
}

func NewDisplayController

func NewDisplayController(backlightHelper *backlight.Backlight, sessionConn *dbus.Conn) *DisplayController

func (*DisplayController) ExecCmd

func (c *DisplayController) ExecCmd(cmd ActionCmd) error

func (*DisplayController) Name

func (*DisplayController) Name() string

type ErrInvalidActionCmd

type ErrInvalidActionCmd struct {
	Cmd ActionCmd
}

func (ErrInvalidActionCmd) Error

func (err ErrInvalidActionCmd) Error() string

type ErrInvalidShortcutType

type ErrInvalidShortcutType struct {
	Type int32
}

func (ErrInvalidShortcutType) Error

func (err ErrInvalidShortcutType) Error() string

type ErrIsNil

type ErrIsNil struct {
	Name string
}

func (ErrIsNil) Error

func (err ErrIsNil) Error() string

type ErrShortcutNotFound

type ErrShortcutNotFound struct {
	Id   string
	Type int32
}

func (ErrShortcutNotFound) Error

func (err ErrShortcutNotFound) Error() string

type KbdLightController

type KbdLightController struct {
	// contains filtered or unexported fields
}

func NewKbdLightController

func NewKbdLightController(backlightHelper *backlight.Backlight) *KbdLightController

func (*KbdLightController) ExecCmd

func (c *KbdLightController) ExecCmd(cmd ActionCmd) error

func (*KbdLightController) Name

func (c *KbdLightController) Name() string

type Manager

type Manager struct {

	// properties
	NumLockState         gsprop.Enum
	ShortcutSwitchLayout gsprop.Uint `prop:"access:rw"`
	// contains filtered or unexported fields
}

func (*Manager) Add

func (m *Manager) Add(name, action, keystroke string) (ret0 string, ret1 bool, busErr *dbus.Error)

Add add custom shortcut

name: the name action: the command line keystroke: the keystroke ret0: "" ret1: false ret2: error

func (*Manager) AddCustomShortcut

func (m *Manager) AddCustomShortcut(name, action, keystroke string) (id string,
	type0 int32, busErr *dbus.Error)

func (*Manager) AddShortcutKeystroke

func (m *Manager) AddShortcutKeystroke(id string, type0 int32, keystroke string) *dbus.Error

func (*Manager) CheckAvaliable

func (m *Manager) CheckAvaliable(keystroke string) (available bool, shortcut string, busErr *dbus.Error)

CheckAvaliable 检查快捷键序列是否可用 返回值1 是否可用; 返回值2 与之冲突的快捷键的详细信息,是JSON字符串。如果没有冲突,则为空字符串。

func (*Manager) ClearShortcutKeystrokes

func (m *Manager) ClearShortcutKeystrokes(id string, type0 int32) *dbus.Error

func (*Manager) Delete

func (m *Manager) Delete(id string, type0 int32) *dbus.Error

Delete delete shortcut by id and type

id: the specail id ty: the special type ret0: error info

func (*Manager) DeleteCustomShortcut

func (m *Manager) DeleteCustomShortcut(id string) *dbus.Error

func (*Manager) DeleteShortcutKeystroke

func (m *Manager) DeleteShortcutKeystroke(id string, type0 int32, keystroke string) *dbus.Error

func (*Manager) Disable

func (m *Manager) Disable(id string, type0 int32) *dbus.Error

Disable cancel the shortcut

func (*Manager) GetCapsLockState

func (m *Manager) GetCapsLockState() (state int32, busErr *dbus.Error)

func (*Manager) GetExportedMethods

func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods

func (*Manager) GetInterfaceName

func (*Manager) GetInterfaceName() string

func (*Manager) GetShortcut

func (m *Manager) GetShortcut(id string, type0 int32) (shortcut string, busErr *dbus.Error)

func (*Manager) GrabScreen

func (m *Manager) GrabScreen() *dbus.Error

GrabScreen grab screen for getting the key pressed

func (*Manager) List

func (m *Manager) List() (shortcuts string, busErr *dbus.Error)

List list all shortcut

func (*Manager) ListAllShortcuts

func (m *Manager) ListAllShortcuts() (shortcuts string, busErr *dbus.Error)

func (*Manager) ListShortcutsByType

func (m *Manager) ListShortcutsByType(type0 int32) (shortcuts string, busErr *dbus.Error)

func (*Manager) LookupConflictingShortcut

func (m *Manager) LookupConflictingShortcut(keystroke string) (shortcut string, busErr *dbus.Error)

func (*Manager) ModifiedAccel

func (m *Manager) ModifiedAccel(id string, type0 int32, keystroke string, add bool) (ret0 bool, ret1 string,
	busErr *dbus.Error)

ModifiedAccel modify shortcut keystroke

id: the special id ty: the special type keystroke: new keystroke add: if true, add keystroke for the special id; else delete it ret0: always equal false ret1: always equal "" ret2: error

func (*Manager) ModifyCustomShortcut

func (m *Manager) ModifyCustomShortcut(id, name, cmd, keystroke string) *dbus.Error

ModifyCustomShortcut modify custom shortcut

id: shortcut id name: new name cmd: new commandline keystroke: new keystroke

func (*Manager) Query

func (m *Manager) Query(id string, type0 int32) (shortcut string, busErr *dbus.Error)

Query query shortcut detail info by id and type

func (*Manager) Reset

func (m *Manager) Reset() *dbus.Error

Reset reset all shortcut

func (*Manager) SearchShortcuts

func (m *Manager) SearchShortcuts(query string) (shortcuts string, busErr *dbus.Error)

func (*Manager) SelectKeystroke

func (m *Manager) SelectKeystroke() *dbus.Error

func (*Manager) SetCapsLockState

func (m *Manager) SetCapsLockState(state int32) *dbus.Error

func (*Manager) SetNumLockState

func (m *Manager) SetNumLockState(state int32) *dbus.Error

type MediaPlayerController

type MediaPlayerController struct {
	// contains filtered or unexported fields
}

func NewMediaPlayerController

func NewMediaPlayerController(systemSigLoop *dbusutil.SignalLoop,
	sessionConn *dbus.Conn) *MediaPlayerController

func (*MediaPlayerController) Destroy

func (c *MediaPlayerController) Destroy()

func (*MediaPlayerController) ExecCmd

func (c *MediaPlayerController) ExecCmd(cmd ActionCmd) error

func (*MediaPlayerController) Name

func (c *MediaPlayerController) Name() string

type NumLockState

type NumLockState uint
const (
	NumLockOff NumLockState = iota
	NumLockOn
	NumLockUnknown
)

type OsdBrightnessState

type OsdBrightnessState int32
const (
	BrightnessAdjustEnable OsdBrightnessState = iota
	BrightnessAdjustForbidden
	BrightnessAdjustHidden
)

Osd亮度调节控制

type OsdVolumeState

type OsdVolumeState int32
const (
	VolumeAdjustEnable OsdVolumeState = iota
	VolumeAdjustForbidden
	VolumeAdjustHidden
)

Osd音量调节控制

type SKLState

type SKLState uint

SKLState Switch keyboard Layout state

const (
	SKLStateNone SKLState = iota
	SKLStateWait
	SKLStateOSDShown
)

type SpecialKeycodeMapKey

type SpecialKeycodeMapKey struct {
	// contains filtered or unexported fields
}

type TouchPadController

type TouchPadController struct {
	// contains filtered or unexported fields
}

func NewTouchPadController

func NewTouchPadController(sessionConn *dbus.Conn) *TouchPadController

func (*TouchPadController) ExecCmd

func (c *TouchPadController) ExecCmd(cmd ActionCmd) error

func (*TouchPadController) Name

func (*TouchPadController) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL