# class KGlobalAccel

###

Module | kdeui
Namespace |
Class | KGlobalAccel
Inherits | QObject

Configurable global shortcut support

KGlobalAccel allows you to have global accelerators that are independent of the focused window. Unlike regular shortcuts, the application's window does not need focus for them to be activated.

See also KKeyChooser

See also KKeyDialog

### methods

- KGlobalAccel ( )

  returns ctor
  Not implemented

  Creates a new KGlobalAccel object

- KGlobalAccel ( )

  returns dtor
  Not implemented

  Destructor

- allActionsForComponent (actionId)

  returns QList<QStringList>
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  actionId | QStringList |

  Return the full actionIds of all actions with global shortcuts for the main component specified by actionId. Only the the ComponentUnique part of actionId will be used; the other members of the actionId QStringList will be ignored.

- allMainComponents ( )

  returns QList<QStringList>
  KDE 4.1.0 and later only

  Return the unique and common names of all main components that have global shortcuts. The action strings of the returned actionId stringlists will be empty.

- findActionNameSystemwide (seq)

  returns QStringList
  static

  Argument | Type | Default
  --- | --- | ---
  seq | QKeySequence |

  Return the name of the action that uses the given key sequence. This applies to all actions with global shortcuts in any KDE application.

  See also promptStealShortcutSystemwide(), stealShorctutSystemwide()

- isEnabled ( )

  returns bool

  Checks whether the accelerators are enabled. Returns true if the KGlobalAccel is enabled

- overrideMainComponentData (componentData)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  componentData | KComponentData |

  Set the KComponentData for which to manipulate shortcuts. This is for exceptional situations, when you want to modify the shortcuts of another application as if they were yours. You cannot have your own working global shortcuts in a module/application using this special functionality. All global shortcuts of KActions will essentially be proxies. Be sure to set the default global shortcuts of the proxy KActions to the same as those on the receiving end. An example use case is the KControl Module for the window manager KWin, which has no own facility for users to change its global shortcuts.

  componentData - a KComponentData about the application for which you want to manipulate shortcuts.

- promptStealShortcutSystemwide (parent, actionIdentifier, seq)

  returns bool
  static

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |
  actionIdentifier | QStringList |
  seq | QKeySequence |

  Show a messagebox to inform the user that a global shorcut is already occupied, and ask to take it away from its current action. This is GUI only, so nothing will be actually changed.

  See also stealShorctutSystemwide()

- self ( )

  returns KGlobalAccel
  static

  Returns (and creates if necessary) the singleton instance

- setEnabled (enabled)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  enabled | bool |

  Enables or disables the KGlobalAccel

  enabled - true if the KGlobalAccel should be enabled, false if it should be disabled.

- stealShortcutSystemwide (seq)

  returns Nothing
  static

  Argument | Type | Default
  --- | --- | ---
  seq | QKeySequence |

  Take away the given shortcut from the named action it belongs to. This applies to all actions with global shortcuts in any KDE application.

  See also promptStealShortcutSystemwide()