.. _org.freedesktop.impl.portal.GlobalShortcuts:

===========================================
 Global Shortcuts
===========================================

-----------
Description
-----------

.. _org.freedesktop.impl.portal.GlobalShortcuts Description:

GlobalShortcuts portal backend interface

This portal lets applications register global shortcuts so they can
act regardless of the system state upon an input event.

This documentation describes version 1 of this interface.



.. _org.freedesktop.impl.portal.GlobalShortcuts Properties:

----------
Properties
----------

.. _org.freedesktop.impl.portal.GlobalShortcuts:version:

org.freedesktop.impl.portal.GlobalShortcuts:version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    version readable u




.. _org.freedesktop.impl.portal.GlobalShortcuts Methods:

-------
Methods
-------

.. _org.freedesktop.impl.portal.GlobalShortcuts.CreateSession:

org.freedesktop.impl.portal.GlobalShortcuts.CreateSession
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    CreateSession (
      IN handle o,
      IN session_handle o,
      IN app_id s,
      IN options a{sv},
      OUT response u,
      OUT results a{sv}
    )



Create a global shortcuts session.

There are currently no supported keys in the ``results`` vardict.



handle
  Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call

session_handle
  Object path for the ref:`org.freedesktop.impl.portal.Session` object representing the session being created

app_id
  App id of the application

options
  Vardict with optional further information. See :ref:`org.freedesktop.portal.GlobalShortcuts.CreateSession`

response
  Numeric Request response

results
  Vardict with the results of the call



.. _org.freedesktop.impl.portal.GlobalShortcuts.BindShortcuts:

org.freedesktop.impl.portal.GlobalShortcuts.BindShortcuts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    BindShortcuts (
      IN handle o,
      IN session_handle o,
      IN shortcuts a(sa{sv}),
      IN parent_window s,
      IN options a{sv},
      OUT response u,
      OUT results a{sv}
    )



Bind the shortcuts of this session. This will typically result the portal
presenting a dialog letting the user configure shortcut triggers.



handle
  Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call

session_handle
  Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session

shortcuts
  The identifier of the shortcuts we intend to register, empty for all shortcuts

parent_window
  Identifier for the application window, see :doc:`window-identifiers`

options
  

response
  

results
  Vardict with the results of the call



.. _org.freedesktop.impl.portal.GlobalShortcuts.ListShortcuts:

org.freedesktop.impl.portal.GlobalShortcuts.ListShortcuts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    ListShortcuts (
      IN handle o,
      IN session_handle o,
      OUT response u,
      OUT results a{sv}
    )



List shortcuts registered in the global shortcuts session.

The following results get returned in the ``results`` vardict:

* ``shortcuts`` (``a(sa{sv})``)

  A list of shortcuts.

  See the :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts` method for
  the list of supported properties of shortcuts.



handle
  Object path for the :ref:`org.freedesktop.impl.portal.Request` object representing this call

session_handle
  Object path for the :ref:`org.freedesktop.impl.portal.Session` object representing the session

response
  

results
  Vardict with the results of the call


.. _org.freedesktop.impl.portal.GlobalShortcuts Signals:

-------
Signals
-------

.. _org.freedesktop.impl.portal.GlobalShortcuts::Activated:

org.freedesktop.impl.portal.GlobalShortcuts::Activated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    Activated (
      session_handle o,
      shortcut_id s,
      timestamp t,
      options a{sv}
    )



Emitted when a shortcut is activated.



session_handle
  Session that requested the shortcut

shortcut_id
  the application-provided ID for the notification

timestamp
  the time of activation with millisecond granularity, with an undefined base.

options
  Vardict with optional further information



.. _org.freedesktop.impl.portal.GlobalShortcuts::Deactivated:

org.freedesktop.impl.portal.GlobalShortcuts::Deactivated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    Deactivated (
      session_handle o,
      shortcut_id s,
      timestamp t,
      options a{sv}
    )



Emitted when a shortcut is deactivated.



session_handle
  Session that requested the shortcut

shortcut_id
  the application-provided ID for the notification

timestamp
  the time of deactivation with millisecond granularity, with an undefined base.

options
  Vardict with optional further information



.. _org.freedesktop.impl.portal.GlobalShortcuts::ShortcutsChanged:

org.freedesktop.impl.portal.GlobalShortcuts::ShortcutsChanged
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

    ShortcutsChanged (
      session_handle o,
      shortcuts a(sa{sv})
    )



Emitted when shortcuts are changed.

The results get returned via the :ref:`org.freedesktop.portal.Request::Response`
signal. See :ref:`org.freedesktop.portal.GlobalShortcuts.BindShortcuts` for the
list of supported properties of shortcuts.



session_handle
  Session that requested the shortcut

shortcuts
  The list of changed shortcuts


