Hyprland global shortcuts
此协议允许客户端注册可触发的操作,用作全局快捷键。
此对象是一个管理器,提供创建全局快捷键的请求接口。
register_shortcut(shortcut: new_id<hyprland_global_shortcut_v1>, id: string, app_id: string, description: string, trigger_description: string)
参数 | 类型 | 描述 |
|---|---|---|
| shortcut | new_id<hyprland_global_shortcut_v1> | |
| id | string | a unique id for the shortcut |
| app_id | string | the app_id of the application requesting the shortcut |
| description | string | user-readable text describing what the shortcut does. |
| trigger_description | string | user-readable text describing how to trigger the shortcut for the client to render. |
注册一个新的全局快捷键。
全局快捷键是匿名的,即应用不知道哪个按键会触发它。
快捷键的按键绑定由合成器处理。
如果 app_id + id 组合重复,将触发 already_taken 协议错误。
destroy()
由管理器创建的所有对象在调用其相应的销毁请求之前仍然有效。
error { already_taken }
参数 | 值 | 描述 |
|---|---|---|
| already_taken | 0 | app_id + id 组合已被注册 |
此对象表示一个单独的快捷键。
合成器支持
Cage | COSMIC | GameScope | Hyprland | Jay | KWin | Labwc | Louvre | Mir | Muffin | Mutter | niri | phoc | river | Sway | Treeland | Wayfire | Weston | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hyprland_global_shortcuts_manager_v1 | x | x | x | 1 | x | x | x | x | x | x | x | x | x | x | x | x | x | x |
Copyright
Copyright © 2022 Vaxry All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.