Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 3.6% on proxy.golang.org
Top 1.2% dependent packages on proxy.golang.org
Top 1.4% dependent repos on proxy.golang.org
Top 7.4% forks on proxy.golang.org

proxy.golang.org : golang.design/x/hotkey

Package hotkey provides the basic facility to register a system-level global hotkey shortcut so that an application can be notified if a user triggers the desired hotkey. A hotkey must be a combination of modifiers and a single key. Note platform specific details: On macOS, due to the OS restriction (other platforms does not have this restriction), hotkey events must be handled on the "main thread". Therefore, in order to use this package properly, one must start an OS main event loop on the main thread, For self-contained applications, using mainthread package. is possible. It is uncessary or applications based on other GUI frameworks, such as fyne, ebiten, or Gio. See the "examples" for more examples. On Linux (X11), when AutoRepeat is enabled in the X server, the Keyup is triggered automatically and continuously as Keydown continues. On Linux (X11), some keys may be mapped to multiple Mod keys. To correctly register the key combination, one must use the correct underlying keycode combination. For example, a regular Ctrl+Alt+S might be registered as: Ctrl+Mod2+Mod4+S. If this package did not include a desired key, one can always provide the keycode to the API. For example, if a key code is 0x15, then the corresponding key is `hotkey.Key(0x15)`. THe following is a minimum example:

Registry - Source - Documentation - JSON
purl: pkg:golang/golang.design/x/hotkey
Keywords: hotkey, hotkeys, keyboard, linux, macos, shortcut, shortcuts, windows, x11
License: MIT
Latest release: over 1 year ago
First release: about 3 years ago
Namespace: golang.design/x
Dependent packages: 17
Dependent repositories: 15
Stars: 175 on GitHub
Forks: 8 on GitHub
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/changkun, https://github.com/sponsors/golang-design
Last synced: 20 days ago

    Loading...
    Readme
    Loading...