Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyEject = 0x92 // TODO(samthor): doesn't seem to work KeyF12 = 0x6F KeyF13 = 0x69 )
Variables ¶
View Source
var ( // ErrNoSyscallStat is an internal error that a syscall is not available. ErrNoSyscallStat = errors.New("no syscall.Stat_t available") // ErrInvalidUser indicates that the user could not be determined. ErrInvalidUser = errors.New("couldn't get username") )
Functions ¶
func ListenForKey ¶
ListenForKey listens globally for the specified keycode.
Types ¶
type Login ¶
Login describes a logged-in user on macOS, and when they logged in.
func CurrentLogin ¶
CurrentLogin returns the current logged-in user on macOS.
type LoginWatcher ¶
type LoginWatcher struct { Change chan Login // listen for logins and changems Errors chan error // listen for errors // contains filtered or unexported fields }
LoginWatcher watches for login change events.
func SubscribeLogin ¶
func SubscribeLogin() (*LoginWatcher, error)
SubscribeLogin subscribes to login change events and returns a LoginWatcher.
func (*LoginWatcher) Close ¶
func (lw *LoginWatcher) Close()
Close stops watching for login changes.
Click to show internal directories.
Click to hide internal directories.