• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • shortcuts
kstandardshortcut.cpp
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 1997 Stefan Taferner (taferner@alpin.or.at)
3 Copyright (C) 2000 Nicolas Hadacek (haadcek@kde.org)
4 Copyright (C) 2001,2002 Ellis Whitehead (ellis@kde.org)
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include "kstandardshortcut.h"
22
23#include "kconfig.h"
24#include "kdebug.h"
25#include "kglobal.h"
26#include "klocale.h"
27#include "kshortcut.h"
28#include <kconfiggroup.h>
29
30#include <QtGui/QKeySequence>
31#ifdef Q_WS_X11
32#include <qx11info_x11.h>
33#endif
34
35namespace KStandardShortcut
36{
37
38struct KStandardShortcutInfo
39{
41 StandardShortcut id;
42
48 const char* name;
49
51 const char* translation_context;
52
54 const char* description;
55
57 int cutDefault, cutDefault2;
58
60 KShortcut cut;
61
63 bool isInitialized;
64};
65
67#undef I18N_NOOP2
68#define I18N_NOOP2(comment,x) comment, x
69
70#define CTRL(x) Qt::CTRL+Qt::Key_##x
71#define SHIFT(x) Qt::SHIFT+Qt::Key_##x
72#define CTRLSHIFT(x) Qt::CTRL+Qt::SHIFT+Qt::Key_##x
73#define ALT(x) Qt::ALT+Qt::Key_##x
74#define ALTSHIFT(x) Qt::ALT+Qt::SHIFT+Qt::Key_##x
75
80// STUFF WILL BREAK IF YOU DON'T READ THIS!!!
81// Read the comments of the big enum in kstandardshortcut.h before you change anything!
82static KStandardShortcutInfo g_infoStandardShortcut[] =
83{
84//Group File,
85 {AccelNone, 0 , 0 , 0 , 0 , 0 , KShortcut(), false },
86 { Open , "Open" , I18N_NOOP2("@action", "Open") , CTRL(O), 0 , KShortcut(), false } ,
87 { New , "New" , I18N_NOOP2("@action", "New") , CTRL(N), 0 , KShortcut(), false } ,
88 { Close , "Close", I18N_NOOP2("@action", "Close"), CTRL(W), CTRL(Escape), KShortcut(), false } ,
89 { Save , "Save" , I18N_NOOP2("@action", "Save") , CTRL(S), 0 , KShortcut(), false } ,
90 { Print , "Print", I18N_NOOP2("@action", "Print"), CTRL(P), 0 , KShortcut(), false } ,
91 { Quit , "Quit" , I18N_NOOP2("@action", "Quit") , CTRL(Q), 0 , KShortcut(), false } ,
92
93//Group Edit
94 { Undo , "Undo" , I18N_NOOP2("@action", "Undo") , CTRL(Z) , 0 , KShortcut(), false },
95 { Redo , "Redo" , I18N_NOOP2("@action", "Redo") , CTRLSHIFT(Z) , 0 , KShortcut(), false },
96 { Cut , "Cut" , I18N_NOOP2("@action", "Cut") , CTRL(X) , SHIFT(Delete), KShortcut(), false },
97 { Copy , "Copy" , I18N_NOOP2("@action", "Copy") , CTRL(C) , CTRL(Insert) , KShortcut(), false },
98 { Paste , "Paste" , I18N_NOOP2("@action", "Paste") , CTRL(V) , SHIFT(Insert), KShortcut(), false },
99 { PasteSelection , "Paste Selection" , I18N_NOOP2("@action", "Paste Selection") , CTRLSHIFT(Insert), 0 , KShortcut(), false },
100
101 { SelectAll , "SelectAll" , I18N_NOOP2("@action", "Select All") , CTRL(A) , 0 , KShortcut(), false },
102 { Deselect , "Deselect" , I18N_NOOP2("@action", "Deselect") , CTRLSHIFT(A) , 0 , KShortcut(), false },
103 { DeleteWordBack , "DeleteWordBack" , I18N_NOOP2("@action", "Delete Word Backwards"), CTRL(Backspace) , 0 , KShortcut(), false },
104 { DeleteWordForward, "DeleteWordForward", I18N_NOOP2("@action", "Delete Word Forward") , CTRL(Delete) , 0 , KShortcut(), false },
105
106 { Find , "Find" , I18N_NOOP2("@action", "Find") , CTRL(F) , 0 , KShortcut(), false },
107 { FindNext , "FindNext" , I18N_NOOP2("@action", "Find Next") , Qt::Key_F3 , 0 , KShortcut(), false },
108 { FindPrev , "FindPrev" , I18N_NOOP2("@action", "Find Prev") , SHIFT(F3) , 0 , KShortcut(), false },
109 { Replace , "Replace" , I18N_NOOP2("@action", "Replace") , CTRL(R) , 0 , KShortcut(), false },
110
111//Group Navigation
112 { Home , "Home" , I18N_NOOP2("@action Go to main page" , "Home") , ALT(Home) , Qt::Key_HomePage , KShortcut(), false },
113 { Begin , "Begin" , I18N_NOOP2("@action Beginning of document", "Begin") , CTRL(Home) , 0 , KShortcut(), false },
114 { End , "End" , I18N_NOOP2("@action End of document" , "End") , CTRL(End) , 0 , KShortcut(), false },
115 { Prior , "Prior" , I18N_NOOP2("@action" , "Prior") , Qt::Key_PageUp , 0 , KShortcut(), false },
116 { Next , "Next" , I18N_NOOP2("@action Opposite to Prior" , "Next") , Qt::Key_PageDown, 0 , KShortcut(), false },
117
118 { Up , "Up" , I18N_NOOP2("@action" , "Up") , ALT(Up) , 0 , KShortcut(), false },
119 { Back , "Back" , I18N_NOOP2("@action" , "Back") , ALT(Left) , Qt::Key_Back , KShortcut(), false },
120 { Forward , "Forward" , I18N_NOOP2("@action" , "Forward") , ALT(Right) , Qt::Key_Forward , KShortcut(), false },
121 { Reload , "Reload" , I18N_NOOP2("@action" , "Reload") , Qt::Key_F5 , Qt::Key_Refresh , KShortcut(), false },
122
123 { BeginningOfLine, "BeginningOfLine" , I18N_NOOP2("@action" , "Beginning of Line") , Qt::Key_Home , 0 , KShortcut(), false },
124 { EndOfLine , "EndOfLine" , I18N_NOOP2("@action" , "End of Line") , Qt::Key_End , 0 , KShortcut(), false },
125 { GotoLine , "GotoLine" , I18N_NOOP2("@action" , "Go to Line") , CTRL(G) , 0 , KShortcut(), false },
126 { BackwardWord , "BackwardWord" , I18N_NOOP2("@action" , "Backward Word") , CTRL(Left) , 0 , KShortcut(), false },
127 { ForwardWord , "ForwardWord" , I18N_NOOP2("@action" , "Forward Word") , CTRL(Right) , 0 , KShortcut(), false },
128
129 { AddBookmark , "AddBookmark" , I18N_NOOP2("@action" , "Add Bookmark") , CTRL(B) , 0 , KShortcut(), false },
130 { ZoomIn , "ZoomIn" , I18N_NOOP2("@action" , "Zoom In") , CTRL(Plus) , CTRL(Equal) , KShortcut(), false },
131 { ZoomOut , "ZoomOut" , I18N_NOOP2("@action" , "Zoom Out") , CTRL(Minus) , 0 , KShortcut(), false },
132 { FullScreen , "FullScreen" , I18N_NOOP2("@action" , "Full Screen Mode") , CTRLSHIFT(F) , 0 , KShortcut(), false },
133
134 { ShowMenubar , "ShowMenubar" , I18N_NOOP2("@action" , "Show Menu Bar") , CTRL(M) , 0 , KShortcut(), false },
135 { TabNext , "Activate Next Tab" , I18N_NOOP2("@action" , "Activate Next Tab") , CTRL(Period) , CTRL(BracketRight), KShortcut(), false },
136 { TabPrev , "Activate Previous Tab", I18N_NOOP2("@action" , "Activate Previous Tab"), CTRL(Comma) , CTRL(BracketLeft) , KShortcut(), false },
137
138 //Group Help
139 { Help , "Help" , I18N_NOOP2("@action" , "Help") , Qt::Key_F1 , 0 , KShortcut(), false },
140 { WhatsThis , "WhatsThis" , I18N_NOOP2("@action" , "What's This") , SHIFT(F1) , 0 , KShortcut(), false },
141
142//Group TextCompletion
143 { TextCompletion , "TextCompletion" , I18N_NOOP2("@action", "Text Completion") , CTRL(E) , 0, KShortcut(), false },
144 { PrevCompletion , "PrevCompletion" , I18N_NOOP2("@action", "Previous Completion Match"), CTRL(Up) , 0, KShortcut(), false },
145 { NextCompletion , "NextCompletion" , I18N_NOOP2("@action", "Next Completion Match") , CTRL(Down) , 0, KShortcut(), false },
146 { SubstringCompletion , "SubstringCompletion" , I18N_NOOP2("@action", "Substring Completion") , CTRL(T) , 0, KShortcut(), false },
147
148 { RotateUp , "RotateUp" , I18N_NOOP2("@action", "Previous Item in List") , Qt::Key_Up , 0, KShortcut(), false },
149 { RotateDown , "RotateDown" , I18N_NOOP2("@action", "Next Item in List") , Qt::Key_Down, 0, KShortcut(), false },
150
151 { OpenRecent , "OpenRecent" , I18N_NOOP2("@action", "Open Recent") , 0 , 0, KShortcut(), false },
152 { SaveAs , "SaveAs" , I18N_NOOP2("@action", "Save As") , CTRLSHIFT(S) , 0, KShortcut(), false },
153 { Revert , "Revert" , I18N_NOOP2("@action", "Revert") , 0 , 0, KShortcut(), false },
154 { PrintPreview , "PrintPreview" , I18N_NOOP2("@action", "Print Preview") , 0 , 0, KShortcut(), false },
155 { Mail , "Mail" , I18N_NOOP2("@action", "Mail") , 0 , 0, KShortcut(), false },
156 { Clear , "Clear" , I18N_NOOP2("@action", "Clear") , 0 , 0, KShortcut(), false },
157 { ActualSize , "ActualSize" , I18N_NOOP2("@action", "Actual Size") , 0 , 0, KShortcut(), false },
158 { FitToPage , "FitToPage" , I18N_NOOP2("@action", "Fit To Page") , 0 , 0, KShortcut(), false },
159 { FitToWidth , "FitToWidth" , I18N_NOOP2("@action", "Fit To Width") , 0 , 0, KShortcut(), false },
160 { FitToHeight , "FitToHeight" , I18N_NOOP2("@action", "Fit To Height") , 0 , 0, KShortcut(), false },
161 { Zoom , "Zoom" , I18N_NOOP2("@action", "Zoom") , 0 , 0, KShortcut(), false },
162 { Goto , "Goto" , I18N_NOOP2("@action", "Goto") , 0 , 0, KShortcut(), false },
163 { GotoPage , "GotoPage" , I18N_NOOP2("@action", "Goto Page") , 0 , 0, KShortcut(), false },
164 { DocumentBack , "DocumentBack" , I18N_NOOP2("@action", "Document Back") , ALTSHIFT(Left), 0, KShortcut(), false },
165 { DocumentForward , "DocumentForward" , I18N_NOOP2("@action", "Document Forward") , ALTSHIFT(Right), 0, KShortcut(), false },
166 { EditBookmarks , "EditBookmarks" , I18N_NOOP2("@action", "Edit Bookmarks") , 0 , 0, KShortcut(), false },
167 { Spelling , "Spelling" , I18N_NOOP2("@action", "Spelling") , 0 , 0, KShortcut(), false },
168 { ShowToolbar , "ShowToolbar" , I18N_NOOP2("@action", "Show Toolbar") , 0 , 0, KShortcut(), false },
169 { ShowStatusbar , "ShowStatusbar" , I18N_NOOP2("@action", "Show Statusbar") , 0 , 0, KShortcut(), false },
170 { SaveOptions , "SaveOptions" , I18N_NOOP2("@action", "Save Options") , 0 , 0, KShortcut(), false },
171 { KeyBindings , "KeyBindings" , I18N_NOOP2("@action", "Key Bindings") , 0 , 0, KShortcut(), false },
172 { Preferences , "Preferences" , I18N_NOOP2("@action", "Preferences") , 0 , 0, KShortcut(), false },
173 { ConfigureToolbars , "ConfigureToolbars" , I18N_NOOP2("@action", "Configure Toolbars") , 0 , 0, KShortcut(), false },
174 { ConfigureNotifications , "ConfigureNotifications" , I18N_NOOP2("@action", "Configure Notifications") , 0 , 0, KShortcut(), false },
175 { TipofDay , "TipofDay" , I18N_NOOP2("@action", "Tip Of Day") , 0 , 0, KShortcut(), false },
176 { ReportBug , "ReportBug" , I18N_NOOP2("@action", "Report Bug") , 0 , 0, KShortcut(), false },
177 { SwitchApplicationLanguage, "SwitchApplicationLanguage", I18N_NOOP2("@action", "Switch Application Language"), 0 , 0, KShortcut(), false },
178 { AboutApp , "AboutApp" , I18N_NOOP2("@action", "About Application") , 0 , 0, KShortcut(), false },
179 { AboutKDE , "AboutKDE" , I18N_NOOP2("@action", "About KDE") , 0 , 0, KShortcut(), false },
180
181 //dummy entry to catch simple off-by-one errors. Insert new entries before this line.
182 { AccelNone , 0 , 0 , 0 , 0, 0, KShortcut(), false }
183};
184
185
189static KStandardShortcutInfo *guardedStandardShortcutInfo(StandardShortcut id)
190{
191 if (id >= static_cast<int>(sizeof(g_infoStandardShortcut) / sizeof(KStandardShortcutInfo)) ||
192 id < 0) {
193 kWarning(125) << "KStandardShortcut: id not found!";
194 return &g_infoStandardShortcut[AccelNone];
195 } else
196 return &g_infoStandardShortcut[id];
197}
198
204static void initialize(StandardShortcut id)
205{
206 KStandardShortcutInfo *info = guardedStandardShortcutInfo(id);
207
208 // All three are needed.
209 if (info->id!=AccelNone) {
210 Q_ASSERT(info->description);
211 Q_ASSERT(info->translation_context);
212 Q_ASSERT(info->name);
213 }
214
215 KConfigGroup cg(KGlobal::config(), "Shortcuts");
216
217#ifdef Q_WS_X11
218 // Code within this block breaks if we aren't running in GUI mode.
219 if(QX11Info::display() && cg.hasKey(info->name))
220#else
221 if(cg.hasKey(info->name))
222#endif
223 {
224 QString s = cg.readEntry(info->name);
225 if (s != "none")
226 info->cut = KShortcut(s);
227 else
228 info->cut = KShortcut();
229 } else {
230 info->cut = hardcodedDefaultShortcut(id);
231 }
232
233 info->isInitialized = true;
234}
235
236void saveShortcut(StandardShortcut id, const KShortcut &newShortcut)
237{
238 KStandardShortcutInfo *info = guardedStandardShortcutInfo(id);
239 // If the action has no standard shortcut associated there is nothing to
240 // save
241 if(info->id == AccelNone)
242 return;
243
244 KConfigGroup cg(KGlobal::config(), "Shortcuts");
245
246 info->cut = newShortcut;
247 bool sameAsDefault = (newShortcut == hardcodedDefaultShortcut(id));
248
249 if (sameAsDefault) {
250 // If the shortcut is the equal to the hardcoded one we remove it from
251 // kdeglobal if necessary and return.
252 if(cg.hasKey(info->name))
253 cg.deleteEntry(info->name, KConfig::Global|KConfig::Persistent);
254
255 return;
256 }
257
258 // Write the changed shortcut to kdeglobals
259 cg.writeEntry(info->name, info->cut.toString(), KConfig::Global|KConfig::Persistent);
260}
261
262QString name(StandardShortcut id)
263{
264 return guardedStandardShortcutInfo(id)->name;
265}
266
267QString label(StandardShortcut id)
268{
269 KStandardShortcutInfo *info = guardedStandardShortcutInfo( id );
270 return i18nc(
271 info->translation_context,
272 info->description);
273}
274
275// TODO: Add psWhatsThis entry to KStandardShortcutInfo
276QString whatsThis( StandardShortcut /*id*/ )
277{
278// KStandardShortcutInfo* info = guardedStandardShortcutInfo( id );
279// if( info && info->whatsThis )
280// return i18n(info->whatsThis);
281// else
282 return QString();
283}
284
285const KShortcut &shortcut(StandardShortcut id)
286{
287 KStandardShortcutInfo *info = guardedStandardShortcutInfo(id);
288
289 if(!info->isInitialized)
290 initialize(id);
291
292 return info->cut;
293}
294
295StandardShortcut find(const QKeySequence &seq)
296{
297 if( !seq.isEmpty() ) {
298 for(uint i = 0; i < sizeof(g_infoStandardShortcut) / sizeof(KStandardShortcutInfo); i++) {
299 StandardShortcut id = g_infoStandardShortcut[i].id;
300 if( id != AccelNone ) {
301 if(!g_infoStandardShortcut[i].isInitialized)
302 initialize(id);
303 if(g_infoStandardShortcut[i].cut.contains(seq))
304 return id;
305 }
306 }
307 }
308 return AccelNone;
309}
310
311StandardShortcut find(const char *keyName)
312{
313 for(uint i = 0; i < sizeof(g_infoStandardShortcut) / sizeof(KStandardShortcutInfo); i++)
314 if (qstrcmp(g_infoStandardShortcut[i].name, keyName))
315 return g_infoStandardShortcut[i].id;
316
317 return AccelNone;
318}
319
320KShortcut hardcodedDefaultShortcut(StandardShortcut id)
321{
322 KShortcut cut;
323 KStandardShortcutInfo *info = guardedStandardShortcutInfo(id);
324
325 return KShortcut(info->cutDefault, info->cutDefault2);
326}
327
328const KShortcut& open() { return shortcut( Open ); }
329const KShortcut& openNew() { return shortcut( New ); }
330const KShortcut& close() { return shortcut( Close ); }
331const KShortcut& save() { return shortcut( Save ); }
332const KShortcut& print() { return shortcut( Print ); }
333const KShortcut& quit() { return shortcut( Quit ); }
334const KShortcut& cut() { return shortcut( Cut ); }
335const KShortcut& copy() { return shortcut( Copy ); }
336const KShortcut& paste() { return shortcut( Paste ); }
337const KShortcut& pasteSelection() { return shortcut( PasteSelection ); }
338const KShortcut& deleteWordBack() { return shortcut( DeleteWordBack ); }
339const KShortcut& deleteWordForward() { return shortcut( DeleteWordForward ); }
340const KShortcut& undo() { return shortcut( Undo ); }
341const KShortcut& redo() { return shortcut( Redo ); }
342const KShortcut& find() { return shortcut( Find ); }
343const KShortcut& findNext() { return shortcut( FindNext ); }
344const KShortcut& findPrev() { return shortcut( FindPrev ); }
345const KShortcut& replace() { return shortcut( Replace ); }
346const KShortcut& home() { return shortcut( Home ); }
347const KShortcut& begin() { return shortcut( Begin ); }
348const KShortcut& end() { return shortcut( End ); }
349const KShortcut& beginningOfLine() { return shortcut( BeginningOfLine ); }
350const KShortcut& endOfLine() { return shortcut( EndOfLine ); }
351const KShortcut& prior() { return shortcut( Prior ); }
352const KShortcut& next() { return shortcut( Next ); }
353const KShortcut& backwardWord() { return shortcut( BackwardWord ); }
354const KShortcut& forwardWord() { return shortcut( ForwardWord ); }
355const KShortcut& gotoLine() { return shortcut( GotoLine ); }
356const KShortcut& addBookmark() { return shortcut( AddBookmark ); }
357const KShortcut& tabNext() { return shortcut( TabNext ); }
358const KShortcut& tabPrev() { return shortcut( TabPrev ); }
359const KShortcut& fullScreen() { return shortcut( FullScreen ); }
360const KShortcut& zoomIn() { return shortcut( ZoomIn ); }
361const KShortcut& zoomOut() { return shortcut( ZoomOut ); }
362const KShortcut& help() { return shortcut( Help ); }
363const KShortcut& completion() { return shortcut( TextCompletion ); }
364const KShortcut& prevCompletion() { return shortcut( PrevCompletion ); }
365const KShortcut& nextCompletion() { return shortcut( NextCompletion ); }
366const KShortcut& rotateUp() { return shortcut( RotateUp ); }
367const KShortcut& rotateDown() { return shortcut( RotateDown ); }
368const KShortcut& substringCompletion() { return shortcut( SubstringCompletion ); }
369const KShortcut& whatsThis() { return shortcut( WhatsThis ); }
370const KShortcut& reload() { return shortcut( Reload ); }
371const KShortcut& selectAll() { return shortcut( SelectAll ); }
372const KShortcut& up() { return shortcut( Up ); }
373const KShortcut& back() { return shortcut( Back ); }
374const KShortcut& forward() { return shortcut( Forward ); }
375const KShortcut& showMenubar() { return shortcut( ShowMenubar ); }
376
377}
KConfigBase::Persistent
Persistent
KConfigBase::Global
Global
KConfigGroup
KConfigGroup::deleteEntry
void deleteEntry(const char *pKey, WriteConfigFlags pFlags=Normal)
KConfigGroup::hasKey
bool hasKey(const char *key) const
KConfigGroup::writeEntry
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
KConfigGroup::readEntry
QString readEntry(const char *key, const char *aDefault=0) const
KShortcut
Represents a keyboard shortcut.
Definition: kshortcut.h:58
kWarning
#define kWarning
M
#define M(h, p)
kconfig.h
kconfiggroup.h
kdebug.h
kglobal.h
klocale.h
i18nc
QString i18nc(const char *ctxt, const char *text)
kshortcut.h
Defines platform-independent classes for keyboard shortcut handling.
CTRLSHIFT
#define CTRLSHIFT(x)
Definition: kstandardshortcut.cpp:72
ALT
#define ALT(x)
Definition: kstandardshortcut.cpp:73
ALTSHIFT
#define ALTSHIFT(x)
Definition: kstandardshortcut.cpp:74
CTRL
#define CTRL(x)
Definition: kstandardshortcut.cpp:70
I18N_NOOP2
#define I18N_NOOP2(comment, x)
We need to remember the context to get the correct translation.
Definition: kstandardshortcut.cpp:68
SHIFT
#define SHIFT(x)
Definition: kstandardshortcut.cpp:71
kstandardshortcut.h
T
#define T
F
#define F
open
int open(const QString &pathname, int flags, mode_t mode)
KGlobal::config
KSharedConfigPtr config()
KStandardShortcut
Convenient methods for access to the common accelerator keys in the key configuration.
Definition: kstandardshortcut.cpp:36
KStandardShortcut::label
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
Definition: kstandardshortcut.cpp:267
KStandardShortcut::initialize
static void initialize(StandardShortcut id)
Initialize the accelerator id by checking if it is overridden in the configuration file (and if it is...
Definition: kstandardshortcut.cpp:204
KStandardShortcut::completion
const KShortcut & completion()
Complete text in input widgets.
Definition: kstandardshortcut.cpp:363
KStandardShortcut::prevCompletion
const KShortcut & prevCompletion()
Iterate through a list when completion returns multiple items.
Definition: kstandardshortcut.cpp:364
KStandardShortcut::nextCompletion
const KShortcut & nextCompletion()
Iterate through a list when completion returns multiple items.
Definition: kstandardshortcut.cpp:365
KStandardShortcut::forwardWord
const KShortcut & forwardWord()
ForwardWord.
Definition: kstandardshortcut.cpp:354
KStandardShortcut::deleteWordBack
const KShortcut & deleteWordBack()
Delete a word back from mouse/cursor position.
Definition: kstandardshortcut.cpp:338
KStandardShortcut::guardedStandardShortcutInfo
static KStandardShortcutInfo * guardedStandardShortcutInfo(StandardShortcut id)
Search for the KStandardShortcutInfo object associated with the given id.
Definition: kstandardshortcut.cpp:189
KStandardShortcut::rotateUp
const KShortcut & rotateUp()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:366
KStandardShortcut::endOfLine
const KShortcut & endOfLine()
Goto end of current line.
Definition: kstandardshortcut.cpp:350
KStandardShortcut::tabPrev
const KShortcut & tabPrev()
Previous Tab.
Definition: kstandardshortcut.cpp:358
KStandardShortcut::beginningOfLine
const KShortcut & beginningOfLine()
Goto beginning of current line.
Definition: kstandardshortcut.cpp:349
KStandardShortcut::saveShortcut
void saveShortcut(StandardShortcut id, const KShortcut &newShortcut)
Saves the new shortcut cut for standard accel id.
Definition: kstandardshortcut.cpp:236
KStandardShortcut::rotateDown
const KShortcut & rotateDown()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:367
KStandardShortcut::shortcut
const KShortcut & shortcut(StandardShortcut id)
Returns the keybinding for accel.
Definition: kstandardshortcut.cpp:285
KStandardShortcut::backwardWord
const KShortcut & backwardWord()
BackwardWord.
Definition: kstandardshortcut.cpp:353
KStandardShortcut::begin
const KShortcut & begin()
Goto beginning of the document.
Definition: kstandardshortcut.cpp:347
KStandardShortcut::end
const KShortcut & end()
Goto end of the document.
Definition: kstandardshortcut.cpp:348
KStandardShortcut::reload
const KShortcut & reload()
Reload.
Definition: kstandardshortcut.cpp:370
KStandardShortcut::deleteWordForward
const KShortcut & deleteWordForward()
Delete a word forward from mouse/cursor position.
Definition: kstandardshortcut.cpp:339
KStandardShortcut::hardcodedDefaultShortcut
KShortcut hardcodedDefaultShortcut(StandardShortcut id)
Returns the hardcoded default shortcut for id.
Definition: kstandardshortcut.cpp:320
KStandardShortcut::tabNext
const KShortcut & tabNext()
Next Tab.
Definition: kstandardshortcut.cpp:357
KStandardShortcut::g_infoStandardShortcut
static KStandardShortcutInfo g_infoStandardShortcut[]
Array of predefined KStandardShortcutInfo objects, which cover all the "standard" accelerators.
Definition: kstandardshortcut.cpp:82
KStandardShortcut::substringCompletion
const KShortcut & substringCompletion()
Find a string within another string or list of strings.
Definition: kstandardshortcut.cpp:368
KStandardShortcut::pasteSelection
const KShortcut & pasteSelection()
Paste the selection at mouse/cursor position.
Definition: kstandardshortcut.cpp:337
KStandardShortcut::StandardShortcut
StandardShortcut
Defines the identifier of all standard accelerators.
Definition: kstandardshortcut.h:55
KStandardShortcut::TabPrev
@ TabPrev
Definition: kstandardshortcut.h:78
KStandardShortcut::DeleteWordBack
@ DeleteWordBack
Definition: kstandardshortcut.h:66
KStandardShortcut::AccelNone
@ AccelNone
Definition: kstandardshortcut.h:58
KStandardShortcut::Begin
@ Begin
Definition: kstandardshortcut.h:69
KStandardShortcut::EndOfLine
@ EndOfLine
Definition: kstandardshortcut.h:72
KStandardShortcut::RotateDown
@ RotateDown
Definition: kstandardshortcut.h:84
KStandardShortcut::RotateUp
@ RotateUp
Definition: kstandardshortcut.h:84
KStandardShortcut::End
@ End
Definition: kstandardshortcut.h:69
KStandardShortcut::Reload
@ Reload
Definition: kstandardshortcut.h:70
KStandardShortcut::PasteSelection
@ PasteSelection
Definition: kstandardshortcut.h:65
KStandardShortcut::NextCompletion
@ NextCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::TextCompletion
@ TextCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::DeleteWordForward
@ DeleteWordForward
Definition: kstandardshortcut.h:66
KStandardShortcut::BackwardWord
@ BackwardWord
Definition: kstandardshortcut.h:73
KStandardShortcut::ForwardWord
@ ForwardWord
Definition: kstandardshortcut.h:73
KStandardShortcut::PrevCompletion
@ PrevCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::BeginningOfLine
@ BeginningOfLine
Definition: kstandardshortcut.h:72
KStandardShortcut::SubstringCompletion
@ SubstringCompletion
Definition: kstandardshortcut.h:82
KStandardShortcut::TabNext
@ TabNext
Definition: kstandardshortcut.h:78
X
Definition: fixx11h.h:61
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal