desktop_actions_experimental_v1

Shortcuts for focused applications

This protocol allows a client to advertise some actions it can perform, and lets the compositor trigger them directly.

That directness of triggering actions is the main point of this protocol. Traditionally, the way an action is triggered is a keyboard combinations or a mouse motion. That is then interpreted by the application. In order to trigger such an action without a keyboard or a mouse, a keyboard or mouse must be emulated. That's an unnecessary difficulty affecting on-screen input methods. An application supporting desktop-actions lets the input method trigger shortcuts without the emulation baggage.

This protocol also helps avoid clashing shortcuts by letting the compositor detect what the application expects and by assigning another shortcut if it knows of any collisions.

This protocol can be implemented on its own if the compositor wishes to trigger the actions directly. It can also be accompanied by an "input" protocol to let other applications trigger actions, similar to how input methods submit text.

High-level overview of the interfaces:

The desktop_actions_manager exposes the bind_to_input_method request which binds a wl_keyboard to an xx_input_method. The resulting keyboard_filter object has the can be then used for intercepting keyboard events in accordance to input method needs.

This document adheres to the RFC 2119 when using words like "must", "should", "may", etc.

Warning! The protocol described in this file is currently in the experimental phase. Backwards incompatible major versions of the protocol are to be expected. Exposing this protocol without an opt-in mechanism is discouraged.

Advertise and trigger actions

Advertise and trigger actions executed by a seat.

The ability to input actions follows keyboard focus.

The application may ignore events which arrive while it is not holding keyboard focus.

set_available_universal_actions(available_actions: array)
Argument
Type
Description
available_actionsarray
available actions
announce the available actions

Announces the actions available to trigger.

Values set with this request are double-buffered. They will get applied on the next .commit request. They get reset to the initial value on every keyboard .enter event.

The initial value is an empty set: no actions are available.

Values in the available_actions array come from the .universal_action enum.

add_available_app_action(name: string, handle: uint, existing_trigger: string)
Argument
Type
Description
namestring
Human-readable description
handleuint
Handle to trigger the action
existing_triggerstring
Optional trigger description

Describes the default trigger(s) for this action. The compositor should attempt to use this trigger. The empty string means the trigger has no keyboard shortcut. Upon receiving, the compositor may not assign one.

If the string is not empty, it takes the form {format}:{trigger}, where {trigger} is a string defined by {format}.

Currently supported formats: "xdg", with trigger specified in https://specifications.freedesktop.org/shortcuts/latest/ . Formats not recognized by the compositor must be ignored.

Multiple suggestions may be present. Multiple suggestions must be separated by newline characters.

announce application-specific action

Adds an application-specific actions to the available list.

Conceptually, this adds an action to the compositor's "app_action" set.

Values set with this event are double-buffered. They will get applied on the next .commit request. The "app_action" set persists until the client exits.

The initial value is an empty set: no actions are available.

Argument
Value
Description
cut0
Cut into clipboard
copy0
Copy into clipboard
paste0
Paste from clipboard
paste_unformatted0
Paste from clipboard, specifically without formatting
paste_formatted0
Paste from clipboard, specifically trying to retain formatting
input_next0
Focus next intractive element
input_previous0
Focus previous interactive element
document_new0
New document
document_open0
Select a document to open
document_reload0
Reload current document
document_save0
Save current document
document_save_as0
Save current document into a new copy
document_close0
Close current document
document_previous0
Switch to previous document
document_next0
Switch to next document
document_share0
share current
search0
Begin search
search_previous0
Go to previous search result
search_next0
Go to next search result
undo0
Undo previous action
redo0
Repeat following action
confirm0
Ok, confirm, accept, yes
reject0
Reject, cancel, no
fullscreen_toggle0
Toggle fullscreen mode
fullscreen_enter0
Enter fullscreen mode
fullscreen_leave0
Enter fullscreen mode
magnify_reset0
Use default magnification level
magnify_bigger0
Zoom in
magnify_smaller0
Zoom out
navigate_back0
Select previous view or go back in hierarchy
navigate_forward0
Select next view, go forward in hierarchy, follow current link
start0
Start activity, execute, run
pause0
Stop activity, allowing to resume
stop0
Stop activity, without possibility to resume
details0
Display details, document properties
remove_selected0
Remove or delete selected item(s)
select_all0
Select all items
select_none0
Clear selection
select0
Select, mark item(s)
print0
Print document
insert0
Insert, insert here
menu0
menu
help0
View help
break0
break
Action that is not application-specific

This enum is for actions that are very often seen in different kinds of applications, with shortcuts ingrained into a collective hacker memory so deep they are almost standardized.


Compositor Support

No compositor support found

Copyright 2018 Mike Blumenkrantz Copyright 2018 Samsung Electronics Co., Ltd Copyright 2018 Red Hat Inc. Copyright 2025 DorotaC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.