========================= Type deai.plugin.xorg:Key ========================= .. lua:module:: deai.plugin.xorg.Key See :lua:attr:`Connection.key ` for more information about this type Methods ========== .. list-table:: :header-rows: 0 * - :lua:meth:`new(modifiers, key, intercept) ` - Add a new key binding .. lua:method:: new(modifiers, key, intercept) -> Binding :rtype: :lua:mod:`Binding ` :param modifiers: the modifier keys, valid ones are: mod1~5, shift, control, alt. :type modifiers: [string] :type key: string :param key: :param intercept: whether the key press event will be passed on. If true, deai will intercept the key press, otherwise it will behave like a normal key press. If multiple bindings are created for the same key combination, then the key will be intercepted if any of the bindings have intercept enabled. :type intercept: bool Add a new key binding Create a new event source that emits a signal when a given key binding is pressed or released.