KConfig 5.109.0
kstandardshortcut.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 1997 Stefan Taferner <taferner@kde.org>
4 SPDX-FileCopyrightText: 2000 Nicolas Hadacek <hadacek@kde.org>
5 SPDX-FileCopyrightText: 2001, 2002 Ellis Whitehead <ellis@kde.org>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9#ifndef KSTANDARDSHORTCUT_H
10#define KSTANDARDSHORTCUT_H
11
12#include <QKeySequence>
13#include <QString>
14
15#include <kconfiggui_export.h>
16
24namespace KStandardShortcut
25{
26// STUFF WILL BREAK IF YOU DON'T READ THIS!!!
27/*
28 *Always add new std-accels to the end of this enum, never in the middle!
29 *Don't forget to add the corresponding entries in g_infoStandardShortcut[] in kstandardshortcut.cpp, too.
30 *Values of elements here and positions of the corresponding entries in
31 *the big array g_infoStandardShortcut[] ABSOLUTELY MUST BE THE SAME.
32 * !!! !!!! !!!!! !!!!
33 * !!!! !!! !!!! !!!!
34 *
35 * Other Rules:
36 *
37 * - Never change the name of an existing shortcut
38 * - Never translate the name of a shortcut
39 */
40
45 // C++ requires that the value of an enum symbol be one more than the previous one.
46 // This means that everything will be well-ordered from here on.
47 AccelNone = 0,
48 // File menu
53 // The Print item
56 // Edit menu
71 // Navigation
81 // Text Navigation
87 // View parameters
93 // Tabular navigation
96 // Help menu
99 // Text completion
125#if KCONFIGGUI_ENABLE_DEPRECATED_SINCE(5, 39)
127 KCONFIGGUI_ENUMERATOR_DEPRECATED_VERSION_BELATED(5, 82, 5, 39, "No known users"),
128#else
129 SaveOptions_DEPRECATED_DO_NOT_USE,
130#endif
146 // Insert new items here!
147
148 StandardShortcutCount, // number of standard shortcuts
149};
150
155enum class Category {
156 InvalidCategory = -1,
157 File,
158 Edit,
159 Navigation,
160 View,
161 Settings,
162 Help,
163};
164
171KCONFIGGUI_EXPORT const QList<QKeySequence> &shortcut(StandardShortcut id);
172
178KCONFIGGUI_EXPORT QString name(StandardShortcut id);
179
185KCONFIGGUI_EXPORT QString label(StandardShortcut id);
186
192KCONFIGGUI_EXPORT QString whatsThis(StandardShortcut id);
193
202KCONFIGGUI_EXPORT StandardShortcut find(const QKeySequence &keySeq);
203
204#if KCONFIGGUI_ENABLE_DEPRECATED_SINCE(5, 71)
214KCONFIGGUI_EXPORT
215KCONFIGGUI_DEPRECATED_VERSION(5, 71, "Use findByName(const QString &name) instead")
216StandardShortcut find(const char *keyName);
217#endif
218
227KCONFIGGUI_EXPORT StandardShortcut findByName(const QString &name);
228
235KCONFIGGUI_EXPORT QList<QKeySequence> hardcodedDefaultShortcut(StandardShortcut id);
236
240KCONFIGGUI_EXPORT void saveShortcut(StandardShortcut id, const QList<QKeySequence> &newShortcut);
241
246KCONFIGGUI_EXPORT Category category(StandardShortcut id);
247
252KCONFIGGUI_EXPORT const QList<QKeySequence> &open();
253
258KCONFIGGUI_EXPORT const QList<QKeySequence> &openNew();
259
264KCONFIGGUI_EXPORT const QList<QKeySequence> &close();
265
270KCONFIGGUI_EXPORT const QList<QKeySequence> &save();
271
276KCONFIGGUI_EXPORT const QList<QKeySequence> &print();
277
282KCONFIGGUI_EXPORT const QList<QKeySequence> &quit();
283
288KCONFIGGUI_EXPORT const QList<QKeySequence> &undo();
289
294KCONFIGGUI_EXPORT const QList<QKeySequence> &redo();
295
300KCONFIGGUI_EXPORT const QList<QKeySequence> &cut();
301
306KCONFIGGUI_EXPORT const QList<QKeySequence> &copy();
307
312KCONFIGGUI_EXPORT const QList<QKeySequence> &paste();
313
318KCONFIGGUI_EXPORT const QList<QKeySequence> &pasteSelection();
319
324KCONFIGGUI_EXPORT const QList<QKeySequence> &selectAll();
325
330KCONFIGGUI_EXPORT const QList<QKeySequence> &deleteWordBack();
331
336KCONFIGGUI_EXPORT const QList<QKeySequence> &deleteWordForward();
337
342KCONFIGGUI_EXPORT const QList<QKeySequence> &find();
343
348KCONFIGGUI_EXPORT const QList<QKeySequence> &findNext();
349
354KCONFIGGUI_EXPORT const QList<QKeySequence> &findPrev();
355
360KCONFIGGUI_EXPORT const QList<QKeySequence> &replace();
361
366KCONFIGGUI_EXPORT const QList<QKeySequence> &zoomIn();
367
372KCONFIGGUI_EXPORT const QList<QKeySequence> &zoomOut();
373
378KCONFIGGUI_EXPORT const QList<QKeySequence> &home();
379
384KCONFIGGUI_EXPORT const QList<QKeySequence> &begin();
385
390KCONFIGGUI_EXPORT const QList<QKeySequence> &end();
391
396KCONFIGGUI_EXPORT const QList<QKeySequence> &beginningOfLine();
397
402KCONFIGGUI_EXPORT const QList<QKeySequence> &endOfLine();
403
408KCONFIGGUI_EXPORT const QList<QKeySequence> &prior();
409
414KCONFIGGUI_EXPORT const QList<QKeySequence> &next();
415
420KCONFIGGUI_EXPORT const QList<QKeySequence> &gotoLine();
421
426KCONFIGGUI_EXPORT const QList<QKeySequence> &addBookmark();
427
432KCONFIGGUI_EXPORT const QList<QKeySequence> &tabNext();
433
438KCONFIGGUI_EXPORT const QList<QKeySequence> &tabPrev();
439
444KCONFIGGUI_EXPORT const QList<QKeySequence> &fullScreen();
445
450KCONFIGGUI_EXPORT const QList<QKeySequence> &help();
451
456KCONFIGGUI_EXPORT const QList<QKeySequence> &completion();
457
463KCONFIGGUI_EXPORT const QList<QKeySequence> &prevCompletion();
464
470KCONFIGGUI_EXPORT const QList<QKeySequence> &nextCompletion();
471
477KCONFIGGUI_EXPORT const QList<QKeySequence> &substringCompletion();
478
483KCONFIGGUI_EXPORT const QList<QKeySequence> &rotateUp();
484
489KCONFIGGUI_EXPORT const QList<QKeySequence> &rotateDown();
490
495KCONFIGGUI_EXPORT const QList<QKeySequence> &whatsThis();
496
501KCONFIGGUI_EXPORT const QList<QKeySequence> &reload();
502
507KCONFIGGUI_EXPORT const QList<QKeySequence> &up();
508
513KCONFIGGUI_EXPORT const QList<QKeySequence> &back();
514
519KCONFIGGUI_EXPORT const QList<QKeySequence> &forward();
520
525KCONFIGGUI_EXPORT const QList<QKeySequence> &backwardWord();
526
531KCONFIGGUI_EXPORT const QList<QKeySequence> &forwardWord();
532
537KCONFIGGUI_EXPORT const QList<QKeySequence> &showMenubar();
538
544KCONFIGGUI_EXPORT const QList<QKeySequence> &deleteFile();
545
551KCONFIGGUI_EXPORT const QList<QKeySequence> &renameFile();
552
558KCONFIGGUI_EXPORT const QList<QKeySequence> &createFolder();
559
565KCONFIGGUI_EXPORT const QList<QKeySequence> &moveToTrash();
566
572KCONFIGGUI_EXPORT const QList<QKeySequence> &preferences();
573
579KCONFIGGUI_EXPORT const QList<QKeySequence> &showHideHiddenFiles();
580
581}
582
583#endif // KSTANDARDSHORTCUT_H
Convenient methods for access to the common accelerator keys in the key configuration.
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
const QList< QKeySequence > & copy()
Copy selected area into the clipboard.
Category category(StandardShortcut id)
Returns the appropriate category for the given StandardShortcut id.
QString name(StandardShortcut id)
Returns a unique name for the given accel.
QList< QKeySequence > hardcodedDefaultShortcut(StandardShortcut id)
Returns the hardcoded default shortcut for id.
const QList< QKeySequence > & completion()
Complete text in input widgets.
const QList< QKeySequence > & replace()
Find and replace matches.
const QList< QKeySequence > & pasteSelection()
Paste the selection at mouse/cursor position.
const QList< QKeySequence > & begin()
Go to beginning of the document.
const QList< QKeySequence > & print()
Print current document.
const QList< QKeySequence > & rotateDown()
Help users iterate through a list of entries.
const QList< QKeySequence > & backwardWord()
BackwardWord.
const QList< QKeySequence > & beginningOfLine()
Go to beginning of current line.
const QList< QKeySequence > & home()
Go to home page.
const QList< QKeySequence > & reload()
Reload.
const QList< QKeySequence > & undo()
Undo last operation.
const QList< QKeySequence > & save()
Save current document.
const QList< QKeySequence > & selectAll()
Select all.
StandardShortcut find(const QKeySequence &keySeq)
Return the StandardShortcut id of the standard accel action which uses this key sequence,...
const QList< QKeySequence > & forwardWord()
ForwardWord.
const QList< QKeySequence > & moveToTrash()
Moves files or folders to the trash.
const QList< QKeySequence > & zoomIn()
Zoom in.
const QList< QKeySequence > & shortcut(StandardShortcut id)
Returns the keybinding for accel.
const QList< QKeySequence > & forward()
Forward.
const QList< QKeySequence > & tabNext()
Next Tab.
const QList< QKeySequence > & prior()
Scroll up one page.
const QList< QKeySequence > & up()
Up.
const QList< QKeySequence > & endOfLine()
Go to end of current line.
const QList< QKeySequence > & findNext()
Find the next instance of a stored 'find' Default: F3.
const QList< QKeySequence > & nextCompletion()
Iterate through a list when completion returns multiple items.
const QList< QKeySequence > & deleteFile()
Permanently delete files or folders.
const QList< QKeySequence > & help()
Help the user in the current situation.
void saveShortcut(StandardShortcut id, const QList< QKeySequence > &newShortcut)
Saves the new shortcut cut for standard accel id.
const QList< QKeySequence > & deleteWordBack()
Delete a word back from mouse/cursor position.
const QList< QKeySequence > & cut()
Cut selected area and store it in the clipboard.
const QList< QKeySequence > & deleteWordForward()
Delete a word forward from mouse/cursor position.
const QList< QKeySequence > & findPrev()
Find a previous instance of a stored 'find'.
const QList< QKeySequence > & open()
Open file.
const QList< QKeySequence > & createFolder()
Create a folder.
const QList< QKeySequence > & openNew()
Create a new document (or whatever).
const QList< QKeySequence > & close()
Close current document.
const QList< QKeySequence > & showHideHiddenFiles()
Shows or hides hidden files.
const QList< QKeySequence > & redo()
Redo last operation.
QString whatsThis(StandardShortcut id)
Returns an extended WhatsThis description for the given accelerator.
StandardShortcut findByName(const QString &name)
Return the StandardShortcut id of the standard accelerator action which has name as its name,...
const QList< QKeySequence > & renameFile()
Rename files or folders.
const QList< QKeySequence > & rotateUp()
Help users iterate through a list of entries.
const QList< QKeySequence > & gotoLine()
Go to line.
const QList< QKeySequence > & back()
Back.
const QList< QKeySequence > & paste()
Paste contents of clipboard at mouse/cursor position.
const QList< QKeySequence > & tabPrev()
Previous Tab.
const QList< QKeySequence > & prevCompletion()
Iterate through a list when completion returns multiple items.
const QList< QKeySequence > & next()
Scroll down one page.
const QList< QKeySequence > & fullScreen()
Full Screen Mode.
const QList< QKeySequence > & zoomOut()
Zoom out.
const QList< QKeySequence > & addBookmark()
Add current page to bookmarks.
const QList< QKeySequence > & showMenubar()
Show Menu Bar.
const QList< QKeySequence > & preferences()
Opens the app's settings window.
const QList< QKeySequence > & substringCompletion()
Find a string within another string or list of strings.
const QList< QKeySequence > & quit()
Quit the program.
const QList< QKeySequence > & end()
Go to end of the document.
Category
Categories in which the standard shortcuts can be classified.
Definition kstandardshortcut.h:155
StandardShortcut
Defines the identifier of all standard accelerators.
Definition kstandardshortcut.h:44
@ DeleteFile
Permanently delete files or folders.
Definition kstandardshortcut.h:140
@ SaveOptions
Definition kstandardshortcut.h:126
@ KeyBindings
Display the configure key bindings dialog.
Definition kstandardshortcut.h:131
@ Close
Close current document.
Definition kstandardshortcut.h:51
@ ShowHideHiddenFiles
Toggle showing or hiding hidden files.
Definition kstandardshortcut.h:144
@ ZoomIn
Zoom in.
Definition kstandardshortcut.h:89
@ TabPrev
Previous Tab.
Definition kstandardshortcut.h:95
@ Cut
Cut selected area and store it in the clipboard.
Definition kstandardshortcut.h:59
@ ConfigureToolbars
Display the toolbar configuration dialog.
Definition kstandardshortcut.h:133
@ AboutApp
Display the application's About dialog.
Definition kstandardshortcut.h:138
@ Paste
Paste contents of clipboard at mouse/cursor position.
Definition kstandardshortcut.h:61
@ Help
Help the user in the current situation.
Definition kstandardshortcut.h:97
@ Up
Up.
Definition kstandardshortcut.h:77
@ Mail
Send the current document by mail.
Definition kstandardshortcut.h:110
@ Quit
Quit the program.
Definition kstandardshortcut.h:55
@ Home
Go to home page.
Definition kstandardshortcut.h:72
@ Spelling
Pop up the spell checker.
Definition kstandardshortcut.h:122
@ GotoLine
Go to line.
Definition kstandardshortcut.h:84
@ Zoom
Select the current zoom level.
Definition kstandardshortcut.h:116
@ DeleteWordBack
Delete a word back from mouse/cursor position.
Definition kstandardshortcut.h:65
@ FitToWidth
Fit the document view to the width of the current window.
Definition kstandardshortcut.h:114
@ FitToPage
Fit the document view to the size of the current window.
Definition kstandardshortcut.h:113
@ Begin
Go to beginning of the document.
Definition kstandardshortcut.h:73
@ Undo
Undo last operation.
Definition kstandardshortcut.h:57
@ ShowMenubar
Show Menu Bar.
Definition kstandardshortcut.h:92
@ DocumentForward
Move forward (document style menu).
Definition kstandardshortcut.h:120
@ Print
Print current document.
Definition kstandardshortcut.h:54
@ Donate
Open donation page on kde.org.
Definition kstandardshortcut.h:143
@ Save
Save current document.
Definition kstandardshortcut.h:52
@ EndOfLine
Go to end of current line.
Definition kstandardshortcut.h:83
@ FitToHeight
Fit the document view to the height of the current window.
Definition kstandardshortcut.h:115
@ DocumentBack
Move back (document style menu).
Definition kstandardshortcut.h:119
@ SelectAll
Select all.
Definition kstandardshortcut.h:63
@ AddBookmark
Add current page to bookmarks.
Definition kstandardshortcut.h:88
@ FullScreen
Full Screen mode.
Definition kstandardshortcut.h:91
@ Revert
Revert the current document to the last saved version.
Definition kstandardshortcut.h:108
@ EditBookmarks
Edit the application bookmarks.
Definition kstandardshortcut.h:121
@ New
Create a new document.
Definition kstandardshortcut.h:50
@ PrintPreview
Show a print preview of the current document.
Definition kstandardshortcut.h:109
@ FindPrev
Find a previous instance of a stored 'find'.
Definition kstandardshortcut.h:69
@ AboutKDE
Display the About KDE dialog.
Definition kstandardshortcut.h:139
@ Preferences
Display the preferences/options dialog.
Definition kstandardshortcut.h:132
@ ShowToolbar
Show/Hide the toolbar.
Definition kstandardshortcut.h:123
@ FindNext
Find the next instance of a stored 'find'.
Definition kstandardshortcut.h:68
@ Redo
Redo last operation.
Definition kstandardshortcut.h:58
@ RenameFile
Rename files or folders.
Definition kstandardshortcut.h:141
@ RotateDown
Help users iterate through a list of entries.
Definition kstandardshortcut.h:105
@ RotateUp
Help users iterate through a list of entries.
Definition kstandardshortcut.h:104
@ Open
Open file.
Definition kstandardshortcut.h:49
@ WhatsThis
What's This button.
Definition kstandardshortcut.h:98
@ ReportBug
Display the Report Bug dialog.
Definition kstandardshortcut.h:136
@ End
Go to end of the document.
Definition kstandardshortcut.h:74
@ MoveToTrash
Move files or folders to the trash.
Definition kstandardshortcut.h:142
@ CreateFolder
Create a folder.
Definition kstandardshortcut.h:145
@ Reload
Reload.
Definition kstandardshortcut.h:80
@ PasteSelection
Paste the selection at mouse/cursor position.
Definition kstandardshortcut.h:62
@ NextCompletion
Iterate through a list when completion returns multiple items.
Definition kstandardshortcut.h:102
@ OpenRecent
Open a recently used document.
Definition kstandardshortcut.h:106
@ TextCompletion
Complete text in input widgets.
Definition kstandardshortcut.h:100
@ Forward
Forward.
Definition kstandardshortcut.h:79
@ TipofDay
Display the "Tip of the Day".
Definition kstandardshortcut.h:135
@ Next
Scroll down one page.
Definition kstandardshortcut.h:76
@ ShowStatusbar
Show/Hide the statusbar.
Definition kstandardshortcut.h:124
@ ActualSize
View the document at its actual size.
Definition kstandardshortcut.h:112
@ DeleteWordForward
Delete a word forward from mouse/cursor position.
Definition kstandardshortcut.h:66
@ Back
Back.
Definition kstandardshortcut.h:78
@ BackwardWord
BackwardWord.
Definition kstandardshortcut.h:85
@ Copy
Copy selected area into the clipboard.
Definition kstandardshortcut.h:60
@ SaveAs
Save the current document under a different name.
Definition kstandardshortcut.h:107
@ ZoomOut
Zoom out.
Definition kstandardshortcut.h:90
@ ForwardWord
ForwardWord.
Definition kstandardshortcut.h:86
@ GotoPage
Go to a specific page.
Definition kstandardshortcut.h:118
@ Clear
Clear the content of the focus widget.
Definition kstandardshortcut.h:111
@ Find
Initiate a 'find' request in the current document.
Definition kstandardshortcut.h:67
@ SwitchApplicationLanguage
Display the Switch Application Language dialog.
Definition kstandardshortcut.h:137
@ PrevCompletion
Iterate through a list when completion returns multiple items.
Definition kstandardshortcut.h:101
@ BeginningOfLine
Go to beginning of current line.
Definition kstandardshortcut.h:82
@ ConfigureNotifications
Display the notifications configuration dialog.
Definition kstandardshortcut.h:134
@ Goto
Jump to some specific location in the document.
Definition kstandardshortcut.h:117
@ SubstringCompletion
Find a string within another string or list of strings.
Definition kstandardshortcut.h:103
@ TabNext
Next Tab.
Definition kstandardshortcut.h:94
@ Replace
Find and replace matches.
Definition kstandardshortcut.h:70
@ Prior
Scroll up one page.
Definition kstandardshortcut.h:75
@ Deselect
Deselect any selected elements.
Definition kstandardshortcut.h:64