KStandardShortcut

KDE 4.2 PyKDE API Reference

- KDE's Python API

# KStandardShortcut Namespace Reference

`from PyKDE4.kdeui.KStandardShortcut import *`

## Detailed Description

Convenient methods for access to the common accelerator keys in the key configuration. These are the standard keybindings that should be used in all KDE applications. They will be configurable, so do not hardcode the default behavior.

## Enumerations
StandardShortcut | { AccelNone, Open, New, Close, Save, Print, Quit, Undo, Redo, Cut, Copy, Paste, PasteSelection, SelectAll, Deselect, DeleteWordBack, DeleteWordForward, Find, FindNext, FindPrev, Replace, Home, Begin, End, Prior, Next, Up, Back, Forward, Reload, BeginningOfLine, EndOfLine, GotoLine, BackwardWord, ForwardWord, AddBookmark, ZoomIn, ZoomOut, FullScreen, ShowMenubar, TabNext, TabPrev, Help, WhatsThis, TextCompletion, PrevCompletion, NextCompletion, SubstringCompletion, RotateUp, RotateDown, OpenRecent, SaveAs, Revert, PrintPreview, Mail, Clear, ActualSize, FitToPage, FitToWidth, FitToHeight, Zoom, Goto, GotoPage, DocumentBack, DocumentForward, EditBookmarks, Spelling, ShowToolbar, ShowStatusbar, SaveOptions, KeyBindings, Preferences, ConfigureToolbars, ConfigureNotifications, TipofDay, ReportBug, SwitchApplicationLanguage, AboutApp, AboutKDE, StandardShortcutCount }
## Functions
KShortcut | addBookmark ()
KShortcut | back ()
KShortcut | backwardWord ()
KShortcut | begin ()
KShortcut | beginningOfLine ()
KShortcut | close ()
KShortcut | completion ()
KShortcut | copy ()
KShortcut | cut ()
KShortcut | deleteWordBack ()
KShortcut | deleteWordForward ()
KShortcut | end ()
KShortcut | endOfLine ()
KStandardShortcut.StandardShortcut | find (QKeySequence keySeq)
KStandardShortcut.StandardShortcut | find (QString keyName)
KShortcut | find ()
KShortcut | findNext ()
KShortcut | findPrev ()
KShortcut | forward ()
KShortcut | forwardWord ()
KShortcut | fullScreen ()
KShortcut | gotoLine ()
KShortcut | hardcodedDefaultShortcut (KStandardShortcut.StandardShortcut id)
KShortcut | help ()
KShortcut | home ()
KShortcut | insert ()
QString | label (KStandardShortcut.StandardShortcut id)
QString | name (KStandardShortcut.StandardShortcut id)
KShortcut | next ()
KShortcut | nextCompletion ()
KShortcut | open ()
KShortcut | openNew ()
KShortcut | paste ()
KShortcut | pasteSelection ()
KShortcut | prevCompletion ()
KShortcut | print_ ()
KShortcut | prior ()
KShortcut | quit ()
KShortcut | redo ()
KShortcut | reload ()
KShortcut | replace ()
KShortcut | rotateDown ()
KShortcut | rotateUp ()
KShortcut | save ()
| saveShortcut (KStandardShortcut.StandardShortcut id, KShortcut newShortcut)
KShortcut | selectAll ()
KShortcut | shortcut (KStandardShortcut.StandardShortcut id)
KShortcut | showMenubar ()
KShortcut | substringCompletion ()
KShortcut | tabNext ()
KShortcut | tabPrev ()
KShortcut | undo ()
KShortcut | up ()
QString | whatsThis (KStandardShortcut.StandardShortcut id)
KShortcut | whatsThis ()
KShortcut | zoomIn ()
KShortcut | zoomOut ()

## Enumeration Documentation

StandardShortcut

Defines the identifier of all standard accelerators.

Enumerator:

  AccelNone = 0 |
  Open |
  New |
  Close |
  Save |
  Print |
  Quit |
  Undo |
  Redo |
  Cut |
  Copy |
  Paste |
  PasteSelection |
  SelectAll |
  Deselect |
  DeleteWordBack |
  DeleteWordForward |
  Find |
  FindNext |
  FindPrev |
  Replace |
  Home |
  Begin |
  End |
  Prior |
  Next |
  Up |
  Back |
  Forward |
  Reload |
  BeginningOfLine |
  EndOfLine |
  GotoLine |
  BackwardWord |
  ForwardWord |
  AddBookmark |
  ZoomIn |
  ZoomOut |
  FullScreen |
  ShowMenubar |
  TabNext |
  TabPrev |
  Help |
  WhatsThis |
  TextCompletion |
  PrevCompletion |
  NextCompletion |
  SubstringCompletion |
  RotateUp |
  RotateDown |
  OpenRecent |
  SaveAs |
  Revert |
  PrintPreview |
  Mail |
  Clear |
  ActualSize |
  FitToPage |
  FitToWidth |
  FitToHeight |
  Zoom |
  Goto |
  GotoPage |
  DocumentBack |
  DocumentForward |
  EditBookmarks |
  Spelling |
  ShowToolbar |
  ShowStatusbar |
  SaveOptions |
  KeyBindings |
  Preferences |
  ConfigureToolbars |
  ConfigureNotifications |
  TipofDay |
  ReportBug |
  SwitchApplicationLanguage |
  AboutApp |
  AboutKDE |
  StandardShortcutCount |

## Function Documentation

KShortcut addBookmark | ( |  | self ) |

Add current page to bookmarks. Default: Ctrl+B

Returns:
  the shortcut of the standard accelerator

KShortcut back | ( |  | self ) |

Back. Default: Alt+Left

Returns:
  the shortcut of the standard accelerator

KShortcut backwardWord | ( |  | self ) |

BackwardWord. Default: Ctrl+Left

Returns:
  the shortcut of the standard accelerator

KShortcut begin | ( |  | self ) |

Goto beginning of the document. Default: Ctrl-Home

Returns:
  the shortcut of the standard accelerator

KShortcut beginningOfLine | ( |  | self ) |

Goto beginning of current line. Default: Home

Returns:
  the shortcut of the standard accelerator

KShortcut close | ( |  | self ) |

Close current document. Default: Ctrl-w

Returns:
  the shortcut of the standard accelerator

KShortcut completion | ( |  | self ) |

Complete text in input widgets. Default Ctrl+E

Returns:
  the shortcut of the standard accelerator

KShortcut copy | ( |  | self ) |

Copy selected area into the clipboard. Default: Ctrl-c

Returns:
  the shortcut of the standard accelerator

KShortcut cut | ( |  | self ) |

Cut selected area and store it in the clipboard. Default: Ctrl-x

Returns:
  the shortcut of the standard accelerator

KShortcut deleteWordBack | ( |  | self ) |

Delete a word back from mouse/cursor position. Default: Ctrl-Backspace

Returns:
  the shortcut of the standard accelerator

KShortcut deleteWordForward | ( |  | self ) |

Delete a word forward from mouse/cursor position. Default: Ctrl-Delete

Returns:
  the shortcut of the standard accelerator

KShortcut end | ( |  | self ) |

Goto end of the document. Default: Ctrl-End

Returns:
  the shortcut of the standard accelerator

KShortcut endOfLine | ( |  | self ) |

Goto end of current line. Default: End

Returns:
  the shortcut of the standard accelerator

KStandardShortcut.StandardShortcut find | ( | QKeySequence | keySeq
| ) |  |  |

Return the StandardShortcut id of the standard accel action which uses this key sequence, or AccelNone if none of them do. This is used by class KKeyChooser.

Parameters:

  | keySeq | the key sequence to search

Returns:
  the id of the standard accelerator, or AccelNone if there is none

KStandardShortcut.StandardShortcut find | ( | QString | keyName
| ) |  |  |

Return the StandardShortcut id of the standard accel action which has keyName as its name, or AccelNone if none of them do. This is used by class KKeyChooser.

Parameters:

  | keyName | the key sequence to search

Returns:
  the id of the standard accelerator, or AccelNone if there is none

KShortcut find | ( |  | self ) |

Find, search. Default: Ctrl-f

Returns:
  the shortcut of the standard accelerator

KShortcut findNext | ( |  | self ) |

Find/search next. Default: F3

Returns:
  the shortcut of the standard accelerator

KShortcut findPrev | ( |  | self ) |

Find/search previous. Default: Shift-F3

Returns:
  the shortcut of the standard accelerator

KShortcut forward | ( |  | self ) |

Forward. Default: ALT+Right

Returns:
  the shortcut of the standard accelerator

KShortcut forwardWord | ( |  | self ) |

ForwardWord. Default: Ctrl+Right

Returns:
  the shortcut of the standard accelerator

KShortcut fullScreen | ( |  | self ) |

Full Screen Mode. Default: Ctrl+Shift+F

Returns:
  the shortcut of the standard accelerator

KShortcut gotoLine | ( |  | self ) |

Go to line. Default: Ctrl+G

Returns:
  the shortcut of the standard accelerator

KShortcut hardcodedDefaultShortcut | ( | KStandardShortcut.StandardShortcut | id
| ) |  |  |

Returns the hardcoded default shortcut for id. This does not take into account the user's configuration.

Parameters:

  | id | the id of the accelerator

Returns:
  the default shortcut of the accelerator

KShortcut help | ( |  | self ) |

Help the user in the current situation. Default: F1

Returns:
  the shortcut of the standard accelerator

KShortcut home | ( |  | self ) |

Goto home page. Default: Alt-Home

Returns:
  the shortcut of the standard accelerator

KShortcut insert | ( |  | self ) |

Toggle insert/overwrite (with visual feedback, e.g. in the statusbar). Default: Insert

Returns:
  the shortcut of the standard accelerator

QString label | ( | KStandardShortcut.StandardShortcut | id
| ) |  |  |

Returns a localized label for user-visible display.

Parameters:

  | id | the id of the accelerator

Returns:
  a localized label for the accelerator

QString name | ( | KStandardShortcut.StandardShortcut | id
| ) |  |  |

Returns a unique name for the given accel.

Parameters:

  | id | the id of the accelerator

Returns:
  the unique name of the accelerator

KShortcut next | ( |  | self ) |

Scroll down one page. Default: Next

Returns:
  the shortcut of the standard accelerator

KShortcut nextCompletion | ( |  | self ) |

Iterate through a list when completion returns multiple items. Default: Ctrl+Down

Returns:
  the shortcut of the standard accelerator

KShortcut open | ( |  | self ) |

Open file. Default: Ctrl-o

Returns:
  the shortcut of the standard accelerator

KShortcut openNew | ( |  | self ) |

Create a new document (or whatever). Default: Ctrl-n

Returns:
  the shortcut of the standard accelerator

KShortcut paste | ( |  | self ) |

Paste contents of clipboard at mouse/cursor position. Default: Ctrl-v

Returns:
  the shortcut of the standard accelerator

KShortcut pasteSelection | ( |  | self ) |

Paste the selection at mouse/cursor position. Default: Ctrl-Shift-Insert

Returns:
  the shortcut of the standard accelerator

KShortcut prevCompletion | ( |  | self ) |

Iterate through a list when completion returns multiple items. Default: Ctrl+Up

Returns:
  the shortcut of the standard accelerator

KShortcut print_ | ( |  | self ) |

Print current document. Default: Ctrl-p

Returns:
  the shortcut of the standard accelerator

KShortcut prior | ( |  | self ) |

Scroll up one page. Default: Prior

Returns:
  the shortcut of the standard accelerator

KShortcut quit | ( |  | self ) |

Quit the program. Default: Ctrl-q

Returns:
  the shortcut of the standard accelerator

KShortcut redo | ( |  | self ) |

Redo. Default: Shift-Ctrl-z

Returns:
  the shortcut of the standard accelerator

KShortcut reload | ( |  | self ) |

Reload. Default: F5

Returns:
  the shortcut of the standard accelerator

KShortcut replace | ( |  | self ) |

Find and replace matches. Default: Ctrl-r

Returns:
  the shortcut of the standard accelerator

KShortcut rotateDown | ( |  | self ) |

Help users iterate through a list of entries. Default: Down

Returns:
  the shortcut of the standard accelerator

KShortcut rotateUp | ( |  | self ) |

Help users iterate through a list of entries. Default: Up

Returns:
  the shortcut of the standard accelerator

KShortcut save | ( |  | self ) |

Save current document. Default: Ctrl-s

Returns:
  the shortcut of the standard accelerator

saveShortcut | ( | KStandardShortcut.StandardShortcut | id,
|  | KShortcut | newShortcut
| ) |  |  |

Saves the new shortcut cut for standard accel id.

KShortcut selectAll | ( |  | self ) |

Reload. Default: Ctrl-A

Returns:
  the shortcut of the standard accelerator

KShortcut shortcut | ( | KStandardShortcut.StandardShortcut | id
| ) |  |  |

Returns the keybinding for accel. On X11, if QApplication was initialized with GUI disabled, the default keybinding will always be returned.

Parameters:

  | id | the id of the accelerator

KShortcut showMenubar | ( |  | self ) |

Show Menu Bar. Default: Ctrl-M

Returns:
  the shortcut of the standard accelerator

KShortcut substringCompletion | ( |  | self ) |

Find a string within another string or list of strings. Default: Ctrl-T

Returns:
  the shortcut of the standard accelerator

KShortcut tabNext | ( |  | self ) |

Next Tab. Default: Ctrl-<

Returns:
  the shortcut of the standard accelerator

KShortcut tabPrev | ( |  | self ) |

Previous Tab. Default: Ctrl->

Returns:
  the shortcut of the standard accelerator

KShortcut undo | ( |  | self ) |

Undo last operation. Default: Ctrl-z

Returns:
  the shortcut of the standard accelerator

KShortcut up | ( |  | self ) |

Up. Default: Alt+Up

Returns:
  the shortcut of the standard accelerator

QString whatsThis | ( | KStandardShortcut.StandardShortcut | id
| ) |  |  |

Returns an extended WhatsThis description for the given accelerator.

Parameters:

  | id | the id of the accelerator

Returns:
  a localized description of the accelerator

KShortcut whatsThis | ( |  | self ) |

What's This button. Default: Shift+F1

Returns:
  the shortcut of the standard accelerator

KShortcut zoomIn | ( |  | self ) |

Zoom in. Default: Ctrl-Plus

Returns:
  the shortcut of the standard accelerator

KShortcut zoomOut | ( |  | self ) |

Zoom out. Default: Ctrl-Minus

Returns:
  the shortcut of the standard accelerator