Documentation ¶
Index ¶
- Constants
- type AudioController
- type CapsLockState
- type Config
- type Controller
- type Daemon
- type DisplayController
- type ErrInvalidActionCmd
- type ErrInvalidShortcutType
- type ErrIsNil
- type ErrShortcutNotFound
- type KbdLightController
- type Manager
- func (m *Manager) Add(name, action, keystroke string) (ret0 string, ret1 bool, busErr *dbus.Error)
- func (m *Manager) AddCustomShortcut(name, action, keystroke string) (id string, type0 int32, busErr *dbus.Error)
- func (m *Manager) AddShortcutKeystroke(id string, type0 int32, keystroke string) *dbus.Error
- func (m *Manager) CheckAvaliable(keystroke string) (available bool, shortcut string, busErr *dbus.Error)
- func (m *Manager) ClearShortcutKeystrokes(id string, type0 int32) *dbus.Error
- func (m *Manager) Delete(id string, type0 int32) *dbus.Error
- func (m *Manager) DeleteCustomShortcut(id string) *dbus.Error
- func (m *Manager) DeleteShortcutKeystroke(id string, type0 int32, keystroke string) *dbus.Error
- func (m *Manager) Disable(id string, type0 int32) *dbus.Error
- func (m *Manager) EnableSystemShortcut(shortcuts []string, enabled bool, isPersistent bool) *dbus.Error
- func (m *Manager) GetCapsLockState() (state int32, busErr *dbus.Error)
- func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods
- func (*Manager) GetInterfaceName() string
- func (m *Manager) GetShortcut(id string, type0 int32) (shortcut string, busErr *dbus.Error)
- func (m *Manager) GrabScreen() *dbus.Error
- func (m *Manager) List() (shortcuts string, busErr *dbus.Error)
- func (m *Manager) ListAllShortcuts() (shortcuts string, busErr *dbus.Error)
- func (m *Manager) ListShortcutsByType(type0 int32) (shortcuts string, busErr *dbus.Error)
- func (m *Manager) LookupConflictingShortcut(keystroke string) (shortcut string, busErr *dbus.Error)
- func (m *Manager) ModifiedAccel(id string, type0 int32, keystroke string, add bool) (ret0 bool, ret1 string, busErr *dbus.Error)
- func (m *Manager) ModifyCustomShortcut(id, name, cmd, keystroke string) *dbus.Error
- func (m *Manager) Query(id string, type0 int32) (shortcut string, busErr *dbus.Error)
- func (m *Manager) Reset() *dbus.Error
- func (m *Manager) SearchShortcuts(query string) (shortcuts string, busErr *dbus.Error)
- func (m *Manager) SelectKeystroke() *dbus.Error
- func (m *Manager) SetCapsLockState(state int32) *dbus.Error
- func (m *Manager) SetNumLockState(state int32) *dbus.Error
- type MediaPlayerController
- type NumLockState
- type OsdBrightnessState
- type OsdVolumeState
- type SKLState
- type SpecialKeycodeMapKey
- type TouchPadController
Constants ¶
const ( CapslockKey = 58 NumlockKey = 69 KeyPress = 1 )
const ( DSettingsAppID = "org.deepin.dde.daemon" DSettingsKeyBindingName = "org.deepin.dde.daemon.keybinding" DSettingsKeyWirelessControlEnable = "wirelessControlEnable" DSettingsKeyNeedXrandrQDevices = "need-xrandr-q-devices" DSettingsKeyDeviceManagerControlEnable = "deviceManagerControlEnable" )
const ( KeyType = "Type" KeyVersion = "Version" KeyName = "Name" KeyGenericName = "GenericName" KeyNoDisplay = "NoDisplay" KeyIcon = "Icon" KeyExec = "Exec" KeyPath = "Path" KeyTerminal = "Terminal" KeyMimeType = "MimeType" KeyActions = "Actions" )
const ( KEY_TOUCHPAD_TOGGLE = 0x212 KEY_TOUCHPAD_ON = 0x213 KEY_TOUCHPAD_OFF = 0x214 KEY_POWER = 116 KEY_FN_ESC = 0x1d1 KEY_MICMUTE = 248 KEY_SETUP = 141 KEY_SCREENLOCK = 152 KEY_CYCLEWINDOWS = 154 KEY_MODE = 0x175 KEY_KBDILLUMTOGGLE = 228 KEY_RFKILL = 247 KEY_UNKNOWN = 240 KEY_CAMERA = 212 )
按键码 https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h nolint
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
CapsLockState 大小写锁定键状态
const ( CapsLockOff CapsLockState = iota // 关闭,默认输入小写字母 CapsLockOn // 开启,默认输入大写字母 CapsLockUnknown // 未知,出错 )
type Controller ¶
type Daemon ¶
type Daemon struct { *loader.ModuleBase // contains filtered or unexported fields }
func (*Daemon) GetDependencies ¶
type DisplayController ¶
type DisplayController struct {
// contains filtered or unexported fields
}
func NewDisplayController ¶
func NewDisplayController(backlightHelper backlight.Backlight, sessionConn *dbus.Conn, m *Manager) *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 ErrShortcutNotFound ¶
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"` DisabledSystemShortcutsList strv.Strv // contains filtered or unexported fields }
func (*Manager) Add ¶
Add add custom shortcut
name: the name action: the command line keystroke: the keystroke ret0: "" ret1: false ret2: error
func (*Manager) AddCustomShortcut ¶
func (*Manager) AddShortcutKeystroke ¶
func (*Manager) CheckAvaliable ¶
func (m *Manager) CheckAvaliable(keystroke string) (available bool, shortcut string, busErr *dbus.Error)
CheckAvaliable 检查快捷键序列是否可用 返回值1 是否可用; 返回值2 与之冲突的快捷键的详细信息,是JSON字符串。如果没有冲突,则为空字符串。
func (*Manager) ClearShortcutKeystrokes ¶
func (*Manager) Delete ¶
Delete delete shortcut by id and type
id: the specail id ty: the special type ret0: error info
func (*Manager) DeleteCustomShortcut ¶
func (*Manager) DeleteShortcutKeystroke ¶
func (*Manager) EnableSystemShortcut ¶
func (*Manager) GetCapsLockState ¶
func (*Manager) GetExportedMethods ¶
func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods
func (*Manager) GetInterfaceName ¶
func (*Manager) GetShortcut ¶
func (*Manager) GrabScreen ¶
func (m *Manager) GrabScreen() *dbus.Error
GrabScreen grab screen for getting the key pressed
func (*Manager) ListAllShortcuts ¶
func (*Manager) ListShortcutsByType ¶
func (*Manager) LookupConflictingShortcut ¶
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 ¶
ModifyCustomShortcut modify custom shortcut
id: shortcut id name: new name cmd: new commandline keystroke: new keystroke
func (*Manager) SearchShortcuts ¶
func (*Manager) SelectKeystroke ¶
func (m *Manager) SelectKeystroke() *dbus.Error
func (*Manager) SetCapsLockState ¶
func (*Manager) SetNumLockState ¶
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
NumLockState 数字锁定键状态
const ( NumLockOff NumLockState = iota // 关闭,不能输入数字,是方向键 NumLockOn // 开启,能输入数字 NumLockUnknown // 未知,出错 )
func (NumLockState) String ¶
func (s NumLockState) String() string
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 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
Source Files ¶
- audio_controller.go
- config.go
- daemon.go
- display_controller.go
- exported_methods_auto.go
- huawei_mic.go
- kbd_light_controller.go
- lock_state.go
- manager.go
- manager_handlers.go
- manager_ifc.go
- manager_ifc_deprecated.go
- media_player_controller.go
- select_keystroke.go
- special_keycode.go
- touchpad_controller.go
- utils.go