• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

KStdAccel Namespace Reference

Convenient methods for access to the common accelerator keys in the key configuration. More...


Classes

class  ShortcutList
 KShortcutList implementation that accesses KStdAccel actions. More...

Enumerations

enum  StdAccel {
  AccelNone, Open, New, Close,
  Save, Print, Quit, Undo,
  Redo, Cut, Copy, Paste,
  SelectAll, Deselect, DeleteWordBack, DeleteWordForward,
  Find, FindNext, FindPrev, Replace,
  Home, End, Prior, Next,
  GotoLine, AddBookmark, ZoomIn, ZoomOut,
  Up, Back, Forward, Reload,
  PopupMenuContext, ShowMenubar, Help, WhatsThis,
  TextCompletion, PrevCompletion, NextCompletion, SubstringCompletion,
  RotateUp, RotateDown, TabNext, TabPrev,
  FullScreen, BackwardWord, ForwardWord, BeginningOfLine,
  EndOfLine, PasteSelection, WhatThis = WhatsThis
}

Functions

QString action (StdAccel id) KDE_DEPRECATED
const KShortcut & addBookmark ()
const KShortcut & back ()
const KShortcut & backwardWord ()
const KShortcut & beginningOfLine ()
const KShortcut & close ()
const KShortcut & completion ()
const KShortcut & copy ()
const KShortcut & cut ()
int defaultKey (StdAccel accel) KDE_DEPRECATED
const KShortcut & deleteWordBack ()
const KShortcut & deleteWordForward ()
QString description (StdAccel id) KDE_DEPRECATED
const KShortcut & end ()
const KShortcut & endOfLine ()
const KShortcut & find ()
const KShortcut & findNext ()
const KShortcut & findPrev ()
StdAccel findStdAccel (const KKeySequence &keySeq)
const KShortcut & forward ()
const KShortcut & forwardWord ()
const KShortcut & fullScreen ()
const KShortcut & gotoLine ()
const KShortcut & help ()
const KShortcut & home ()
static KStdAccelInfo * infoPtr (StdAccel id)
static void initialize (StdAccel id)
const KShortcut & insert ()
bool isEqual (const QKeyEvent *pEvent, int keyQt) KDE_DEPRECATED
int key (StdAccel) KDE_DEPRECATED
QString label (StdAccel id)
QString name (StdAccel id)
const KShortcut & next ()
const KShortcut & nextCompletion ()
const KShortcut & open ()
const KShortcut & openNew ()
const KShortcut & paste ()
const KShortcut & pasteSelection ()
const KShortcut & popupMenuContext ()
const KShortcut & prevCompletion ()
const KShortcut & print ()
const KShortcut & prior ()
const KShortcut & quit ()
const KShortcut & redo ()
const KShortcut & reload ()
const KShortcut & replace ()
const KShortcut & rotateDown ()
const KShortcut & rotateUp ()
const KShortcut & save ()
const KShortcut & selectAll ()
const KShortcut & shortcut (StdAccel id)
KShortcut shortcutDefault (StdAccel id)
KShortcut shortcutDefault3 (StdAccel id)
KShortcut shortcutDefault4 (StdAccel id)
const KShortcut & showMenubar ()
const KShortcut & substringCompletion ()
const KShortcut & tabNext ()
const KShortcut & tabPrev ()
const KShortcut & undo ()
const KShortcut & up ()
QString whatsThis (StdAccel id)
const KShortcut & whatsThis ()
const KShortcut & zoomIn ()
const KShortcut & zoomOut ()

Variables

static KStdAccelInfo g_infoStdAccel []
QString whatsThis (StdAccel)

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.

If you want real configurable keybindings in your applications, please checkout the class KAccel in kaccel.h

See also:
KAccelShortcutList


Enumeration Type Documentation

enum KStdAccel::StdAccel

Defines the identifier of all standard accelerators.

Enumerator:
AccelNone 
Open 
New 
Close 
Save 
Print 
Quit 
Undo 
Redo 
Cut 
Copy 
Paste 
SelectAll 
Deselect 
DeleteWordBack 
DeleteWordForward 
Find 
FindNext 
FindPrev 
Replace 
Home 
End 
Prior 
Next 
GotoLine 
AddBookmark 
ZoomIn 
ZoomOut 
Up 
Back 
Forward 
Reload 
PopupMenuContext 
ShowMenubar 
Help 
WhatsThis 
TextCompletion 
PrevCompletion 
NextCompletion 
SubstringCompletion 
RotateUp 
RotateDown 
TabNext 
Since:
3.2
TabPrev 
Since:
3.2
FullScreen 
Since:
3.2
BackwardWord 
Since:
3.3
ForwardWord 
Since:
3.3
BeginningOfLine 
Since:
3.3
EndOfLine 
Since:
3.3
PasteSelection 
Since:
3.4
WhatThis 

Definition at line 47 of file kstdaccel.h.


Function Documentation

QString KStdAccel::action ( StdAccel  id  ) 

Deprecated:
Obsolete. Use name(). Returns a string representation for accel.

Definition at line 379 of file kstdaccel.cpp.

const KShortcut & KStdAccel::addBookmark (  ) 

Add current page to bookmarks.

Default: Ctrl+B

Returns:
the shortcut of the standard accelerator

Definition at line 297 of file kstdaccel.cpp.

const KShortcut & KStdAccel::back (  ) 

Back.

Default: Alt+Left

Returns:
the shortcut of the standard accelerator

Definition at line 315 of file kstdaccel.cpp.

const KShortcut & KStdAccel::backwardWord (  ) 

BackwardWord.

Default: Ctrl+Left

Returns:
the shortcut of the standard accelerator
Since:
3.3

Definition at line 294 of file kstdaccel.cpp.

const KShortcut & KStdAccel::beginningOfLine (  ) 

Goto beginning of current line.

Default: Home

Returns:
the shortcut of the standard accelerator
Since:
3.3

Definition at line 290 of file kstdaccel.cpp.

const KShortcut & KStdAccel::close (  ) 

Close current document.

Default: Ctrl-w

Returns:
the shortcut of the standard accelerator

Definition at line 272 of file kstdaccel.cpp.

const KShortcut & KStdAccel::completion (  ) 

Complete text in input widgets.

Default Ctrl+E

Returns:
the shortcut of the standard accelerator

Definition at line 304 of file kstdaccel.cpp.

const KShortcut & KStdAccel::copy (  ) 

Copy selected area into the clipboard.

Default: Ctrl-c

Returns:
the shortcut of the standard accelerator

Definition at line 277 of file kstdaccel.cpp.

const KShortcut & KStdAccel::cut (  ) 

Cut selected area and store it in the clipboard.

Default: Ctrl-x

Returns:
the shortcut of the standard accelerator

Definition at line 276 of file kstdaccel.cpp.

int KStdAccel::defaultKey ( StdAccel  accel  ) 

Deprecated:
Obsolete. Use shortcutDefault().

Definition at line 385 of file kstdaccel.cpp.

const KShortcut & KStdAccel::deleteWordBack (  ) 

Delete a word back from mouse/cursor position.

Default: Ctrl-Backspace

Returns:
the shortcut of the standard accelerator

Definition at line 280 of file kstdaccel.cpp.

const KShortcut & KStdAccel::deleteWordForward (  ) 

Delete a word forward from mouse/cursor position.

Default: Ctrl-Delete

Returns:
the shortcut of the standard accelerator

Definition at line 281 of file kstdaccel.cpp.

QString KStdAccel::description ( StdAccel  id  ) 

Deprecated:
Obsolete. Use desc(). Returns a localized description of accel.

Definition at line 381 of file kstdaccel.cpp.

const KShortcut & KStdAccel::end (  ) 

Goto end of the document.

Default: Ctrl-End

Returns:
the shortcut of the standard accelerator

Definition at line 289 of file kstdaccel.cpp.

const KShortcut & KStdAccel::endOfLine (  ) 

Goto end of current line.

Default: End

Returns:
the shortcut of the standard accelerator
Since:
3.3

Definition at line 291 of file kstdaccel.cpp.

const KShortcut & KStdAccel::find (  ) 

Find, search.

Default: Ctrl-f

Returns:
the shortcut of the standard accelerator

Definition at line 284 of file kstdaccel.cpp.

const KShortcut & KStdAccel::findNext (  ) 

Find/search next.

Default: F3

Returns:
the shortcut of the standard accelerator

Definition at line 285 of file kstdaccel.cpp.

const KShortcut & KStdAccel::findPrev (  ) 

Find/search previous.

Default: Shift-F3

Returns:
the shortcut of the standard accelerator

Definition at line 286 of file kstdaccel.cpp.

StdAccel KStdAccel::findStdAccel ( const KKeySequence &  keySeq  ) 

Return the StdAccel 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

Definition at line 186 of file kstdaccel.cpp.

const KShortcut & KStdAccel::forward (  ) 

Forward.

Default: ALT+Right

Returns:
the shortcut of the standard accelerator

Definition at line 316 of file kstdaccel.cpp.

const KShortcut & KStdAccel::forwardWord (  ) 

ForwardWord.

Default: Ctrl+Right

Returns:
the shortcut of the standard accelerator
Since:
3.3

Definition at line 295 of file kstdaccel.cpp.

const KShortcut & KStdAccel::fullScreen (  ) 

Full Screen Mode.

Default: Ctrl+Shift+F

Returns:
the shortcut of the standard accelerator
Since:
3.2

Definition at line 300 of file kstdaccel.cpp.

const KShortcut & KStdAccel::gotoLine (  ) 

Go to line.

Default: Ctrl+G

Returns:
the shortcut of the standard accelerator

Definition at line 296 of file kstdaccel.cpp.

const KShortcut & KStdAccel::help (  ) 

Help the user in the current situation.

Default: F1

Returns:
the shortcut of the standard accelerator

Definition at line 303 of file kstdaccel.cpp.

const KShortcut & KStdAccel::home (  ) 

Goto beginning of the document.

Default: Ctrl-Home

Returns:
the shortcut of the standard accelerator

Definition at line 288 of file kstdaccel.cpp.

static KStdAccelInfo* KStdAccel::infoPtr ( StdAccel  id  )  [static]

Search for the KStdAccelInfo object associated with the given id.

Definition at line 110 of file kstdaccel.cpp.

static void KStdAccel::initialize ( StdAccel  id  )  [static]

Initialize the accelerator id by checking if it is overridden in the configuration file (and if it isn't, use the default).

Definition at line 127 of file kstdaccel.cpp.

const KShortcut& KStdAccel::insert (  ) 

Toggle insert/overwrite (with visual feedback, e.g.

in the statusbar). Default: Insert

Returns:
the shortcut of the standard accelerator

bool KStdAccel::isEqual ( const QKeyEvent *  pEvent,
int  keyQt 
)

Deprecated:
. Use KKey(const QKeyEvent*) == KKey(int).
Compare the keys generated by the key event with the value of the integer.

If a modifier (Shift, Alt, Ctrl) key is present in QKeyEvent, its sum with the actual key value is used for comparing it with the integer parameter.

Parameters:
pEvent the key event to be used in the comparison.
keyQt the int value to be compared to the key event.
Returns:
true if the int value matches the integer representation of the QKeyEvent

Definition at line 388 of file kstdaccel.cpp.

int KStdAccel::key ( StdAccel   ) 

Deprecated:
Obsolete. Use shortcut(). Returns the keybinding for accel.

Definition at line 383 of file kstdaccel.cpp.

QString KStdAccel::label ( StdAccel  id  ) 

Returns a localized label for user-visible display.

Parameters:
id the id of the accelerator
Returns:
a localized label for the accelerator

Definition at line 156 of file kstdaccel.cpp.

QString KStdAccel::name ( StdAccel  id  ) 

Returns a unique name for the given accel.

Parameters:
id the id of the accelerator
Returns:
the unique name of the accelerator

Definition at line 148 of file kstdaccel.cpp.

const KShortcut & KStdAccel::next (  ) 

Scroll down one page.

Default: Next

Returns:
the shortcut of the standard accelerator

Definition at line 293 of file kstdaccel.cpp.

const KShortcut & KStdAccel::nextCompletion (  ) 

Iterate through a list when completion returns multiple items.

Default: Ctrl+Down

Returns:
the shortcut of the standard accelerator

Definition at line 306 of file kstdaccel.cpp.

const KShortcut & KStdAccel::open (  ) 

Open file.

Default: Ctrl-o

Returns:
the shortcut of the standard accelerator

Definition at line 270 of file kstdaccel.cpp.

const KShortcut & KStdAccel::openNew (  ) 

Create a new document (or whatever).

Default: Ctrl-n

Returns:
the shortcut of the standard accelerator

Definition at line 271 of file kstdaccel.cpp.

const KShortcut & KStdAccel::paste (  ) 

Paste contents of clipboard at mouse/cursor position.

Default: Ctrl-v

Returns:
the shortcut of the standard accelerator

Definition at line 278 of file kstdaccel.cpp.

const KShortcut & KStdAccel::pasteSelection (  ) 

Paste the selection at mouse/cursor position.

Default: Ctrl-Shift-Insert

Returns:
the shortcut of the standard accelerator
Since:
3.4

Definition at line 279 of file kstdaccel.cpp.

const KShortcut & KStdAccel::popupMenuContext (  ) 

popup a context menu.

Default: Menu

Returns:
the shortcut of the standard accelerator

Definition at line 310 of file kstdaccel.cpp.

const KShortcut & KStdAccel::prevCompletion (  ) 

Iterate through a list when completion returns multiple items.

Default: Ctrl+Up

Returns:
the shortcut of the standard accelerator

Definition at line 305 of file kstdaccel.cpp.

const KShortcut & KStdAccel::print (  ) 

Print current document.

Default: Ctrl-p

Returns:
the shortcut of the standard accelerator

Definition at line 274 of file kstdaccel.cpp.

const KShortcut & KStdAccel::prior (  ) 

Scroll up one page.

Default: Prior

Returns:
the shortcut of the standard accelerator

Definition at line 292 of file kstdaccel.cpp.

const KShortcut & KStdAccel::quit (  ) 

Quit the program.

Default: Ctrl-q

Returns:
the shortcut of the standard accelerator

Definition at line 275 of file kstdaccel.cpp.

const KShortcut & KStdAccel::redo (  ) 

Redo.

Default: Shift-Ctrl-z

Returns:
the shortcut of the standard accelerator

Definition at line 283 of file kstdaccel.cpp.

const KShortcut & KStdAccel::reload (  ) 

Reload.

Default: F5

Returns:
the shortcut of the standard accelerator

Definition at line 312 of file kstdaccel.cpp.

const KShortcut & KStdAccel::replace (  ) 

Find and replace matches.

Default: Ctrl-r

Returns:
the shortcut of the standard accelerator

Definition at line 287 of file kstdaccel.cpp.

const KShortcut & KStdAccel::rotateDown (  ) 

Help users iterate through a list of entries.

Default: Down

Returns:
the shortcut of the standard accelerator

Definition at line 308 of file kstdaccel.cpp.

const KShortcut & KStdAccel::rotateUp (  ) 

Help users iterate through a list of entries.

Default: Up

Returns:
the shortcut of the standard accelerator

Definition at line 307 of file kstdaccel.cpp.

const KShortcut & KStdAccel::save (  ) 

Save current document.

Default: Ctrl-s

Returns:
the shortcut of the standard accelerator

Definition at line 273 of file kstdaccel.cpp.

const KShortcut & KStdAccel::selectAll (  ) 

Reload.

Default: Ctrl-A

Returns:
the shortcut of the standard accelerator

Definition at line 313 of file kstdaccel.cpp.

const KShortcut & KStdAccel::shortcut ( StdAccel  id  ) 

Returns the keybinding for accel.

Parameters:
id the id of the accelerator

Definition at line 174 of file kstdaccel.cpp.

KShortcut KStdAccel::shortcutDefault ( StdAccel  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

Definition at line 202 of file kstdaccel.cpp.

KShortcut KStdAccel::shortcutDefault3 ( StdAccel  id  ) 

Returns the hardcoded default 3 modifier shortcut for id.

This does not take into account the user's configuration.

Parameters:
id the id of the accelerator
Returns:
the default 3 modifier shortcut

Definition at line 208 of file kstdaccel.cpp.

KShortcut KStdAccel::shortcutDefault4 ( StdAccel  id  ) 

Returns the hardcoded default 4 modifier shortcut for id.

This does not take into account the user's configuration.

Parameters:
id the id of the accelerator
Returns:
the default 4 modifier shortcut

Definition at line 225 of file kstdaccel.cpp.

const KShortcut & KStdAccel::showMenubar (  ) 

Show Menu Bar.

Default: Ctrl-M

Returns:
the shortcut of the standard accelerator

Definition at line 317 of file kstdaccel.cpp.

const KShortcut & KStdAccel::substringCompletion (  ) 

Find a string within another string or list of strings.

Default: Ctrl-T

Returns:
the shortcut of the standard accelerator

Definition at line 309 of file kstdaccel.cpp.

const KShortcut & KStdAccel::tabNext (  ) 

Next Tab.

Default: Ctrl-<

Returns:
the shortcut of the standard accelerator
Since:
3.2

Definition at line 298 of file kstdaccel.cpp.

const KShortcut & KStdAccel::tabPrev (  ) 

Previous Tab.

Default: Ctrl->

Returns:
the shortcut of the standard accelerator
Since:
3.2

Definition at line 299 of file kstdaccel.cpp.

const KShortcut & KStdAccel::undo (  ) 

Undo last operation.

Default: Ctrl-z

Returns:
the shortcut of the standard accelerator

Definition at line 282 of file kstdaccel.cpp.

const KShortcut & KStdAccel::up (  ) 

Up.

Default: Alt+Up

Returns:
the shortcut of the standard accelerator

Definition at line 314 of file kstdaccel.cpp.

QString KStdAccel::whatsThis ( StdAccel  id  ) 

Returns an extended WhatsThis description for the given accelerator.

Parameters:
id the id of the accelerator
Returns:
a localized description of the accelerator

const KShortcut& KStdAccel::whatsThis (  ) 

What's This button.

Default: Shift+F1

Returns:
the shortcut of the standard accelerator

Definition at line 311 of file kstdaccel.cpp.

const KShortcut & KStdAccel::zoomIn (  ) 

Zoom in.

Default: Ctrl-Plus

Returns:
the shortcut of the standard accelerator

Definition at line 301 of file kstdaccel.cpp.

const KShortcut & KStdAccel::zoomOut (  ) 

Zoom out.

Default: Ctrl-Minus

Returns:
the shortcut of the standard accelerator

Definition at line 302 of file kstdaccel.cpp.


Variable Documentation

KStdAccelInfo KStdAccel::g_infoStdAccel[] [static]

Array of predefined KStdAccelInfo objects, which cover all the "standard" accelerators.

Each enum value from StdAccel should appear in this table.

Definition at line 50 of file kstdaccel.cpp.

const KShortcut & KStdAccel::whatsThis ( StdAccel   ) 

What's This button.

Default: Shift+F1

Returns:
the shortcut of the standard accelerator

Definition at line 165 of file kstdaccel.cpp.

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal